From 9c5706e1a2f4bbb33da84950f8133ee20ff508cc Mon Sep 17 00:00:00 2001 From: Andrew Eisenberg Date: Thu, 25 May 2023 10:17:52 -0700 Subject: [PATCH 1/2] Avoid throwing validation error on invalid URIs The recent update of jsonschema inadvertently caused extra validation of `uri-reference` formatted properties. This change ensures that these errors are converted to warnings. Note that we cannot revert the change to jsonschema since the old version does not handle `uniqueItems` correctly. --- lib/upload-lib.js | 13 ++++++--- lib/upload-lib.js.map | 2 +- lib/upload-lib.test.js | 12 +++++++++ lib/upload-lib.test.js.map | 2 +- src/testdata/with-invalid-uri.sarif | 42 +++++++++++++++++++++++++++++ src/upload-lib.test.ts | 17 ++++++++++++ src/upload-lib.ts | 21 ++++++++++++--- 7 files changed, 101 insertions(+), 8 deletions(-) create mode 100644 src/testdata/with-invalid-uri.sarif diff --git a/lib/upload-lib.js b/lib/upload-lib.js index 45c7c2d6c2..566b694f7c 100644 --- a/lib/upload-lib.js +++ b/lib/upload-lib.js @@ -181,16 +181,23 @@ function validateSarifFileSchema(sarifFilePath, logger) { const sarif = JSON.parse(fs.readFileSync(sarifFilePath, "utf8")); const schema = require("../src/sarif-schema-2.1.0.json"); const result = new jsonschema.Validator().validate(sarif, schema); - if (!result.valid) { + // Filter errors related to invalid URIs in the artifactLocation field as this + // is a breaking change. See https://github.com/github/codeql-action/issues/1703 + const errors = (result.errors || []).filter((err) => err.argument !== "uri-reference"); + const warnings = (result.errors || []).filter((err) => err.argument === "uri-reference"); + for (const warning of warnings) { + logger.info(`Warning: '${warning.instance}' is not a valid URI in '${warning.property}'.`); + } + if (errors.length) { // Output the more verbose error messages in groups as these may be very large. - for (const error of result.errors) { + for (const error of errors) { logger.startGroup(`Error details: ${error.stack}`); logger.info(JSON.stringify(error, null, 2)); logger.endGroup(); } // Set the main error message to the stacks of all the errors. // This should be of a manageable size and may even give enough to fix the error. - const sarifErrors = result.errors.map((e) => `- ${e.stack}`); + const sarifErrors = errors.map((e) => `- ${e.stack}`); throw new Error(`Unable to upload "${sarifFilePath}" as it is not valid SARIF:\n${sarifErrors.join("\n")}`); } } diff --git a/lib/upload-lib.js.map b/lib/upload-lib.js.map index 71e4b93071..29f155c8ba 100644 --- a/lib/upload-lib.js.map +++ b/lib/upload-lib.js.map @@ -1 +1 @@ -{"version":3,"file":"upload-lib.js","sourceRoot":"","sources":["../src/upload-lib.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAAyB;AACzB,2CAA6B;AAC7B,qCAA8B;AAC9B,gDAAwB;AAExB,oDAAsC;AAEtC,wDAA+B;AAC/B,uDAAyC;AAEzC,4DAA8C;AAC9C,kDAAoC;AACpC,6DAA+C;AAE/C,6CAAiE;AACjE,6DAAkE;AAClE,6CAA+B;AAC/B,iCAAqE;AACrE,qDAAuC;AAEvC,mEAAmE;AACnE,qDAAqD;AACrD,SAAgB,iBAAiB,CAAC,UAAoB;IACpD,MAAM,aAAa,GAAc;QAC/B,OAAO,EAAE,IAAI;QACb,IAAI,EAAE,EAAE;KACT,CAAC;IAEF,KAAK,MAAM,SAAS,IAAI,UAAU,EAAE;QAClC,MAAM,WAAW,GAAG,IAAI,CAAC,KAAK,CAC5B,EAAE,CAAC,YAAY,CAAC,SAAS,EAAE,MAAM,CAAC,CACtB,CAAC;QACf,sBAAsB;QACtB,IAAI,aAAa,CAAC,OAAO,KAAK,IAAI,EAAE;YAClC,aAAa,CAAC,OAAO,GAAG,WAAW,CAAC,OAAO,CAAC;SAC7C;aAAM,IAAI,aAAa,CAAC,OAAO,KAAK,WAAW,CAAC,OAAO,EAAE;YACxD,MAAM,IAAI,KAAK,CACb,yCAAyC,aAAa,CAAC,OAAO,QAAQ,WAAW,CAAC,OAAO,EAAE,CAC5F,CAAC;SACH;QAED,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,WAAW,CAAC,IAAI,CAAC,CAAC;KAC9C;IAED,OAAO,aAAa,CAAC;AACvB,CAAC;AAvBD,8CAuBC;AAED,sFAAsF;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nE,CAAC;KACH;IACD,OAAO,EAAE,GAAG,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;AACrC,CAAC;AArCD,kDAqCC"} \ No newline at end of file +{"version":3,"file":"upload-lib.js","sourceRoot":"","sources":["../src/upload-lib.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAAyB;AACzB,2CAA6B;AAC7B,qCAA8B;AAC9B,gDAAwB;AAExB,oDAAsC;AAEtC,wDAA+B;AAC/B,uDAAyC;AAEzC,4DAA8C;AAC9C,kDAAoC;AACpC,6DAA+C;AAE/C,6CAAiE;AACjE,6DAAkE;AAClE,6CAA+B;AAC/B,iCAAqE;AACrE,qDAAuC;AAEvC,mEAAmE;AACnE,qDAAqD;AACrD,SAAgB,iBAAiB,CAAC,UAAoB;IACpD,MAAM,aAAa,GAAc;QAC/B,OAAO,EAAE,IAAI;QACb,IAAI,EAAE,EAAE;KACT,CAAC;IAEF,KAAK,MAAM,SAAS,IAAI,UAAU,EAAE;QAClC,MAAM,WAAW,GAAG,IAAI,CAAC,KAAK,CAC5B,EAAE,CAAC,YAAY,CAAC,SAAS,EAAE,MAAM,CAAC,CACtB,CAAC;QACf,sBAAsB;QACtB,IAAI,aAAa,CAAC,OAAO,KAAK,IAAI,EAAE;YAClC,aAAa,CAAC,OAAO,GAAG,WAAW,CAAC,OAAO,CAAC;SAC7C;aAAM,IAAI,aAAa,CAAC,OAAO,KAAK,WAAW,CAAC,OAAO,EAAE;YACxD,MAAM,IAAI,KAAK,CACb,yCAAyC,aAAa,CAAC,OAAO,QAAQ,WAAW,CAAC,OAAO,EAAE,CAC5F,CAAC;SACH;QAED,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,WAAW,CAAC,IAAI,CAAC,CAAC;KAC9C;IAED,OAAO,aAAa,CAAC;AACvB,CAAC;AAvBD,8CAuBC;AAED,sFAAsF;AACtF,6CAA6C;AAC7C,SAAgB,4BAA4B,CAC1C,KAAgB,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C,OAAO,EAAE,IAAI,EAAE,QAAQ,CAAC,QAAQ,CAAC,CAAC,EAC3C;oBACA,MAAM,IAAI,CAAC,CAAC;oBACZ,SAAS;iBACV;gBACD,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;aACzB;YACD,OAAO,CAAC,IAAI,CAAC,EAAE,GAAG,GAAG,EAAE,OAAO,EAAE,UAAU,EAAE,CAAC,CAAC;SAC/C;aAAM;YACL,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;SACnB;KACF;IACD,IAAI,MAAM,GAAG,CAAC,EAAE;QACd,MAAM,CAAC,IAAI,CACT,UAAU,MAAM,kDAAkD,CACnE,CAAC;KACH;IACD,OAAO,EAAE,GAAG,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;AACrC,CAAC;AArCD,kDAqCC"} \ No newline at end of file diff --git a/lib/upload-lib.test.js b/lib/upload-lib.test.js index 3084f7f17b..375d20ab29 100644 --- a/lib/upload-lib.test.js +++ b/lib/upload-lib.test.js @@ -233,6 +233,18 @@ ava_1.default.beforeEach(() => { t.deepEqual(loggedMessages.length, 1); t.assert(loggedMessages[0].includes("Pruned 2 results")); }); +(0, ava_1.default)("accept results with invalid artifactLocation.uri value", (t) => { + const loggedMessages = []; + const mockLogger = { + info: (message) => { + loggedMessages.push(message); + }, + }; + const sarifFile = `${__dirname}/../src/testdata/with-invalid-uri.sarif`; + uploadLib.validateSarifFileSchema(sarifFile, mockLogger); + t.deepEqual(loggedMessages.length, 1); + t.deepEqual(loggedMessages[0], "Warning: 'not a valid URI' is not a valid URI in 'instance.runs[0].results[0].locations[0].physicalLocation.artifactLocation.uri'."); +}); const affectedCodeQLVersion = { driver: { name: "CodeQL", diff --git a/lib/upload-lib.test.js.map b/lib/upload-lib.test.js.map index 7f9ff347be..cc114b9da3 100644 --- a/lib/upload-lib.test.js.map +++ b/lib/upload-lib.test.js.map @@ -1 +1 @@ -{"version":3,"file":"upload-lib.test.js","sourceRoot":"","sources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AO,EAAE;QACP,IAAI,EAAE,yCAAyC;KAChD;IACD,SAAS,EAAE,EAAE;IACb,mBAAmB,EAAE,EAAE;CACxB,CAAC;AAEF,MAAM,qBAAqB,GAAG;IAC5B,MAAM,EAAE,iCAAiC;IACzC,OAAO,EAAE;QACP,IAAI,EAAE,8BAA8B;KACrC;IACD,SAAS,EAAE,EAAE;IACb,mBAAmB,EAAE,EAAE;CACxB,CAAC;AAEF,MAAM,qBAAqB,GAAG;IAC5B,MAAM,EAAE,iCAAiC;IACzC,OAAO,EAAE;QACP,IAAI,EAAE,+BAA+B;KACtC;IACD,SAAS,EAAE,EAAE;IACb,mBAAmB,EAAE,EAAE;CACxB,CAAC;AAEF,SAAS,eAAe,CAAC,EAAW,EAAE,IAAa;IACjD,OAAO;QACL,IAAI,EAAE;YACJ;gBACE,iBAAiB,EAAE;oBACjB,EAAE;iBACH;gBACD,IAAI,EAAE;oBACJ,MAAM,EAAE;wBACN,IAAI,EAAE,IAAI;qBACX;iBACF;aACF;SACF;KACF,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/src/testdata/with-invalid-uri.sarif b/src/testdata/with-invalid-uri.sarif new file mode 100644 index 0000000000..4e30dd22ea --- /dev/null +++ b/src/testdata/with-invalid-uri.sarif @@ -0,0 +1,42 @@ +{ + "$schema": "https://raw.githubusercontent.com/oasis-tcs/sarif-spec/master/Schemata/sarif-schema-2.1.0.json", + "version": "2.1.0", + "runs": [ + { + "tool": { + "driver": { + "name": "LGTM.com", + "organization": "Semmle", + "version": "1.24.0-SNAPSHOT", + "rules": [] + } + }, + "results" : [ { + "ruleId" : "js/unused-local-variable", + "ruleIndex" : 0, + "message" : { + "text" : "Unused variable foo." + }, + "locations" : [ { + "physicalLocation" : { + "artifactLocation" : { + "uri" : "not a valid URI", + "uriBaseId" : "%SRCROOT%", + "index" : 0 + }, + "region" : { + "startLine" : 2, + "startColumn" : 7, + "endColumn" : 10 + } + } + } ] + } ], + "columnKind": "utf16CodeUnits", + "properties": { + "semmle.formatSpecifier": "2.1.0", + "semmle.sourceLanguage": "java" + } + } + ] +} diff --git a/src/upload-lib.test.ts b/src/upload-lib.test.ts index 565378b579..78e92bb001 100644 --- a/src/upload-lib.test.ts +++ b/src/upload-lib.test.ts @@ -360,6 +360,23 @@ test("pruneInvalidResults", (t) => { t.assert(loggedMessages[0].includes("Pruned 2 results")); }); +test("accept results with invalid artifactLocation.uri value", (t) => { + const loggedMessages: string[] = []; + const mockLogger = { + info: (message: string) => { + loggedMessages.push(message); + }, + } as Logger; + + const sarifFile = `${__dirname}/../src/testdata/with-invalid-uri.sarif`; + uploadLib.validateSarifFileSchema(sarifFile, mockLogger); + + t.deepEqual(loggedMessages.length, 1); + t.deepEqual( + loggedMessages[0], + "Warning: 'not a valid URI' is not a valid URI in 'instance.runs[0].results[0].locations[0].physicalLocation.artifactLocation.uri'." + ); +}); const affectedCodeQLVersion = { driver: { name: "CodeQL", diff --git a/src/upload-lib.ts b/src/upload-lib.ts index 41d48aeae6..d30fed27fd 100644 --- a/src/upload-lib.ts +++ b/src/upload-lib.ts @@ -228,9 +228,24 @@ export function validateSarifFileSchema(sarifFilePath: string, logger: Logger) { const schema = require("../src/sarif-schema-2.1.0.json") as jsonschema.Schema; const result = new jsonschema.Validator().validate(sarif, schema); - if (!result.valid) { + // Filter errors related to invalid URIs in the artifactLocation field as this + // is a breaking change. See https://github.com/github/codeql-action/issues/1703 + const errors = (result.errors || []).filter( + (err) => err.argument !== "uri-reference" + ); + const warnings = (result.errors || []).filter( + (err) => err.argument === "uri-reference" + ); + + for (const warning of warnings) { + logger.info( + `Warning: '${warning.instance}' is not a valid URI in '${warning.property}'.` + ); + } + + if (errors.length) { // Output the more verbose error messages in groups as these may be very large. - for (const error of result.errors) { + for (const error of errors) { logger.startGroup(`Error details: ${error.stack}`); logger.info(JSON.stringify(error, null, 2)); logger.endGroup(); @@ -238,7 +253,7 @@ export function validateSarifFileSchema(sarifFilePath: string, logger: Logger) { // Set the main error message to the stacks of all the errors. // This should be of a manageable size and may even give enough to fix the error. - const sarifErrors = result.errors.map((e) => `- ${e.stack}`); + const sarifErrors = errors.map((e) => `- ${e.stack}`); throw new Error( `Unable to upload "${sarifFilePath}" as it is not valid SARIF:\n${sarifErrors.join( "\n" From 42add7b4d79b67be9a607fa873545ef12d4e3f57 Mon Sep 17 00:00:00 2001 From: Andrew Eisenberg Date: Thu, 25 May 2023 10:21:47 -0700 Subject: [PATCH 2/2] Update changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c527621604..7a5e6abc4e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ ## [UNRELEASED] -No user facing changes. +- Allow invalid URIs to be used as values to `artifactLocation.uri` properties. This reverses a change from [#1668](https://github.com/github/codeql-action/pull/1668) that inadvertently led to stricter validation of some URI values. [#1705](https://github.com/github/codeql-action/pull/1705) ## 2.3.4 - 24 May 2023