Remove unusued proxy_password input

This commit is contained in:
Marco Gario 2025-01-27 20:10:59 +00:00
parent b494190443
commit e2f043dee4
4 changed files with 1 additions and 33 deletions

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 = [
@ -104,11 +103,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();
@ -165,17 +162,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

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;
@ -107,12 +106,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
@ -181,18 +178,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 }}