Skip to content

DEFAULT_YAML_MAX_ALIAS_COUNT

const DEFAULT_YAML_MAX_ALIAS_COUNT: 100 = 100

Defined in: packages/format-yaml/src/parse.ts:20

Alias expansions allowed while converting a document to a plain value, unless the caller passes its own maxAliasCount.

An anchor referenced from inside another anchor expands multiplicatively — the “billion laughs” denial of service — and this bound is the only thing between untrusted YAML and an unbounded allocation. -1 disables the check, 0 rejects every alias.