mirror of
https://github.com/github/codeql-action.git
synced 2025-12-31 03:30:14 +08:00
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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user