mirror of
https://github.com/step-security/harden-runner.git
synced 2026-06-08 18:17:06 +00:00
Add files via upload
This commit is contained in:
parent
b40a7693aa
commit
81462a2640
2 changed files with 13 additions and 8 deletions
|
|
@ -7,11 +7,11 @@ import * as core from "@actions/core";
|
|||
return;
|
||||
}
|
||||
|
||||
if (core.getInput("send-insights") === 'true'){
|
||||
if (core.getBooleanInput("disable-telemetry") === true && core.getInput("egress-policy") === "block"){
|
||||
core.warning("Insights will not be sent to StepSecurity API as disable-telemetry is set to true");
|
||||
}
|
||||
else{
|
||||
var web_url = "https://app.stepsecurity.io";
|
||||
printInfo(web_url);
|
||||
}
|
||||
else{
|
||||
core.warning("Insights will not be sent to StepSecurity API as send-insights is set to false");
|
||||
}
|
||||
})();
|
||||
|
|
|
|||
13
src/setup.ts
13
src/setup.ts
|
|
@ -39,7 +39,7 @@ import {verifyChecksum} from "./checksum"
|
|||
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") {
|
||||
|
|
@ -52,8 +52,8 @@ import {verifyChecksum} from "./checksum"
|
|||
);
|
||||
}
|
||||
|
||||
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);
|
||||
|
|
@ -70,9 +70,14 @@ import {verifyChecksum} from "./checksum"
|
|||
|
||||
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 = [path.join(extractPath, "agent"), "/home/agent/agent"];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue