Update the sarif schema file

The version we were using is quite old. Copied the latest from
123e95847b/Schemata/sarif-schema-2.1.0.json

I do not think the sarif spec will be changing any more without
an explicit version update, so this is fine for now.
This commit is contained in:
Andrew Eisenberg
2023-05-02 13:46:24 -07:00
parent 8ca5570701
commit febbadf751
2 changed files with 78 additions and 39 deletions

View File

@@ -225,8 +225,7 @@ export function countResultsInSarif(sarif: string): number {
// Throws an error if the file is invalid.
export function validateSarifFileSchema(sarifFilePath: string, logger: Logger) {
const sarif = JSON.parse(fs.readFileSync(sarifFilePath, "utf8"));
const schema =
require("../src/sarif_v2.1.0_schema.json") as jsonschema.Schema;
const schema = require("../src/sarif-schema-2.1.0.json") as jsonschema.Schema;
const result = new jsonschema.Validator().validate(sarif, schema);
if (!result.valid) {