Skip to content
vetkitChecksChangelogDocumentation

vetkit.js.deserialization.yaml-full-schema

YAML is loaded with js-yaml's DEFAULT_FULL_SCHEMA. That schema constructs !!js/function values, so loading untrusted YAML executes attacker-supplied JavaScript.

Last updated:

Suite: Security

javascript, typescript

YAML is loaded with js-yaml's DEFAULT_FULL_SCHEMA. That schema constructs !!js/function values, so loading untrusted YAML executes attacker-supplied JavaScript.

Category: SECURITY · Engine rule severity: WARNING

How to fix it

Use the default (safe) schema: yaml.load(text) in js-yaml 4, yaml.safeLoad(text) in js-yaml 3, or the yaml package.

References

Source: packages/engine/rules/sast/javascript.yml.

Generated from shipped rule definitions at build time. Matching is a review signal, not proof of exploitability. “generic” denotes text matching, not complete language or framework coverage. Runtime configuration and available tools affect whether a rule runs.