ajv 8.20.0
- Source
- https://github.com/ajv-validator/ajv
- Tag scanned
v8.20.0- Compared with
v8.19.0(0 signals introduced since)- Files
- 244 scanned, 144 skipped (binary, oversized, or unrecognised)
- Signals
- 0 critical · 0 warn · 13 info
- Scan time
- 9.4 s
- LLM review
- Reviewed by claude-haiku-5-5 (Anthropic): 11 of 11 warn and critical signals; 11 demoted to info.
- Disclude version
- 4.0.0
- Scanned (UTC)
- 2026-10-14 19:04
Signals
Ordered by severity, then signals introduced in this release. Hidden characters are shown as ⟨U+…⟩.
-
-
Ajv ajv.dismissed Documentation example showing a dynamic import in a code block.Reasoning
The flagged import(...) sits inside an embedded TypeScript code sample in a markdown documentation file showing how to define a custom Ajv keyword. It is illustrative text, not executable code in the package.
-
Ajv ajv.dismissed Documentation example for adding an Ajv keyword, with a dynamic import in the code sample.Reasoning
Same as the other keywords.md finding: an illustrative TypeScript snippet in documentation, with no execution path in the shipped library.
-
// console.log("\n\n\n *** \n", sourceCode) const makeValidate = const validate: AnyValidateFunction = this..likely benign Ajv's validator compiler builds JavaScript source from schemas and instantiates it with the Function constructor.Reasoning
Ajv is a JSON Schema compiler whose core function is generating validator source code and instantiating it with new Function. The body is built from the library's own code generator from a schema the developer supplies, which is the documented design of the library, not an injected payload.
-
sourceCode = `return ` const makeParse = const parse: => unknown = this..likely benign JTD parser generation that compiles schema-derived source via the Function constructor.Reasoning
This is the JTD parser code generator. It produces parse-function source from schema-derived code and instantiates it with new Function, the same expected pattern as the core Ajv compiler.
-
sourceCode = `return ` const makeSerialize = const serialize: => string = this..likely benign JTD serializer generation that compiles schema-derived source via the Function constructor.Reasoning
This is the JTD serializer code generator, using the same schema-driven code generation approach as the parser. The dynamic function is the library's intended mechanism.
-
const json = const bundleDir = path. fs.dismissed Build script that requires the local package.json via a path built from __dirname.Reasoning
The require argument is path.join of __dirname and a fixed relative path to package.json, a local build script reading its own metadata. Nothing external or attacker-controlled feeds the path.
-
Ajv from "../dist/core" const AjvClass: typeof Ajv = typeof window == "object" ? . :likely benign Test helper that conditionally requires the built Ajv module under Node, with the specifier concatenated to avoid bundling.Reasoning
The string concatenation "" + ".." hides the require target from bundlers, so the browser build skips it. It is a test harness fallback loading the local built module, a common pattern, not malicious.
-
const AjvClass: typeof Ajv2019 = typeof window == "object" ? . :likely benign Test helper requiring the local 2019 Ajv build under Node, with a concatenated specifier.Reasoning
Same bundler-avoidance pattern as spec/ajv.ts, requiring a fixed local build path ../dist/2019 for Node test runs. The target is the project's own build output.
-
const AjvClass: typeof Ajv2020 = typeof window == "object" ? . :likely benign Test helper requiring the local 2020 Ajv build under Node, with a concatenated specifier.Reasoning
Same pattern: a fixed local build path ../dist/2020 is required under Node only, with the specifier split to dodge bundlers. Test scaffolding, not an attack.
-
const AjvClass: typeof AjvJTD = typeof window == "object" ? . :likely benign Test helper requiring the local JTD Ajv build under Node, with a concatenated specifier.Reasoning
Same pattern: a fixed local build path ../dist/jtd is required in Node test runs, with the specifier split to avoid bundling. Benign test setup.
-
const chai: ChaiStatic = typeof window == "object" ? . :likely benign Test helper loading the chai assertion library under Node with a concatenated module name.Reasoning
The chai module is required under Node only when window is absent, with the name split by string concatenation to avoid bundling. A standard test-dependency loading pattern on a well-known package.
-
Reproduce This Scan
Run disclude locally to verify. Add --format sarif for SARIF output. Add --llm (with an API key in the environment) to include the LLM review.
&&