Add link to insights

This commit is contained in:
Varun Sharma 2021-11-08 14:08:01 -08:00
commit 52d3290c79
6 changed files with 15 additions and 4 deletions

2
dist/index.js vendored
View file

@ -18,6 +18,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
console.log("Only runs on linux");
return;
}
var env = "beta";
console.log(`View security insights and recommended policy at https://${env}.stepsecurity.io/github/${process.env["GITHUB_REPOSITORY"]}/actions/runs/${process.env["GITHUB_RUN_ID"]}} after the run has finished`);
}))();

2
dist/index.js.map vendored
View file

@ -1 +1 @@
{"version":3,"file":"index.js","sources":["../webpack://step-security-harden-runner/./src/index.ts","../webpack://step-security-harden-runner/webpack/runtime/compat","../webpack://step-security-harden-runner/webpack/startup"],"sourcesContent":["(async () => {\n if (process.platform !== \"linux\") {\n console.log(\"Only runs on linux\");\n return;\n }\n})();\n","\nif (typeof __webpack_require__ !== 'undefined') __webpack_require__.ab = __dirname + \"/\";","// startup\n// Load entry module and return exports\n// This entry module is referenced by other modules so it can't be inlined\nvar __webpack_exports__ = {};\n__webpack_modules__[144]();\n"],"mappings":";;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;;;A;;;;;ACLA;AACA;;;;ACDA;AACA;AACA;AACA;AACA;;;;A","sourceRoot":""}
{"version":3,"file":"index.js","sources":["../webpack://step-security-harden-runner/./src/index.ts","../webpack://step-security-harden-runner/webpack/runtime/compat","../webpack://step-security-harden-runner/webpack/startup"],"sourcesContent":["(async () => {\n if (process.platform !== \"linux\") {\n console.log(\"Only runs on linux\");\n return;\n }\n\n var env = \"beta\";\n\n console.log(\n `View security insights and recommended policy at https://${env}.stepsecurity.io/github/${process.env[\"GITHUB_REPOSITORY\"]}/actions/runs/${process.env[\"GITHUB_RUN_ID\"]}} after the run has finished`\n );\n})();\n","\nif (typeof __webpack_require__ !== 'undefined') __webpack_require__.ab = __dirname + \"/\";","// startup\n// Load entry module and return exports\n// This entry module is referenced by other modules so it can't be inlined\nvar __webpack_exports__ = {};\n__webpack_modules__[144]();\n"],"mappings":";;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AAEA;AAEA;AAGA;;;A;;;;;ACXA;AACA;;;;ACDA;AACA;AACA;AACA;AACA;;;;A","sourceRoot":""}

2
dist/pre/index.js vendored
View file

@ -2414,8 +2414,8 @@ var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _argume
.on("error", (err) => { })
.on("finish", () => __awaiter(void 0, void 0, void 0, function* () {
filePath.close();
//core.notice(correlation_id, { title: "1234" });
console.log(`Step Security Job Correlation ID: ${correlation_id}`);
console.log(`View security insights and recommended policy at https://${env}.stepsecurity.io/github/${process.env["GITHUB_REPOSITORY"]}/actions/runs/${process.env["GITHUB_RUN_ID"]}} after the run has finished`);
external_child_process_namespaceObject.execSync(`cp ${__dirname}/agent /home/agent/agent`);
external_child_process_namespaceObject.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

@ -3,4 +3,10 @@
console.log("Only runs on linux");
return;
}
var env = "beta";
console.log(
`View security insights and recommended policy at https://${env}.stepsecurity.io/github/${process.env["GITHUB_REPOSITORY"]}/actions/runs/${process.env["GITHUB_RUN_ID"]}} after the run has finished`
);
})();

View file

@ -40,8 +40,11 @@ import { v4 as uuidv4 } from "uuid";
.on("error", (err) => {})
.on("finish", async () => {
filePath.close();
//core.notice(correlation_id, { title: "1234" });
console.log(`Step Security Job Correlation ID: ${correlation_id}`);
console.log(
`View security insights and recommended policy at https://${env}.stepsecurity.io/github/${process.env["GITHUB_REPOSITORY"]}/actions/runs/${process.env["GITHUB_RUN_ID"]}} after the run has finished`
);
cp.execSync(`cp ${__dirname}/agent /home/agent/agent`);
cp.execSync("chmod +x /home/agent/agent");