Merge pull request #1632 from github/aeisenberg/codeql-testing-org
Move to the codeql-testing org
This commit is contained in:
commit
fa7cce4d4b
25 changed files with 61 additions and 51 deletions
8
.github/workflows/__init-with-registries.yml
generated
vendored
8
.github/workflows/__init-with-registries.yml
generated
vendored
|
|
@ -69,8 +69,8 @@ jobs:
|
|||
- name: Verify packages installed
|
||||
shell: bash
|
||||
run: |
|
||||
PRIVATE_PACK="$HOME/.codeql/packages/dsp-testing/private-pack"
|
||||
CODEQL_PACK1="$HOME/.codeql/packages/dsp-testing/codeql-pack1"
|
||||
PRIVATE_PACK="$HOME/.codeql/packages/codeql-testing/private-pack"
|
||||
CODEQL_PACK1="$HOME/.codeql/packages/codeql-testing/codeql-pack1"
|
||||
|
||||
if [[ -d $PRIVATE_PACK ]]
|
||||
then
|
||||
|
|
@ -117,5 +117,9 @@ jobs:
|
|||
cat $QLCONFIG_PATH
|
||||
exit 1
|
||||
fi
|
||||
permissions:
|
||||
contents: read
|
||||
packages: read
|
||||
|
||||
env:
|
||||
CODEQL_ACTION_TEST_MODE: true
|
||||
|
|
|
|||
2
.github/workflows/__packaging-codescanning-config-inputs-js.yml
generated
vendored
2
.github/workflows/__packaging-codescanning-config-inputs-js.yml
generated
vendored
|
|
@ -57,7 +57,7 @@ jobs:
|
|||
- uses: ./../action/init
|
||||
with:
|
||||
config-file: .github/codeql/codeql-config-packaging3.yml
|
||||
packs: +dsp-testing/codeql-pack1@1.0.0
|
||||
packs: +codeql-testing/codeql-pack1@1.0.0
|
||||
languages: javascript
|
||||
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
||||
- name: Build code
|
||||
|
|
|
|||
2
.github/workflows/__packaging-config-inputs-js.yml
generated
vendored
2
.github/workflows/__packaging-config-inputs-js.yml
generated
vendored
|
|
@ -57,7 +57,7 @@ jobs:
|
|||
- uses: ./../action/init
|
||||
with:
|
||||
config-file: .github/codeql/codeql-config-packaging3.yml
|
||||
packs: +dsp-testing/codeql-pack1@1.0.0
|
||||
packs: +codeql-testing/codeql-pack1@1.0.0
|
||||
languages: javascript
|
||||
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
||||
- name: Build code
|
||||
|
|
|
|||
2
.github/workflows/__packaging-inputs-js.yml
generated
vendored
2
.github/workflows/__packaging-inputs-js.yml
generated
vendored
|
|
@ -58,7 +58,7 @@ jobs:
|
|||
with:
|
||||
config-file: .github/codeql/codeql-config-packaging2.yml
|
||||
languages: javascript
|
||||
packs: dsp-testing/codeql-pack1@1.0.0, dsp-testing/codeql-pack2, dsp-testing/codeql-pack3:other-query.ql
|
||||
packs: codeql-testing/codeql-pack1@1.0.0, codeql-testing/codeql-pack2, codeql-testing/codeql-pack3:other-query.ql
|
||||
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
||||
- name: Build code
|
||||
shell: bash
|
||||
|
|
|
|||
2
.github/workflows/__split-workflow.yml
generated
vendored
2
.github/workflows/__split-workflow.yml
generated
vendored
|
|
@ -51,7 +51,7 @@ jobs:
|
|||
- uses: ./../action/init
|
||||
with:
|
||||
config-file: .github/codeql/codeql-config-packaging3.yml
|
||||
packs: +dsp-testing/codeql-pack1@1.0.0
|
||||
packs: +codeql-testing/codeql-pack1@1.0.0
|
||||
languages: javascript
|
||||
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
||||
- name: Build code
|
||||
|
|
|
|||
18
.github/workflows/codescanning-config-cli.yml
vendored
18
.github/workflows/codescanning-config-cli.yml
vendored
|
|
@ -64,10 +64,10 @@ jobs:
|
|||
with:
|
||||
expected-config-file-contents: |
|
||||
{
|
||||
"packs": ["dsp-testing/codeql-pack1@1.0.0", "dsp-testing/codeql-pack2" ]
|
||||
"packs": ["codeql-testing/codeql-pack1@1.0.0", "codeql-testing/codeql-pack2" ]
|
||||
}
|
||||
languages: javascript
|
||||
packs: dsp-testing/codeql-pack1@1.0.0, dsp-testing/codeql-pack2
|
||||
packs: codeql-testing/codeql-pack1@1.0.0, codeql-testing/codeql-pack2
|
||||
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
||||
|
||||
- name: Packs from input with +
|
||||
|
|
@ -76,10 +76,10 @@ jobs:
|
|||
with:
|
||||
expected-config-file-contents: |
|
||||
{
|
||||
"packs": ["dsp-testing/codeql-pack1@1.0.0", "dsp-testing/codeql-pack2" ]
|
||||
"packs": ["codeql-testing/codeql-pack1@1.0.0", "codeql-testing/codeql-pack2" ]
|
||||
}
|
||||
languages: javascript
|
||||
packs: + dsp-testing/codeql-pack1@1.0.0, dsp-testing/codeql-pack2
|
||||
packs: + codeql-testing/codeql-pack1@1.0.0, codeql-testing/codeql-pack2
|
||||
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
||||
|
||||
- name: Queries from input
|
||||
|
|
@ -113,11 +113,11 @@ jobs:
|
|||
expected-config-file-contents: |
|
||||
{
|
||||
"queries": [{ "uses": "./codeql-qlpacks/complex-javascript-qlpack/show_ifs.ql" }],
|
||||
"packs": ["dsp-testing/codeql-pack1@1.0.0", "dsp-testing/codeql-pack2" ]
|
||||
"packs": ["codeql-testing/codeql-pack1@1.0.0", "codeql-testing/codeql-pack2" ]
|
||||
}
|
||||
languages: javascript
|
||||
queries: + ./codeql-qlpacks/complex-javascript-qlpack/show_ifs.ql
|
||||
packs: + dsp-testing/codeql-pack1@1.0.0, dsp-testing/codeql-pack2
|
||||
packs: + codeql-testing/codeql-pack1@1.0.0, codeql-testing/codeql-pack2
|
||||
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
||||
|
||||
- name: Queries and packs from config
|
||||
|
|
@ -128,7 +128,7 @@ jobs:
|
|||
{
|
||||
"queries": [{ "uses": "./codeql-qlpacks/complex-javascript-qlpack/foo2/show_ifs.ql" }],
|
||||
"packs": {
|
||||
"javascript": ["dsp-testing/codeql-pack1@1.0.0", "dsp-testing/codeql-pack2" ]
|
||||
"javascript": ["codeql-testing/codeql-pack1@1.0.0", "codeql-testing/codeql-pack2" ]
|
||||
}
|
||||
}
|
||||
languages: javascript
|
||||
|
|
@ -161,7 +161,7 @@ jobs:
|
|||
{ "uses": "./codeql-qlpacks/complex-javascript-qlpack/show_ifs.ql" }
|
||||
],
|
||||
"packs": {
|
||||
"javascript": ["dsp-testing/codeql-pack1@1.0.0", "dsp-testing/codeql-pack2", "codeql/javascript-queries" ]
|
||||
"javascript": ["codeql-testing/codeql-pack1@1.0.0", "codeql-testing/codeql-pack2", "codeql/javascript-queries" ]
|
||||
}
|
||||
}
|
||||
languages: javascript
|
||||
|
|
@ -177,7 +177,7 @@ jobs:
|
|||
expected-config-file-contents: |
|
||||
{
|
||||
"packs": {
|
||||
"javascript": ["dsp-testing/codeql-pack1@1.0.0", "dsp-testing/codeql-pack2" ],
|
||||
"javascript": ["codeql-testing/codeql-pack1@1.0.0", "codeql-testing/codeql-pack2" ],
|
||||
"ruby": ["codeql/ruby-queries"]
|
||||
},
|
||||
"queries": [
|
||||
|
|
|
|||
4
lib/codeql.test.js
generated
4
lib/codeql.test.js
generated
|
|
@ -382,11 +382,11 @@ for (const isBundleVersionInUrl of [true, false]) {
|
|||
tagName: "codeql-bundle-20230203",
|
||||
});
|
||||
mockDownloadApi({
|
||||
repo: "dsp-testing/codeql-cli-nightlies",
|
||||
repo: "codeql-testing/codeql-cli-nightlies",
|
||||
platformSpecific: false,
|
||||
tagName: "codeql-bundle-20230203",
|
||||
});
|
||||
const result = await codeql.setupCodeQL("https://github.com/dsp-testing/codeql-cli-nightlies/releases/download/codeql-bundle-20230203/codeql-bundle.tar.gz", sampleApiDetails, tmpDir, util.GitHubVariant.DOTCOM, SAMPLE_DEFAULT_CLI_VERSION, (0, logging_1.getRunnerLogger)(true), false);
|
||||
const result = await codeql.setupCodeQL("https://github.com/codeql-testing/codeql-cli-nightlies/releases/download/codeql-bundle-20230203/codeql-bundle.tar.gz", sampleApiDetails, tmpDir, util.GitHubVariant.DOTCOM, SAMPLE_DEFAULT_CLI_VERSION, (0, logging_1.getRunnerLogger)(true), false);
|
||||
t.is(result.toolsVersion, "0.0.0-20230203");
|
||||
t.is(result.toolsSource, init_1.ToolsSource.Download);
|
||||
t.true(Number.isInteger(result.toolsDownloadDurationMs));
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
10
lib/config-utils.test.js
generated
10
lib/config-utils.test.js
generated
|
|
@ -1134,7 +1134,7 @@ const calculateAugmentationErrorMacro = ava_1.default.macro({
|
|||
{
|
||||
// no slash
|
||||
url: "http://ghcr.io",
|
||||
packages: ["codeql/*", "dsp-testing/*"],
|
||||
packages: ["codeql/*", "codeql-testing/*"],
|
||||
token: "not-a-token",
|
||||
},
|
||||
{
|
||||
|
|
@ -1200,7 +1200,7 @@ const calculateAugmentationErrorMacro = ava_1.default.macro({
|
|||
const registriesInput = yaml.dump([
|
||||
{
|
||||
url: "http://ghcr.io",
|
||||
packages: ["codeql/*", "dsp-testing/*"],
|
||||
packages: ["codeql/*", "codeql-testing/*"],
|
||||
token: "not-a-token",
|
||||
},
|
||||
{
|
||||
|
|
@ -1227,7 +1227,7 @@ const calculateAugmentationErrorMacro = ava_1.default.macro({
|
|||
const registriesInput = yaml.dump([
|
||||
{
|
||||
// missing url property
|
||||
packages: ["codeql/*", "dsp-testing/*"],
|
||||
packages: ["codeql/*", "codeql-testing/*"],
|
||||
token: "not-a-token",
|
||||
},
|
||||
{
|
||||
|
|
@ -1252,7 +1252,7 @@ const calculateAugmentationErrorMacro = ava_1.default.macro({
|
|||
{
|
||||
// no slash
|
||||
url: "http://ghcr.io",
|
||||
packages: ["codeql/*", "dsp-testing/*"],
|
||||
packages: ["codeql/*", "codeql-testing/*"],
|
||||
token: "not-a-token",
|
||||
},
|
||||
]);
|
||||
|
|
@ -1283,7 +1283,7 @@ const calculateAugmentationErrorMacro = ava_1.default.macro({
|
|||
const registriesInput = yaml.dump([
|
||||
{
|
||||
url: "http://ghcr.io",
|
||||
packages: ["codeql/*", "dsp-testing/*"],
|
||||
packages: ["codeql/*", "codeql-testing/*"],
|
||||
token: "not-a-token",
|
||||
},
|
||||
]);
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -11,6 +11,10 @@ versions: [
|
|||
"nightly-latest",
|
||||
]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
packages: read
|
||||
|
||||
steps:
|
||||
- name: Init with registries
|
||||
uses: ./../action/init
|
||||
|
|
@ -27,8 +31,8 @@ steps:
|
|||
- name: Verify packages installed
|
||||
shell: bash
|
||||
run: |
|
||||
PRIVATE_PACK="$HOME/.codeql/packages/dsp-testing/private-pack"
|
||||
CODEQL_PACK1="$HOME/.codeql/packages/dsp-testing/codeql-pack1"
|
||||
PRIVATE_PACK="$HOME/.codeql/packages/codeql-testing/private-pack"
|
||||
CODEQL_PACK1="$HOME/.codeql/packages/codeql-testing/codeql-pack1"
|
||||
|
||||
if [[ -d $PRIVATE_PACK ]]
|
||||
then
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ steps:
|
|||
- uses: ./../action/init
|
||||
with:
|
||||
config-file: ".github/codeql/codeql-config-packaging3.yml"
|
||||
packs: +dsp-testing/codeql-pack1@1.0.0
|
||||
packs: +codeql-testing/codeql-pack1@1.0.0
|
||||
languages: javascript
|
||||
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
||||
- name: Build code
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ steps:
|
|||
- uses: ./../action/init
|
||||
with:
|
||||
config-file: ".github/codeql/codeql-config-packaging3.yml"
|
||||
packs: +dsp-testing/codeql-pack1@1.0.0
|
||||
packs: +codeql-testing/codeql-pack1@1.0.0
|
||||
languages: javascript
|
||||
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
||||
- name: Build code
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ steps:
|
|||
with:
|
||||
config-file: ".github/codeql/codeql-config-packaging2.yml"
|
||||
languages: javascript
|
||||
packs: dsp-testing/codeql-pack1@1.0.0, dsp-testing/codeql-pack2, dsp-testing/codeql-pack3:other-query.ql
|
||||
packs: codeql-testing/codeql-pack1@1.0.0, codeql-testing/codeql-pack2, codeql-testing/codeql-pack3:other-query.ql
|
||||
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
||||
- name: Build code
|
||||
shell: bash
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ steps:
|
|||
- uses: ./../action/init
|
||||
with:
|
||||
config-file: ".github/codeql/codeql-config-packaging3.yml"
|
||||
packs: +dsp-testing/codeql-pack1@1.0.0
|
||||
packs: +codeql-testing/codeql-pack1@1.0.0
|
||||
languages: javascript
|
||||
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
||||
- name: Build code
|
||||
|
|
|
|||
|
|
@ -107,8 +107,10 @@ for file in os.listdir('checks'):
|
|||
'name': checkSpecification['name'],
|
||||
'timeout-minutes': 45,
|
||||
'runs-on': '${{ matrix.os }}',
|
||||
'steps': steps
|
||||
'steps': steps,
|
||||
}
|
||||
if 'permissions' in checkSpecification:
|
||||
checkJob['permissions'] = checkSpecification['permissions']
|
||||
|
||||
for key in ["env", "container", "services"]:
|
||||
if key in checkSpecification:
|
||||
|
|
|
|||
|
|
@ -554,13 +554,13 @@ test("bundle URL from another repo is cached as 0.0.0-bundleVersion", async (t)
|
|||
tagName: "codeql-bundle-20230203",
|
||||
});
|
||||
mockDownloadApi({
|
||||
repo: "dsp-testing/codeql-cli-nightlies",
|
||||
repo: "codeql-testing/codeql-cli-nightlies",
|
||||
platformSpecific: false,
|
||||
tagName: "codeql-bundle-20230203",
|
||||
});
|
||||
|
||||
const result = await codeql.setupCodeQL(
|
||||
"https://github.com/dsp-testing/codeql-cli-nightlies/releases/download/codeql-bundle-20230203/codeql-bundle.tar.gz",
|
||||
"https://github.com/codeql-testing/codeql-cli-nightlies/releases/download/codeql-bundle-20230203/codeql-bundle.tar.gz",
|
||||
sampleApiDetails,
|
||||
tmpDir,
|
||||
util.GitHubVariant.DOTCOM,
|
||||
|
|
|
|||
|
|
@ -2307,7 +2307,7 @@ test("downloadPacks-with-registries", async (t) => {
|
|||
{
|
||||
// no slash
|
||||
url: "http://ghcr.io",
|
||||
packages: ["codeql/*", "dsp-testing/*"],
|
||||
packages: ["codeql/*", "codeql-testing/*"],
|
||||
token: "not-a-token",
|
||||
},
|
||||
{
|
||||
|
|
@ -2397,7 +2397,7 @@ test("downloadPacks-with-registries fails on 2.10.3", async (t) => {
|
|||
const registriesInput = yaml.dump([
|
||||
{
|
||||
url: "http://ghcr.io",
|
||||
packages: ["codeql/*", "dsp-testing/*"],
|
||||
packages: ["codeql/*", "codeql-testing/*"],
|
||||
token: "not-a-token",
|
||||
},
|
||||
{
|
||||
|
|
@ -2439,7 +2439,7 @@ test("downloadPacks-with-registries fails with invalid registries block", async
|
|||
const registriesInput = yaml.dump([
|
||||
{
|
||||
// missing url property
|
||||
packages: ["codeql/*", "dsp-testing/*"],
|
||||
packages: ["codeql/*", "codeql-testing/*"],
|
||||
token: "not-a-token",
|
||||
},
|
||||
{
|
||||
|
|
@ -2478,7 +2478,7 @@ test("no generateRegistries when CLI is too old", async (t) => {
|
|||
{
|
||||
// no slash
|
||||
url: "http://ghcr.io",
|
||||
packages: ["codeql/*", "dsp-testing/*"],
|
||||
packages: ["codeql/*", "codeql-testing/*"],
|
||||
token: "not-a-token",
|
||||
},
|
||||
]);
|
||||
|
|
@ -2527,7 +2527,7 @@ test("generateRegistries prefers original CODEQL_REGISTRIES_AUTH", async (t) =>
|
|||
const registriesInput = yaml.dump([
|
||||
{
|
||||
url: "http://ghcr.io",
|
||||
packages: ["codeql/*", "dsp-testing/*"],
|
||||
packages: ["codeql/*", "codeql-testing/*"],
|
||||
token: "not-a-token",
|
||||
},
|
||||
]);
|
||||
|
|
|
|||
|
|
@ -3,9 +3,9 @@ name: Pack testing in the CodeQL Action
|
|||
disable-default-queries: true
|
||||
packs:
|
||||
javascript:
|
||||
- dsp-testing/codeql-pack1@1.0.0
|
||||
- dsp-testing/codeql-pack2
|
||||
- dsp-testing/codeql-pack3:other-query.ql
|
||||
- codeql-testing/codeql-pack1@1.0.0
|
||||
- codeql-testing/codeql-pack2
|
||||
- codeql-testing/codeql-pack3:other-query.ql
|
||||
|
||||
paths-ignore:
|
||||
- tests
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@ name: Pack testing in the CodeQL Action
|
|||
disable-default-queries: true
|
||||
packs:
|
||||
javascript:
|
||||
- dsp-testing/codeql-pack2
|
||||
- dsp-testing/codeql-pack3:other-query.ql
|
||||
- codeql-testing/codeql-pack2
|
||||
- codeql-testing/codeql-pack3:other-query.ql
|
||||
paths-ignore:
|
||||
- tests
|
||||
- lib
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ disable-default-queries: true
|
|||
packs:
|
||||
javascript:
|
||||
- codeql/javascript-queries
|
||||
- dsp-testing/codeql-pack1@1.0.0
|
||||
- codeql-testing/codeql-pack1@1.0.0
|
||||
|
||||
query-filters:
|
||||
# This should run js/path-injection and js/zipslip
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ queries:
|
|||
packs:
|
||||
javascript:
|
||||
- codeql/javascript-queries
|
||||
- dsp-testing/codeql-pack1@1.0.0
|
||||
- codeql-testing/codeql-pack1@1.0.0
|
||||
|
||||
query-filters:
|
||||
# This should run js/path-injection and js/zipslip
|
||||
|
|
|
|||
|
|
@ -3,5 +3,5 @@ name: Pack testing in the CodeQL Action
|
|||
disable-default-queries: true
|
||||
packs:
|
||||
javascript:
|
||||
- dsp-testing/private-pack
|
||||
- dsp-testing/codeql-pack1
|
||||
- codeql-testing/private-pack
|
||||
- codeql-testing/codeql-pack1
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
packs:
|
||||
javascript:
|
||||
- dsp-testing/codeql-pack1@1.0.0
|
||||
- dsp-testing/codeql-pack2
|
||||
- codeql-testing/codeql-pack1@1.0.0
|
||||
- codeql-testing/codeql-pack2
|
||||
ruby:
|
||||
- codeql/ruby-queries
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
packs:
|
||||
javascript:
|
||||
- dsp-testing/codeql-pack1@1.0.0
|
||||
- dsp-testing/codeql-pack2
|
||||
- codeql-testing/codeql-pack1@1.0.0
|
||||
- codeql-testing/codeql-pack2
|
||||
|
||||
queries:
|
||||
- uses: ./codeql-qlpacks/complex-javascript-qlpack/foo2/show_ifs.ql
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue