Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Move to the codeql-testing org #1632

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 6 additions & 2 deletions .github/workflows/__init-with-registries.yml

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

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

2 changes: 1 addition & 1 deletion .github/workflows/__packaging-config-inputs-js.yml

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

2 changes: 1 addition & 1 deletion .github/workflows/__packaging-inputs-js.yml

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

2 changes: 1 addition & 1 deletion .github/workflows/__split-workflow.yml

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

18 changes: 9 additions & 9 deletions .github/workflows/codescanning-config-cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,10 @@ jobs:
with:
expected-config-file-contents: |
{
"packs": ["dsp-testing/[email protected]", "dsp-testing/codeql-pack2" ]
"packs": ["codeql-testing/[email protected]", "codeql-testing/codeql-pack2" ]
}
languages: javascript
packs: dsp-testing/[email protected], dsp-testing/codeql-pack2
packs: codeql-testing/[email protected], codeql-testing/codeql-pack2
tools: ${{ steps.prepare-test.outputs.tools-url }}

- name: Packs from input with +
Expand All @@ -76,10 +76,10 @@ jobs:
with:
expected-config-file-contents: |
{
"packs": ["dsp-testing/[email protected]", "dsp-testing/codeql-pack2" ]
"packs": ["codeql-testing/[email protected]", "codeql-testing/codeql-pack2" ]
}
languages: javascript
packs: + dsp-testing/[email protected], dsp-testing/codeql-pack2
packs: + codeql-testing/[email protected], codeql-testing/codeql-pack2
tools: ${{ steps.prepare-test.outputs.tools-url }}

- name: Queries from input
Expand Down Expand Up @@ -113,11 +113,11 @@ jobs:
expected-config-file-contents: |
{
"queries": [{ "uses": "./codeql-qlpacks/complex-javascript-qlpack/show_ifs.ql" }],
"packs": ["dsp-testing/[email protected]", "dsp-testing/codeql-pack2" ]
"packs": ["codeql-testing/[email protected]", "codeql-testing/codeql-pack2" ]
}
languages: javascript
queries: + ./codeql-qlpacks/complex-javascript-qlpack/show_ifs.ql
packs: + dsp-testing/[email protected], dsp-testing/codeql-pack2
packs: + codeql-testing/[email protected], codeql-testing/codeql-pack2
tools: ${{ steps.prepare-test.outputs.tools-url }}

- name: Queries and packs from config
Expand All @@ -128,7 +128,7 @@ jobs:
{
"queries": [{ "uses": "./codeql-qlpacks/complex-javascript-qlpack/foo2/show_ifs.ql" }],
"packs": {
"javascript": ["dsp-testing/[email protected]", "dsp-testing/codeql-pack2" ]
"javascript": ["codeql-testing/[email protected]", "codeql-testing/codeql-pack2" ]
}
}
languages: javascript
Expand Down Expand Up @@ -161,7 +161,7 @@ jobs:
{ "uses": "./codeql-qlpacks/complex-javascript-qlpack/show_ifs.ql" }
],
"packs": {
"javascript": ["dsp-testing/[email protected]", "dsp-testing/codeql-pack2", "codeql/javascript-queries" ]
"javascript": ["codeql-testing/[email protected]", "codeql-testing/codeql-pack2", "codeql/javascript-queries" ]
}
}
languages: javascript
Expand All @@ -177,7 +177,7 @@ jobs:
expected-config-file-contents: |
{
"packs": {
"javascript": ["dsp-testing/[email protected]", "dsp-testing/codeql-pack2" ],
"javascript": ["codeql-testing/[email protected]", "codeql-testing/codeql-pack2" ],
"ruby": ["codeql/ruby-queries"]
},
"queries": [
Expand Down
4 changes: 2 additions & 2 deletions lib/codeql.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/codeql.test.js.map

Large diffs are not rendered by default.

10 changes: 5 additions & 5 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.

8 changes: 6 additions & 2 deletions pr-checks/checks/init-with-registries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ versions: [
"nightly-latest",
]

permissions:
contents: read
packages: read

steps:
- name: Init with registries
uses: ./../action/init
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ steps:
- uses: ./../action/init
with:
config-file: ".github/codeql/codeql-config-packaging3.yml"
packs: +dsp-testing/[email protected]
packs: +codeql-testing/[email protected]
languages: javascript
tools: ${{ steps.prepare-test.outputs.tools-url }}
- name: Build code
Expand Down
2 changes: 1 addition & 1 deletion pr-checks/checks/packaging-config-inputs-js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ steps:
- uses: ./../action/init
with:
config-file: ".github/codeql/codeql-config-packaging3.yml"
packs: +dsp-testing/[email protected]
packs: +codeql-testing/[email protected]
languages: javascript
tools: ${{ steps.prepare-test.outputs.tools-url }}
- name: Build code
Expand Down
2 changes: 1 addition & 1 deletion pr-checks/checks/packaging-inputs-js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ steps:
with:
config-file: ".github/codeql/codeql-config-packaging2.yml"
languages: javascript
packs: dsp-testing/[email protected], dsp-testing/codeql-pack2, dsp-testing/codeql-pack3:other-query.ql
packs: codeql-testing/[email protected], codeql-testing/codeql-pack2, codeql-testing/codeql-pack3:other-query.ql
tools: ${{ steps.prepare-test.outputs.tools-url }}
- name: Build code
shell: bash
Expand Down
2 changes: 1 addition & 1 deletion pr-checks/checks/split-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ steps:
- uses: ./../action/init
with:
config-file: ".github/codeql/codeql-config-packaging3.yml"
packs: +dsp-testing/[email protected]
packs: +codeql-testing/[email protected]
languages: javascript
tools: ${{ steps.prepare-test.outputs.tools-url }}
- name: Build code
Expand Down
4 changes: 3 additions & 1 deletion pr-checks/sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,10 @@ def writeHeader(checkStream):
'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:
Expand Down
4 changes: 2 additions & 2 deletions src/codeql.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
10 changes: 5 additions & 5 deletions src/config-utils.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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",
},
{
Expand Down Expand Up @@ -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",
},
{
Expand Down Expand Up @@ -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",
},
{
Expand Down Expand Up @@ -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",
},
]);
Expand Down Expand Up @@ -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",
},
]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ name: Pack testing in the CodeQL Action
disable-default-queries: true
packs:
javascript:
- dsp-testing/[email protected]
- dsp-testing/codeql-pack2
- dsp-testing/codeql-pack3:other-query.ql
- codeql-testing/[email protected]
- codeql-testing/codeql-pack2
- codeql-testing/codeql-pack3:other-query.ql

paths-ignore:
- tests
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ disable-default-queries: true
packs:
javascript:
- codeql/javascript-queries
- dsp-testing/[email protected]
- codeql-testing/[email protected]

query-filters:
# This should run js/path-injection and js/zipslip
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ queries:
packs:
javascript:
- codeql/javascript-queries
- dsp-testing/[email protected]
- codeql-testing/[email protected]

query-filters:
# This should run js/path-injection and js/zipslip
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
packs:
javascript:
- dsp-testing/[email protected]
- dsp-testing/codeql-pack2
- codeql-testing/[email protected]
- codeql-testing/codeql-pack2
ruby:
- codeql/ruby-queries

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
packs:
javascript:
- dsp-testing/[email protected]
- dsp-testing/codeql-pack2
- codeql-testing/[email protected]
- codeql-testing/codeql-pack2

queries:
- uses: ./codeql-qlpacks/complex-javascript-qlpack/foo2/show_ifs.ql