Add support for downloading packs from GHES
This change adds:
- new `registries` block allowed in code scanning config file
- new `registries-auth-tokens` input in init action
- Change the downloadPacks function so that it accepts new parameters:
- registries block
- api auth
- Generate a qlconfig.yml file with the registries block if one is
supplied. Use this file when downloading packs.
- temporarily set the `GITHUB_TOKEN` and `CODEQL_REGISTRIES_AUTH` based
on api auth
TODO:
1. integration test
2. handle pack downloads when the config is generated by the CLI
This commit is contained in:
parent
c7bb8946b2
commit
0e98efa2bb
37 changed files with 428 additions and 103 deletions
3
lib/runner.js
generated
3
lib/runner.js
generated
|
|
@ -137,6 +137,7 @@ program
|
|||
externalRepoAuth: auth,
|
||||
url: (0, util_1.parseGitHubUrl)(cmd.githubUrl),
|
||||
apiURL: undefined,
|
||||
registriesAuthTokens: undefined,
|
||||
};
|
||||
const gitHubVersion = await (0, util_1.getGitHubVersion)(apiDetails);
|
||||
(0, util_1.checkGitHubVersionInRange)(gitHubVersion, logger, util_1.Mode.runner);
|
||||
|
|
@ -279,6 +280,7 @@ program
|
|||
auth,
|
||||
url: (0, util_1.parseGitHubUrl)(cmd.githubUrl),
|
||||
apiURL: undefined,
|
||||
registriesAuthTokens: undefined,
|
||||
};
|
||||
const outputDir = cmd.outputDir || path.join(config.tempDir, "codeql-sarif");
|
||||
let initEnv = {};
|
||||
|
|
@ -325,6 +327,7 @@ program
|
|||
auth,
|
||||
url: (0, util_1.parseGitHubUrl)(cmd.githubUrl),
|
||||
apiURL: undefined,
|
||||
registriesAuthTokens: undefined,
|
||||
};
|
||||
try {
|
||||
const gitHubVersion = await (0, util_1.getGitHubVersion)(apiDetails);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue