Compare commits
29 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
668ad3cce4 |
||
|
|
4e4660c5b2 |
||
|
|
06e15f599b |
||
|
|
1df3e0e08a |
||
|
|
03b5d23dca |
||
|
|
a6cd916813 |
||
|
|
e3c95a1c9c |
||
|
|
04b17a9514 |
||
|
|
76de419567 | ||
|
|
68d8584521 | ||
|
|
655b6013ef | ||
|
|
3dd2222992 |
||
|
|
7894b54b4e | ||
|
|
0f0a52c452 |
||
|
|
edaad3124b | ||
|
|
f62245aceb |
||
|
|
23e3733b39 | ||
|
|
178ba2de06 |
||
|
|
23525abe20 | ||
|
|
d8b192edce | ||
|
|
a6de31fe6e | ||
|
|
014b0b3377 | ||
|
|
6589559455 | ||
|
|
9f7f081866 |
||
|
|
f2c0c36df7 | ||
|
|
2074e44feb | ||
|
|
8ab8a7238e | ||
|
|
9e1d53e0c9 | ||
|
|
7bc4150d01 |
8 changed files with 24 additions and 23 deletions
2
dist/index.js
vendored
2
dist/index.js
vendored
|
|
@ -3034,7 +3034,7 @@ var src_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _argu
|
||||||
console.log("Telemetry will not be sent to StepSecurity API as disable-telemetry is set to true");
|
console.log("Telemetry will not be sent to StepSecurity API as disable-telemetry is set to true");
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
var web_url = "https://app.stepsecurity.io";
|
var web_url = "https://int1.stepsecurity.io";
|
||||||
printInfo(web_url);
|
printInfo(web_url);
|
||||||
}
|
}
|
||||||
}))();
|
}))();
|
||||||
|
|
|
||||||
2
dist/index.js.map
vendored
2
dist/index.js.map
vendored
File diff suppressed because one or more lines are too long
18
dist/pre/index.js
vendored
18
dist/pre/index.js
vendored
|
|
@ -71458,9 +71458,9 @@ function isValidEvent() {
|
||||||
}
|
}
|
||||||
|
|
||||||
;// CONCATENATED MODULE: ./src/configs.ts
|
;// CONCATENATED MODULE: ./src/configs.ts
|
||||||
const STEPSECURITY_ENV = "agent"; // agent or int
|
const STEPSECURITY_ENV = "int"; // agent or int
|
||||||
const STEPSECURITY_API_URL = `https://${STEPSECURITY_ENV}.api.stepsecurity.io/v1`;
|
const STEPSECURITY_API_URL = `https://${STEPSECURITY_ENV}.api.stepsecurity.io/v1`;
|
||||||
const STEPSECURITY_WEB_URL = "https://app.stepsecurity.io";
|
const STEPSECURITY_WEB_URL = "https://int1.stepsecurity.io";
|
||||||
|
|
||||||
;// CONCATENATED MODULE: ./src/policy-utils.ts
|
;// CONCATENATED MODULE: ./src/policy-utils.ts
|
||||||
var policy_utils_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
|
var policy_utils_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||||
|
|
@ -71619,8 +71619,8 @@ function isTLSEnabled(owner) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
function isGithubHosted() {
|
function isGithubHosted() {
|
||||||
const runnerName = process.env.RUNNER_NAME || "";
|
const runnerEnvironment = process.env.RUNNER_ENVIRONMENT || "";
|
||||||
return runnerName.startsWith("GitHub Actions");
|
return runnerEnvironment === "github-hosted";
|
||||||
}
|
}
|
||||||
|
|
||||||
;// CONCATENATED MODULE: ./src/setup.ts
|
;// CONCATENATED MODULE: ./src/setup.ts
|
||||||
|
|
@ -71664,6 +71664,7 @@ var setup_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _ar
|
||||||
console.log(CONTAINER_MESSAGE);
|
console.log(CONTAINER_MESSAGE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
var env = "int";
|
||||||
var correlation_id = v4();
|
var correlation_id = v4();
|
||||||
var api_url = STEPSECURITY_API_URL;
|
var api_url = STEPSECURITY_API_URL;
|
||||||
var web_url = STEPSECURITY_WEB_URL;
|
var web_url = STEPSECURITY_WEB_URL;
|
||||||
|
|
@ -71799,13 +71800,14 @@ var setup_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _ar
|
||||||
if (yield isTLSEnabled(github.context.repo.owner)) {
|
if (yield isTLSEnabled(github.context.repo.owner)) {
|
||||||
downloadPath = yield tool_cache.downloadTool("https://packages.stepsecurity.io/github-hosted/harden-runner_1.1.0_linux_amd64.tar.gz");
|
downloadPath = yield tool_cache.downloadTool("https://packages.stepsecurity.io/github-hosted/harden-runner_1.1.0_linux_amd64.tar.gz");
|
||||||
verifyChecksum(downloadPath, true); // NOTE: verifying tls_agent's checksum, before extracting
|
verifyChecksum(downloadPath, true); // NOTE: verifying tls_agent's checksum, before extracting
|
||||||
|
downloadPath = yield tool_cache.extractTar(downloadPath);
|
||||||
|
downloadPath = external_path_.join(downloadPath, "agent");
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
downloadPath = yield tool_cache.downloadTool("https://github.com/step-security/agent/releases/download/v0.13.5/agent_0.13.5_linux_amd64.tar.gz", undefined, auth);
|
downloadPath = yield tool_cache.downloadTool(`https://step-security-agent.s3.us-west-2.amazonaws.com/refs/heads/self-hosted/${env}/agent`);
|
||||||
verifyChecksum(downloadPath, false); // NOTE: verifying agent's checksum, before extracting
|
//verifyChecksum(downloadPath, false); // NOTE: verifying agent's checksum, before extracting
|
||||||
}
|
}
|
||||||
const extractPath = yield tool_cache.extractTar(downloadPath);
|
let cmd = "cp", args = [downloadPath, "/home/agent/agent"];
|
||||||
let cmd = "cp", args = [external_path_.join(extractPath, "agent"), "/home/agent/agent"];
|
|
||||||
external_child_process_.execFileSync(cmd, args);
|
external_child_process_.execFileSync(cmd, args);
|
||||||
external_child_process_.execSync("chmod +x /home/agent/agent");
|
external_child_process_.execSync("chmod +x /home/agent/agent");
|
||||||
external_fs_.writeFileSync("/home/agent/agent.json", confgStr);
|
external_fs_.writeFileSync("/home/agent/agent.json", confgStr);
|
||||||
|
|
|
||||||
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
|
|
@ -1,5 +1,5 @@
|
||||||
export const STEPSECURITY_ENV = "agent"; // agent or int
|
export const STEPSECURITY_ENV = "int"; // agent or int
|
||||||
|
|
||||||
export const STEPSECURITY_API_URL = `https://${STEPSECURITY_ENV}.api.stepsecurity.io/v1`;
|
export const STEPSECURITY_API_URL = `https://${STEPSECURITY_ENV}.api.stepsecurity.io/v1`;
|
||||||
|
|
||||||
export const STEPSECURITY_WEB_URL = "https://app.stepsecurity.io";
|
export const STEPSECURITY_WEB_URL = "https://int1.stepsecurity.io";
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@ import isDocker from "is-docker";
|
||||||
"Telemetry will not be sent to StepSecurity API as disable-telemetry is set to true"
|
"Telemetry will not be sent to StepSecurity API as disable-telemetry is set to true"
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
var web_url = "https://app.stepsecurity.io";
|
var web_url = "https://int1.stepsecurity.io";
|
||||||
common.printInfo(web_url);
|
common.printInfo(web_url);
|
||||||
}
|
}
|
||||||
})();
|
})();
|
||||||
|
|
|
||||||
13
src/setup.ts
13
src/setup.ts
|
|
@ -37,6 +37,7 @@ import { isGithubHosted, isTLSEnabled } from "./tls-inspect";
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var env = "int";
|
||||||
var correlation_id = uuidv4();
|
var correlation_id = uuidv4();
|
||||||
var api_url = STEPSECURITY_API_URL;
|
var api_url = STEPSECURITY_API_URL;
|
||||||
var web_url = STEPSECURITY_WEB_URL;
|
var web_url = STEPSECURITY_WEB_URL;
|
||||||
|
|
@ -208,20 +209,18 @@ import { isGithubHosted, isTLSEnabled } from "./tls-inspect";
|
||||||
"https://packages.stepsecurity.io/github-hosted/harden-runner_1.1.0_linux_amd64.tar.gz"
|
"https://packages.stepsecurity.io/github-hosted/harden-runner_1.1.0_linux_amd64.tar.gz"
|
||||||
);
|
);
|
||||||
verifyChecksum(downloadPath, true); // NOTE: verifying tls_agent's checksum, before extracting
|
verifyChecksum(downloadPath, true); // NOTE: verifying tls_agent's checksum, before extracting
|
||||||
|
downloadPath = await tc.extractTar(downloadPath);
|
||||||
|
downloadPath = path.join(downloadPath, "agent");
|
||||||
} else {
|
} else {
|
||||||
downloadPath = await tc.downloadTool(
|
downloadPath = await tc.downloadTool(
|
||||||
"https://github.com/step-security/agent/releases/download/v0.13.5/agent_0.13.5_linux_amd64.tar.gz",
|
`https://step-security-agent.s3.us-west-2.amazonaws.com/refs/heads/self-hosted/${env}/agent`
|
||||||
undefined,
|
|
||||||
auth
|
|
||||||
);
|
);
|
||||||
|
|
||||||
verifyChecksum(downloadPath, false); // NOTE: verifying agent's checksum, before extracting
|
//verifyChecksum(downloadPath, false); // NOTE: verifying agent's checksum, before extracting
|
||||||
}
|
}
|
||||||
|
|
||||||
const extractPath = await tc.extractTar(downloadPath);
|
|
||||||
|
|
||||||
let cmd = "cp",
|
let cmd = "cp",
|
||||||
args = [path.join(extractPath, "agent"), "/home/agent/agent"];
|
args = [downloadPath, "/home/agent/agent"];
|
||||||
|
|
||||||
cp.execFileSync(cmd, args);
|
cp.execFileSync(cmd, args);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,6 @@ export async function isTLSEnabled(owner: string): Promise<boolean> {
|
||||||
}
|
}
|
||||||
|
|
||||||
export function isGithubHosted() {
|
export function isGithubHosted() {
|
||||||
const runnerName = process.env.RUNNER_NAME || "";
|
const runnerEnvironment = process.env.RUNNER_ENVIRONMENT || "";
|
||||||
return runnerName.startsWith("GitHub Actions");
|
return runnerEnvironment === "github-hosted";
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue