Merge pull request #1 from step-security/int

Merge into into main
This commit is contained in:
Varun Sharma 2021-11-08 11:52:33 -08:00 committed by GitHub
commit 2c8c656c23
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 14 additions and 5 deletions

View file

@ -1,5 +1,10 @@
name: 'Step Security Audit Workflow'
description: 'GitHub Actions Runtime Security'
inputs:
allowed-endpoints:
description: 'Allowed endpoints'
required: false
default: ''
runs:
using: 'node12'
pre: 'dist/pre/index.js'

6
dist/pre/index.js vendored
View file

@ -2393,7 +2393,7 @@ var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _argume
return;
}
var correlation_id = v4();
var env = "beta";
var env = "int";
var api_url = `https://${env}.api.stepsecurity.io/v1`;
const confg = {
repo: process.env["GITHUB_REPOSITORY"],
@ -2401,6 +2401,7 @@ var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _argume
correlation_id: correlation_id,
working_directory: process.env["GITHUB_WORKSPACE"],
api_url: api_url,
allowed_endpoints: core.getInput("allowed-endpoints"),
};
const confgStr = JSON.stringify(confg);
external_child_process_namespaceObject.execSync("sudo mkdir -p /home/agent");
@ -2413,7 +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" });
//core.notice(correlation_id, { title: "1234" });
console.log(`Step Security Job Correlation ID: ${correlation_id}`);
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

@ -14,7 +14,7 @@ import { v4 as uuidv4 } from "uuid";
}
var correlation_id = uuidv4();
var env = "beta";
var env = "int";
var api_url = `https://${env}.api.stepsecurity.io/v1`;
const confg = {
@ -23,6 +23,7 @@ import { v4 as uuidv4 } from "uuid";
correlation_id: correlation_id,
working_directory: process.env["GITHUB_WORKSPACE"],
api_url: api_url,
allowed_endpoints: core.getInput("allowed-endpoints"),
};
const confgStr = JSON.stringify(confg);
@ -39,7 +40,8 @@ import { v4 as uuidv4 } from "uuid";
.on("error", (err) => {})
.on("finish", async () => {
filePath.close();
core.notice(correlation_id, { title: "1234" });
//core.notice(correlation_id, { title: "1234" });
console.log(`Step Security Job Correlation ID: ${correlation_id}`);
cp.execSync(`cp ${__dirname}/agent /home/agent/agent`);
cp.execSync("chmod +x /home/agent/agent");