A meta-schema for performing static application security testing (SAST) on JSON Schemas. Current version 0.4.1 (released June 2025) requires Node.js >=24. It enforces security best practices including strict integer/number ranges, defined string maxLength and allowed values, safe array and object property limits, secure RegExp patterns, and safe $id/$ref resolution. Released under MIT license with SLSA 3 provenance and OpenSSF Scorecard. Differentiated by providing a comprehensive, security-focused meta-schema that checks JSON Schemas for common vulnerabilities, aligning with OWASP ASVS and NIST guidelines.
npm install sast-json-schemaNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Validates a JSON Schema against the SAST meta-schema to detect security vulnerabilities. Uses Ajv 2020 edition.
Upgrade Node.js to version 24 or later.
Create a separate Ajv instance with strictTypes: false for SAST validation.
Append ' with { type: "json" }' to the import statement.Install Ajv version 8 or later: npm install ajv@latest
Use: import sastSchema from 'sast-json-schema' with { type: 'json' }Check available drafts: /2020-12, /2019-09, /draft-07, /draft-06, /draft-04 are all valid.