Add files via upload

This commit is contained in:
arjundashrath 2022-02-10 21:28:10 +05:30 committed by GitHub
commit 81462a2640
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 8 deletions

View file

@ -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");
}
})();

View file

@ -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"];