From 7dbaff09b608c15860638396597f24a3535a8e35 Mon Sep 17 00:00:00 2001 From: Nick Fyson Date: Mon, 7 Sep 2020 15:49:03 +0100 Subject: [PATCH] move error matcher definition into dedicated file --- lib/codeql.js | 5 +++-- lib/codeql.js.map | 2 +- lib/error_matcher.js | 6 ++++++ lib/error_matcher.js.map | 1 + lib/exec_wrapper.js | 2 +- lib/exec_wrapper.js.map | 2 +- lib/exec_wrapper.test.js.map | 2 +- src/codeql.ts | 5 +++-- src/error_matcher.ts | 19 +++++++++++++++++++ src/exec_wrapper.test.ts | 3 ++- src/exec_wrapper.ts | 5 ++--- 11 files changed, 40 insertions(+), 12 deletions(-) create mode 100644 lib/error_matcher.js create mode 100644 lib/error_matcher.js.map create mode 100644 src/error_matcher.ts diff --git a/lib/codeql.js b/lib/codeql.js index 32ba1d384..ea0a032a6 100644 --- a/lib/codeql.js +++ b/lib/codeql.js @@ -22,6 +22,7 @@ const globalutil = __importStar(require("util")); const v4_1 = __importDefault(require("uuid/v4")); const api = __importStar(require("./api-client")); const defaults = __importStar(require("./defaults.json")); // Referenced from codeql-action-sync-tool! +const error_matcher_1 = require("./error_matcher"); const exec_wrapper_1 = require("./exec_wrapper"); const util = __importStar(require("./util")); /** @@ -296,7 +297,7 @@ function getCodeQLForCmd(cmd) { databasePath, '--', traceCommand - ], [[0, new RegExp("(No source code was seen during the build\\.|No JavaScript or TypeScript code found\\.)"), 'foo bar']]); + ], error_matcher_1.error_matchers); }, finalizeDatabase: async function (databasePath) { await exec_wrapper_1.exec_wrapper(cmd, [ @@ -304,7 +305,7 @@ function getCodeQLForCmd(cmd) { 'finalize', ...getExtraOptionsFromEnv(['database', 'finalize']), databasePath - ], [[0, new RegExp("(No source code was seen during the build\\.|No JavaScript or TypeScript code found\\.)"), 'foo bar']]); + ], error_matcher_1.error_matchers); }, resolveQueries: async function (queries, extraSearchPath) { const codeqlArgs = [ diff --git a/lib/codeql.js.map b/lib/codeql.js.map index 9da2c85b0..b7b0659d5 100644 ---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AAM,GAAG,GACP,0BAA0B,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,OAAO,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,yBAAyB,CAAC;YACtG,MAAM,IAAI,KAAK,CAAC,GAAG,CAAC,CAAC;SACtB;QACD,OAAO,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE;YACrB,MAAM,CAAC,GAAG,OAAO,CAAC,CAAC;YACnB,IAAI,CAAC,KAAK,QAAQ,IAAI,CAAC,KAAK,QAAQ,IAAI,CAAC,KAAK,SAAS,EAAE;gBACvD,MAAM,GAAG,GACP,yBAAyB,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,OAAO,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,8BAA8B,CAAC;gBACpG,MAAM,IAAI,KAAK,CAAC,GAAG,CAAC,CAAC;aACtB;YACD,OAAO,CAAC,GAAG,EAAE,CAAC;QAChB,CAAC,CAAC,CAAC;IACL,CAAC;IACD,IAAI,GAAG,GAAG,cAAc,OAAC,OAAO,0CAAG,GAAG,GAAG,QAAQ,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;IAC/D,IAAI,QAAQ,GAAG,IAAI,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC;QAChC,cAAc,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC;QACnC,eAAe,OAAC,OAAO,0CAAG,IAAI,CAAC,CAAC,CAAC,SAAG,IAAI,0CAAE,KAAK,CAAC,CAAC,GAAG,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAChF,OAAO,GAAG,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;AAC9B,CAAC;AAjCD,0CAiCC"} \ No newline at end of file diff --git a/lib/error_matcher.js b/lib/error_matcher.js new file mode 100644 index 000000000..4b523b5f9 --- /dev/null +++ b/lib/error_matcher.js @@ -0,0 +1,6 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.error_matchers = [ + [32, new RegExp("No JavaScript or TypeScript code found\\."), 'foo bar'] +]; +//# sourceMappingURL=error_matcher.js.map \ No newline at end of file diff --git a/lib/error_matcher.js.map b/lib/error_matcher.js.map new file mode 100644 index 000000000..02bb25613 --- /dev/null +++ b/lib/error_matcher.js.map @@ -0,0 +1 @@ +{"version":3,"file":"error_matcher.js","sourceRoot":"","sources":["../src/error_matcher.ts"],"names":[],"mappings":";;AAGa,QAAA,cAAc,GAAmB;IAC5C,CAAC,EAAE,EAAE,IAAI,MAAM,CAAC,2CAA2C,CAAC,EAAE,SAAS,CAAC;CACzE,CAAC"} \ No newline at end of file diff --git a/lib/exec_wrapper.js b/lib/exec_wrapper.js index f698aab2d..c8224d25d 100644 --- a/lib/exec_wrapper.js +++ b/lib/exec_wrapper.js @@ -64,7 +64,7 @@ async function exec_wrapper(commandLine, args, matchers, options) { return returnState; if (matchers) { for (const [customCode, regex, message] of matchers) { - if (customCode === returnState || regex.test(stderr) || regex.test(stdout)) { + if (customCode === returnState || regex && (regex.test(stderr) || regex.test(stdout))) { throw new Error(message); } } diff --git a/lib/exec_wrapper.js.map b/lib/exec_wrapper.js.map index 60d0bec1d..32f47be9c 100644 --- a/lib/exec_wrapper.js.map +++ b/lib/exec_wrapper.js.map @@ -1 +1 @@ -{"version":3,"file":"exec_wrapper.js","sourceRoot":"","sources":["../src/exec_wrapper.ts"],"names":[],"mappings":";;;;;;;;;AAAA,oDAAsC;AAMtC;;;;;;;;;;GAUG;AACI,KAAK,UAAU,YAAY,CAAC,WAAmB,EAAE,IAAe,EACpC,QAAyB,EACzB,OAAwB;;IAEzD,IAAI,MAAM,GAAG,EAAE,CAAC;IAChB,IAAI,MAAM,GAAG,EAAE,CAAC;IAEhB,IAAI,SAAS,GAAG;QACd,MAAM,EAAE,CAAC,IAAY,EAAE,EAAE;;YACvB,MAAM,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;YAC1B,IAAI,aAAA,OAAO,0C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A0G;IAC1G,IAAI,WAAyB,CAAC;IAC9B,IAAI;QACF,WAAW,GAAG,MAAM,IAAI,CAAC,IAAI,CAC3B,WAAW,EACX,IAAI,EACJ;YACE,GAAG,OAAO;YACV,SAAS,EAAE,SAAS;YACpB,gBAAgB,EAAE,IAAI;SACvB,CAAC,CAAC;KACN;IAAC,OAAO,CAAC,EAAE;QACV,WAAW,GAAG,CAAC,CAAC;KACjB;IAED,mEAAmE;IACnE,IAAI,WAAW,KAAK,CAAC;QAAE,OAAO,WAAW,CAAC;IAE1C,IAAI,QAAQ,EAAE;QACZ,KAAK,MAAM,CAAC,UAAU,EAAE,KAAK,EAAE,OAAO,CAAC,IAAI,QAAQ,EAAE;YACnD,IAAI,UAAU,KAAK,WAAW,IAAI,KAAK,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,EAAG;gBACtF,MAAM,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC;aAC1B;SACF;KACF;IAED,IAAI,OAAO,WAAW,KAAK,QAAQ,EAAE;QACnC,qFAAqF;QACrF,UAAI,OAAO,0CAAE,gBAAgB,EAAE;YAC7B,OAAO,WAAW,CAAC;SACpB;aAAM;YACL,MAAM,IAAI,KAAK,CAAC,iBAAiB,WAAW,4BAA4B,WAAW,EAAE,CAAC,CAAC;SACxF;KACF;SAAM;QACL,MAAM,WAAW,CAAC;KACnB;AACH,CAAC;AAjED,oCAiEC"} \ No newline at end of file diff --git a/lib/exec_wrapper.test.js.map b/lib/exec_wrapper.test.js.map index 64c41c8be..b805c8b80 100644 --- a/lib/exec_wrapper.test.js.map +++ b/lib/exec_wrapper.test.js.map @@ -1 +1 @@ -{"version":3,"file":"exec_wrapper.test.js","sourceRoot":"","sources":["../src/exec_wrapper.test.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAsC;AACtC,8CAAuB;AAEvB,iDAA4D;AAC5D,mDAA2C;AAC3C,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AAC,MAAM,2BAAY,CAAC,WAAW,EAAE,EAAE,EAAE,EAAE,EAAE,EAAC,SAAS,EAAE,SAAS,EAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAEhF,CAAC,CAAC,SAAS,CAAC,YAAY,EAAE,cAAc,GAAG,IAAI,CAAC,CAAC;IACjD,CAAC,CAAC,SAAS,CAAC,YAAY,EAAE,cAAc,GAAG,IAAI,CAAC,CAAC;AAEnD,CAAC,CAAC,CAAC;AAEH,SAAS,iBAAiB,CAAC,cAAsB,EAAE,cAAsB,EAC9C,mBAA4B,EAAE,eAAwB;IAE/E,IAAI,OAAO,GAAG,EAAE,CAAC;IAEjB,IAAI,cAAc;QAAE,OAAO,IAAI,iBAAiB,GAAG,cAAc,GAAG,OAAO,CAAC;IAC5E,IAAI,cAAc;QAAE,OAAO,IAAI,mBAAmB,GAAG,cAAc,GAAG,OAAO,CAAC;IAE9E,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC;QAAE,MAAM,IAAI,KAAK,CAAC,mDAAmD,CAAC,CAAC;IAE/F,IAAI,mBAAmB;QAAE,OAAO,IAAI,qBAAqB,GAAG,mBAAmB,GAAG,OAAO,CAAC;IAC1F,IAAI,eAAe;QAAE,OAAO,IAAI,qBAAqB,GAAG,eAAe,GAAG,GAAG,CAAC;IAE9E,OAAO,WAAW,GAAG,OAAO,GAAG,GAAG,CAAC;AACrC,CAAC"} \ No newline at end of file diff --git a/src/codeql.ts b/src/codeql.ts index 8b35e3461..beb46121c 100644 --- a/src/codeql.ts +++ b/src/codeql.ts @@ -12,6 +12,7 @@ import uuidV4 from 'uuid/v4'; import * as api from './api-client'; import * as defaults from './defaults.json'; // Referenced from codeql-action-sync-tool! +import { errorMatchers} from './error_matcher'; import { exec_wrapper } from './exec_wrapper'; import { Language } from './languages'; import * as util from './util'; @@ -390,7 +391,7 @@ function getCodeQLForCmd(cmd: string): CodeQL { '--', traceCommand ], - [[0, new RegExp("(No source code was seen during the build\\.|No JavaScript or TypeScript code found\\.)"), 'foo bar']] + errorMatchers ); }, finalizeDatabase: async function(databasePath: string) { @@ -401,7 +402,7 @@ function getCodeQLForCmd(cmd: string): CodeQL { ...getExtraOptionsFromEnv(['database', 'finalize']), databasePath ], - [[0, new RegExp("(No source code was seen during the build\\.|No JavaScript or TypeScript code found\\.)"), 'foo bar']]); + errorMatchers); }, resolveQueries: async function(queries: string[], extraSearchPath: string | undefined) { const codeqlArgs = [ diff --git a/src/error_matcher.ts b/src/error_matcher.ts new file mode 100644 index 000000000..f3ffc5e94 --- /dev/null +++ b/src/error_matcher.ts @@ -0,0 +1,19 @@ + +export type ErrorMatcher = [number|null, RegExp|null, string]; + +const namedMatchers: { [key: string]: ErrorMatcher } = { + noSourceCodeFound: [ + 32, + null, + `No source code was seen during the build. Please see... +https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/troubleshooting-code-scanning#no-code-found-during-the-build` + ], + noSourceCodeFoundJavascript: [ + null, + new RegExp("No JavaScript or TypeScript code found\\."), + `No source code was seen during the build. Please see... +https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/troubleshooting-code-scanning#no-code-found-during-the-build` + ] +}; + +export const errorMatchers = Object.values(namedMatchers); diff --git a/src/exec_wrapper.test.ts b/src/exec_wrapper.test.ts index 036551a99..46b93ab80 100644 --- a/src/exec_wrapper.test.ts +++ b/src/exec_wrapper.test.ts @@ -1,7 +1,8 @@ import * as exec from '@actions/exec'; import test from 'ava'; -import { exec_wrapper, ErrorMatcher } from './exec_wrapper'; +import { ErrorMatcher } from './error_matcher'; +import { exec_wrapper } from './exec_wrapper'; import {setupTests} from './testing-utils'; // import fs from 'fs'; diff --git a/src/exec_wrapper.ts b/src/exec_wrapper.ts index b9a70e7c4..ff9088004 100644 --- a/src/exec_wrapper.ts +++ b/src/exec_wrapper.ts @@ -1,8 +1,7 @@ import * as exec from '@actions/exec'; import * as im from '@actions/exec/lib/interfaces'; - -export type ErrorMatcher = [number, RegExp, string]; +import {ErrorMatcher} from './error_matcher'; /** * Wrapper for exec.exec which checks for specific return code and/or regex matches in console output. @@ -64,7 +63,7 @@ export async function exec_wrapper(commandLine: string, args?: string[], if (matchers) { for (const [customCode, regex, message] of matchers) { - if (customCode === returnState || regex.test(stderr) || regex.test(stdout) ) { + if (customCode === returnState || regex && (regex.test(stderr) || regex.test(stdout)) ) { throw new Error(message); } }