Skip to content

Commit 82ba90b

Browse files
authored
Merge pull request #1945 from github/henrymercer/authenticate-api-url
Authenticate when downloading CodeQL Bundle from GHES API
2 parents 34f97d7 + 74442e0 commit 82ba90b

File tree

4 files changed

+8
-4
lines changed

4 files changed

+8
-4
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ See the [releases page](https://github.com/github/codeql-action/releases) for th
44

55
## [UNRELEASED]
66

7-
No user facing changes.
7+
- Provide an authentication token when downloading the CodeQL Bundle from the API of a GitHub Enterprise Server instance. [#1945](https://github.com/github/codeql-action/pull/1945)
88

99
## 2.22.2 - 12 Oct 2023
1010

lib/setup-codeql.js

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/setup-codeql.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/setup-codeql.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -546,7 +546,10 @@ export async function downloadCodeQL(
546546
let authorization: string | undefined = undefined;
547547
if (searchParams.has("token")) {
548548
logger.debug("CodeQL tools URL contains an authorization token.");
549-
} else if (codeqlURL.startsWith(`${apiDetails.url}/`)) {
549+
} else if (
550+
codeqlURL.startsWith(`${apiDetails.url}/`) ||
551+
(apiDetails.apiURL && codeqlURL.startsWith(`${apiDetails.apiURL}/`))
552+
) {
550553
logger.debug("Providing an authorization token to download CodeQL tools.");
551554
authorization = `token ${apiDetails.auth}`;
552555
} else {

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy