Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
ee3341a
Update changelog and version after v2.1.6
invalid-email-address Mar 30, 2022
bcd5c02
Update checked-in dependencies
invalid-email-address Mar 30, 2022
bae3a3a
Merge pull request #1005 from github/mergeback/v2.1.6-to-main-28eead24
edoardopirovano Mar 30, 2022
e769c2d
Run all PR checks on v2 branch
henrymercer Mar 30, 2022
381ea36
Delete unused workflows
henrymercer Mar 30, 2022
4d339ae
Merge pull request #1009 from github/henrymercer/run-pr-checks-on-v2-…
henrymercer Mar 30, 2022
a9095ce
Avoid failure if `@types/node` is already 12.12
edoardopirovano Mar 30, 2022
894face
Merge pull request #1008 from github/edoardo/no-fail-12.12
edoardopirovano Mar 30, 2022
e83a1d4
Stop running ML-powered queries on Windows
henrymercer Mar 30, 2022
e6f3e04
Add descriptions to each test
henrymercer Mar 30, 2022
7871f0d
Update CodeQL Action from v1 to v2 in README
henrymercer Mar 30, 2022
a2949f4
Update actions/checkout from v2 to v3
henrymercer Mar 30, 2022
ea751a9
Update other Actions from v2 to v3
henrymercer Mar 30, 2022
9dcc141
Merge pull request #1010 from github/henrymercer/stop-running-ml-powe…
henrymercer Mar 30, 2022
1ea2f2d
Merge branch 'main' into henrymercer/update-actions-major-versions
henrymercer Mar 30, 2022
b0ddf36
Merge pull request #1012 from github/henrymercer/update-actions-major…
henrymercer Mar 30, 2022
57096fe
Add a PR check to validate that ML-powered queries are run correctly
henrymercer Mar 30, 2022
dc0338e
Use latest major version of actions/upload-artifact
henrymercer Mar 30, 2022
a90d8bf
Merge pull request #1011 from github/henrymercer/ml-powered-queries-p…
henrymercer Mar 31, 2022
dd6b592
Simplify ML-powered query status report definition
henrymercer Mar 31, 2022
2c03704
Allow the version of the ML-powered pack to depend on the CLI version
henrymercer Mar 31, 2022
e26813c
Run version `~0.2.0` of the ML-powered query pack for v2.8.4+ of the CLI
henrymercer Mar 31, 2022
935969c
Merge pull request #1013 from github/henrymercer/ml-powered-query-pac…
henrymercer Mar 31, 2022
8a00ed0
Fix issue with dependencies
edoardopirovano Apr 1, 2022
f090899
Merge pull request #1015 from github/edoardo/dependency-update
edoardopirovano Apr 1, 2022
43d0664
Revert usage of `--codescanning-config` flag
edoardopirovano Apr 5, 2022
9cab82f
Merge pull request #1018 from github/edoardo/revert-codescanning-config
edoardopirovano Apr 5, 2022
488f782
Update changelog for v2.1.7
invalid-email-address Apr 5, 2022
0182a2c
Merge pull request #1019 from github/update-v2.1.7-9cab82f2
edoardopirovano Apr 5, 2022
8165d30
Revert "Update version and changelog for v1.1.6"
invalid-email-address Apr 5, 2022
380041e
Revert "Update checked-in dependencies"
invalid-email-address Apr 5, 2022
f5e5590
Merge remote-tracking branch 'origin/v2' into update-v1.1.7-0182a2c7
invalid-email-address Apr 5, 2022
3d10ffe
Update version and changelog for v1.1.7
invalid-email-address Apr 5, 2022
7eac76f
Update checked-in dependencies
invalid-email-address Apr 5, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion lib/config-utils.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/config-utils.js.map

Large diffs are not rendered by default.

15 changes: 11 additions & 4 deletions lib/config-utils.test.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/config-utils.test.js.map

Large diffs are not rendered by default.

15 changes: 11 additions & 4 deletions src/config-utils.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1788,7 +1788,8 @@ const mlPoweredQueriesMacro = test.macro({
}`,
});

// macro, isMlPoweredQueriesFlagEnabled, packsInput, queriesInput, versionString
// macro, codeQLVersion, isMlPoweredQueriesFlagEnabled, packsInput, queriesInput, expectedVersionString
// Test that ML-powered queries aren't run on v2.7.4 of the CLI.
test(
mlPoweredQueriesMacro,
"2.7.4",
Expand All @@ -1797,6 +1798,7 @@ test(
"security-extended",
undefined
);
// Test that ML-powered queries aren't run when the feature flag is off.
test(
mlPoweredQueriesMacro,
"2.7.5",
Expand All @@ -1805,28 +1807,33 @@ test(
"security-extended",
undefined
);
// Test that ML-powered queries aren't run when the user hasn't specified that we should run the
// `security-extended` or `security-and-quality` query suite.
test(mlPoweredQueriesMacro, "2.7.5", true, undefined, undefined, undefined);
// Test that ML-powered queries are run on non-Windows platforms running `security-extended`.
test(
mlPoweredQueriesMacro,
"2.7.5",
true,
undefined,
"security-extended",
"~0.1.0"
process.platform === "win32" ? undefined : "~0.1.0"
);
// Test that ML-powered queries are run on non-Windows platforms running `security-and-quality`.
test(
mlPoweredQueriesMacro,
"2.7.5",
true,
undefined,
"security-and-quality",
"~0.1.0"
process.platform === "win32" ? undefined : "~0.1.0"
);
// Test that we don't inject an ML-powered query pack if the user has already specified one.
test(
mlPoweredQueriesMacro,
"2.7.5",
true,
"codeql/[email protected]",
"security-and-quality",
"0.0.1"
process.platform === "win32" ? undefined : "0.0.1"
);
2 changes: 2 additions & 0 deletions src/config-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,8 @@ async function addBuiltinSuiteQueries(
// opted into the ML-powered queries beta, and a user hasn't already added the ML-powered query
// pack, then add the ML-powered query pack so that we run ML-powered queries.
if (
// Disable ML-powered queries on Windows
process.platform !== "win32" &&
languages.includes("javascript") &&
(found === "security-extended" || found === "security-and-quality") &&
!packs.javascript?.some(
Expand Down