Merge branch 'main' into marcogario/skip_proxy

This commit is contained in:
Marco Gario 2025-01-28 20:48:44 +01:00
commit 76622e7fee
9 changed files with 10 additions and 37 deletions

View file

@ -29,6 +29,7 @@ jobs:
permissions: permissions:
contents: write # needed to create tags and push commits contents: write # needed to create tags and push commits
pull-requests: write
steps: steps:
- name: Dump environment - name: Dump environment

View file

@ -4,6 +4,10 @@ See the [releases page](https://github.com/github/codeql-action/releases) for th
## [UNRELEASED] ## [UNRELEASED]
No user facing changes.
## 3.28.6 - 27 Jan 2025
- Re-enable debug artifact upload for CLI versions 2.20.3 or greater. [#2726](https://github.com/github/codeql-action/pull/2726) - Re-enable debug artifact upload for CLI versions 2.20.3 or greater. [#2726](https://github.com/github/codeql-action/pull/2726)
## 3.28.5 - 24 Jan 2025 ## 3.28.5 - 24 Jan 2025

View file

@ -45,7 +45,6 @@ const util = __importStar(require("./util"));
const UPDATEJOB_PROXY = "update-job-proxy"; const UPDATEJOB_PROXY = "update-job-proxy";
const UPDATEJOB_PROXY_VERSION = "v2.0.20241023203727"; const UPDATEJOB_PROXY_VERSION = "v2.0.20241023203727";
const UPDATEJOB_PROXY_URL_PREFIX = "https://github.com/github/codeql-action/releases/download/codeql-bundle-v2.18.1/"; const UPDATEJOB_PROXY_URL_PREFIX = "https://github.com/github/codeql-action/releases/download/codeql-bundle-v2.18.1/";
const PROXY_USER = "proxy_user";
const KEY_SIZE = 2048; const KEY_SIZE = 2048;
const KEY_EXPIRY_YEARS = 2; const KEY_EXPIRY_YEARS = 2;
const CERT_SUBJECT = [ const CERT_SUBJECT = [
@ -108,11 +107,9 @@ async function runWrapper() {
.map((c) => credentialToStr(c)) .map((c) => credentialToStr(c))
.join("\n")}`); .join("\n")}`);
const ca = generateCertificateAuthority(); const ca = generateCertificateAuthority();
const proxyAuth = getProxyAuth();
const proxyConfig = { const proxyConfig = {
all_credentials: credentials, all_credentials: credentials,
ca, ca,
proxy_auth: proxyAuth,
}; };
// Start the Proxy // Start the Proxy
const proxyBin = await getProxyBinaryPath(); const proxyBin = await getProxyBinaryPath();
@ -169,17 +166,6 @@ async function startProxy(binPath, config, logFilePath, logger) {
core.setFailed(`start-proxy action failed: ${util.getErrorMessage(error)}`); core.setFailed(`start-proxy action failed: ${util.getErrorMessage(error)}`);
} }
} }
// getProxyAuth returns the authentication information for the proxy itself.
function getProxyAuth() {
const proxy_password = actionsUtil.getOptionalInput("proxy_password");
if (proxy_password) {
return {
username: PROXY_USER,
password: proxy_password,
};
}
return;
}
async function getProxyBinaryPath() { async function getProxyBinaryPath() {
const proxyFileName = process.platform === "win32" ? `${UPDATEJOB_PROXY}.exe` : UPDATEJOB_PROXY; const proxyFileName = process.platform === "win32" ? `${UPDATEJOB_PROXY}.exe` : UPDATEJOB_PROXY;
const platform = process.platform === "win32" const platform = process.platform === "win32"

File diff suppressed because one or more lines are too long

2
node_modules/.package-lock.json generated vendored
View file

@ -1,6 +1,6 @@
{ {
"name": "codeql", "name": "codeql",
"version": "3.28.6", "version": "3.28.7",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {

4
package-lock.json generated
View file

@ -1,12 +1,12 @@
{ {
"name": "codeql", "name": "codeql",
"version": "3.28.6", "version": "3.28.7",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "codeql", "name": "codeql",
"version": "3.28.6", "version": "3.28.7",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@actions/artifact": "^2.1.9", "@actions/artifact": "^2.1.9",

View file

@ -1,6 +1,6 @@
{ {
"name": "codeql", "name": "codeql",
"version": "3.28.6", "version": "3.28.7",
"private": true, "private": true,
"description": "CodeQL action", "description": "CodeQL action",
"scripts": { "scripts": {

View file

@ -14,7 +14,6 @@ const UPDATEJOB_PROXY = "update-job-proxy";
const UPDATEJOB_PROXY_VERSION = "v2.0.20241023203727"; const UPDATEJOB_PROXY_VERSION = "v2.0.20241023203727";
const UPDATEJOB_PROXY_URL_PREFIX = const UPDATEJOB_PROXY_URL_PREFIX =
"https://github.com/github/codeql-action/releases/download/codeql-bundle-v2.18.1/"; "https://github.com/github/codeql-action/releases/download/codeql-bundle-v2.18.1/";
const PROXY_USER = "proxy_user";
const KEY_SIZE = 2048; const KEY_SIZE = 2048;
const KEY_EXPIRY_YEARS = 2; const KEY_EXPIRY_YEARS = 2;
@ -113,12 +112,10 @@ async function runWrapper() {
); );
const ca = generateCertificateAuthority(); const ca = generateCertificateAuthority();
const proxyAuth = getProxyAuth();
const proxyConfig: ProxyConfig = { const proxyConfig: ProxyConfig = {
all_credentials: credentials, all_credentials: credentials,
ca, ca,
proxy_auth: proxyAuth,
}; };
// Start the Proxy // Start the Proxy
@ -187,18 +184,6 @@ async function startProxy(
} }
} }
// getProxyAuth returns the authentication information for the proxy itself.
function getProxyAuth(): BasicAuthCredentials | undefined {
const proxy_password = actionsUtil.getOptionalInput("proxy_password");
if (proxy_password) {
return {
username: PROXY_USER,
password: proxy_password,
};
}
return;
}
async function getProxyBinaryPath(): Promise<string> { async function getProxyBinaryPath(): Promise<string> {
const proxyFileName = const proxyFileName =
process.platform === "win32" ? `${UPDATEJOB_PROXY}.exe` : UPDATEJOB_PROXY; process.platform === "win32" ? `${UPDATEJOB_PROXY}.exe` : UPDATEJOB_PROXY;

View file

@ -9,9 +9,6 @@ inputs:
registries_credentials: registries_credentials:
description: Base64 encoded JSON configuration for the URLs and credentials of the package registries description: Base64 encoded JSON configuration for the URLs and credentials of the package registries
required: false required: false
proxy_password:
required: false
description: The password of the proxy
token: token:
description: GitHub token to use for authenticating with this instance of GitHub, used to upload debug artifacts. description: GitHub token to use for authenticating with this instance of GitHub, used to upload debug artifacts.
default: ${{ github.token }} default: ${{ github.token }}