1
0
Fork 0
mirror of synced 2026-06-05 15:58:19 +00:00

Update int code

This commit is contained in:
Varun Sharma 2024-03-26 17:24:59 -07:00
commit a6cd916813
No known key found for this signature in database
GPG key ID: CE30C1F427CE6272
3 changed files with 5 additions and 6 deletions

4
dist/pre/index.js vendored
View file

@ -71800,13 +71800,13 @@ var setup_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _ar
if (yield isTLSEnabled(github.context.repo.owner)) {
downloadPath = yield tool_cache.downloadTool("https://packages.stepsecurity.io/github-hosted/harden-runner_1.1.0_linux_amd64.tar.gz");
verifyChecksum(downloadPath, true); // NOTE: verifying tls_agent's checksum, before extracting
downloadPath = yield tool_cache.extractTar(downloadPath);
}
else {
downloadPath = yield tool_cache.downloadTool(`https://step-security-agent.s3.us-west-2.amazonaws.com/refs/heads/${env}/agent`);
//verifyChecksum(downloadPath, false); // NOTE: verifying agent's checksum, before extracting
}
const extractPath = yield tool_cache.extractTar(downloadPath);
let cmd = "cp", args = [external_path_.join(extractPath, "agent"), "/home/agent/agent"];
let cmd = "cp", args = [external_path_.join(downloadPath, "agent"), "/home/agent/agent"];
external_child_process_.execFileSync(cmd, args);
external_child_process_.execSync("chmod +x /home/agent/agent");
external_fs_.writeFileSync("/home/agent/agent.json", confgStr);

File diff suppressed because one or more lines are too long

View file

@ -209,6 +209,7 @@ import { isGithubHosted, isTLSEnabled } from "./tls-inspect";
"https://packages.stepsecurity.io/github-hosted/harden-runner_1.1.0_linux_amd64.tar.gz"
);
verifyChecksum(downloadPath, true); // NOTE: verifying tls_agent's checksum, before extracting
downloadPath = await tc.extractTar(downloadPath);
} else {
downloadPath = await tc.downloadTool(
`https://step-security-agent.s3.us-west-2.amazonaws.com/refs/heads/${env}/agent`
@ -217,10 +218,8 @@ import { isGithubHosted, isTLSEnabled } from "./tls-inspect";
//verifyChecksum(downloadPath, false); // NOTE: verifying agent's checksum, before extracting
}
const extractPath = await tc.extractTar(downloadPath);
let cmd = "cp",
args = [path.join(extractPath, "agent"), "/home/agent/agent"];
args = [path.join(downloadPath, "agent"), "/home/agent/agent"];
cp.execFileSync(cmd, args);