mirror of
https://github.com/step-security/harden-runner.git
synced 2026-06-08 03:17:11 +00:00
Add files via upload
This commit is contained in:
parent
fb5f0c4567
commit
6007cf6cf0
2 changed files with 10 additions and 5 deletions
13
dist/pre/index.js
vendored
13
dist/pre/index.js
vendored
|
|
@ -6324,7 +6324,7 @@ var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _argume
|
|||
api_url: api_url,
|
||||
allowed_endpoints: core.getInput("allowed-endpoints"),
|
||||
egress_policy: core.getInput("egress-policy"),
|
||||
send_insights: core.getInput("send-insights"),
|
||||
disable_telemetry: core.getBooleanInput("disable-telemetry"),
|
||||
};
|
||||
if (confg.egress_policy !== "audit" && confg.egress_policy !== "block") {
|
||||
core.setFailed("egress-policy must be either audit or block");
|
||||
|
|
@ -6332,8 +6332,8 @@ var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _argume
|
|||
if (confg.egress_policy === "block" && confg.allowed_endpoints === "") {
|
||||
core.warning("egress-policy is set to block (default) and allowed-endpoints is empty. No outbound traffic will be allowed for job steps.");
|
||||
}
|
||||
if (confg.send_insights !== 'true' && confg.send_insights !== 'false') {
|
||||
core.setFailed("send-insights must be either true or false");
|
||||
if (confg.disable_telemetry !== true && confg.disable_telemetry !== false) {
|
||||
core.setFailed("disable-telemetry must be a boolean value");
|
||||
}
|
||||
const confgStr = JSON.stringify(confg);
|
||||
external_child_process_.execSync("sudo mkdir -p /home/agent");
|
||||
|
|
@ -6343,9 +6343,14 @@ var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _argume
|
|||
verifyChecksum(downloadPath); // NOTE: verifying agent's checksum, before extracting
|
||||
const extractPath = yield tool_cache.extractTar(downloadPath);
|
||||
console.log(`Step Security Job Correlation ID: ${correlation_id}`);
|
||||
if (confg.send_insights === 'true') {
|
||||
if (confg.disable_telemetry === false) {
|
||||
printInfo(web_url);
|
||||
}
|
||||
else {
|
||||
if (confg.egress_policy === "audit") {
|
||||
printInfo(web_url);
|
||||
}
|
||||
}
|
||||
let cmd = "cp", args = [external_path_.join(extractPath, "agent"), "/home/agent/agent"];
|
||||
external_child_process_.execFileSync(cmd, args);
|
||||
external_child_process_.execSync("chmod +x /home/agent/agent");
|
||||
|
|
|
|||
2
dist/pre/index.js.map
vendored
2
dist/pre/index.js.map
vendored
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue