mirror of
https://github.com/step-security/harden-runner.git
synced 2026-06-05 22:47:05 +00:00
Update message text
This commit is contained in:
parent
c13871cb18
commit
56662b5676
10 changed files with 39 additions and 25 deletions
6
dist/index.js
vendored
6
dist/index.js
vendored
|
|
@ -1696,6 +1696,8 @@ function printInfo(web_url) {
|
|||
console.log("\x1b[32m%s\x1b[0m", "View security insights and recommended policy at:");
|
||||
console.log(`${web_url}/github/${process.env["GITHUB_REPOSITORY"]}/actions/runs/${process.env["GITHUB_RUN_ID"]}`);
|
||||
}
|
||||
const CONTAINER_MESSAGE = "This job is running in a container. Harden Runner does not run in a container as it needs sudo access to run. This job will not be monitored.";
|
||||
const UBUNTU_MESSAGE = "This job is not running in a GitHub Actions Hosted Runner Ubuntu VM. Harden Runner is only supported on Ubuntu VM. This job will not be monitored.";
|
||||
|
||||
// EXTERNAL MODULE: ./node_modules/@actions/core/lib/core.js
|
||||
var core = __nccwpck_require__(186);
|
||||
|
|
@ -1747,11 +1749,11 @@ var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _argume
|
|||
|
||||
(() => __awaiter(void 0, void 0, void 0, function* () {
|
||||
if (process.platform !== "linux") {
|
||||
console.log("Only runs on linux");
|
||||
console.log(UBUNTU_MESSAGE);
|
||||
return;
|
||||
}
|
||||
if (isDocker()) {
|
||||
console.log("StepSecurity Harden Runner does not run inside a Docker container");
|
||||
console.log(CONTAINER_MESSAGE);
|
||||
return;
|
||||
}
|
||||
if (core.getBooleanInput("disable-telemetry") &&
|
||||
|
|
|
|||
2
dist/index.js.map
vendored
2
dist/index.js.map
vendored
File diff suppressed because one or more lines are too long
13
dist/post/index.js
vendored
13
dist/post/index.js
vendored
|
|
@ -1697,6 +1697,14 @@ var external_fs_ = __nccwpck_require__(747);
|
|||
const external_child_process_namespaceObject = require("child_process");
|
||||
// EXTERNAL MODULE: ./node_modules/@actions/core/lib/core.js
|
||||
var core = __nccwpck_require__(186);
|
||||
;// CONCATENATED MODULE: ./src/common.ts
|
||||
function printInfo(web_url) {
|
||||
console.log("\x1b[32m%s\x1b[0m", "View security insights and recommended policy at:");
|
||||
console.log(`${web_url}/github/${process.env["GITHUB_REPOSITORY"]}/actions/runs/${process.env["GITHUB_RUN_ID"]}`);
|
||||
}
|
||||
const CONTAINER_MESSAGE = "This job is running in a container. Harden Runner does not run in a container as it needs sudo access to run. This job will not be monitored.";
|
||||
const UBUNTU_MESSAGE = "This job is not running in a GitHub Actions Hosted Runner Ubuntu VM. Harden Runner is only supported on Ubuntu VM. This job will not be monitored.";
|
||||
|
||||
;// CONCATENATED MODULE: external "node:fs"
|
||||
const external_node_fs_namespaceObject = require("node:fs");
|
||||
;// CONCATENATED MODULE: ./node_modules/is-docker/index.js
|
||||
|
|
@ -1744,13 +1752,14 @@ var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _argume
|
|||
|
||||
|
||||
|
||||
|
||||
(() => __awaiter(void 0, void 0, void 0, function* () {
|
||||
if (process.platform !== "linux") {
|
||||
console.log("Only runs on linux");
|
||||
console.log(UBUNTU_MESSAGE);
|
||||
return;
|
||||
}
|
||||
if (isDocker()) {
|
||||
console.log("StepSecurity Harden Runner does not run inside a Docker container");
|
||||
console.log(CONTAINER_MESSAGE);
|
||||
return;
|
||||
}
|
||||
external_fs_.writeFileSync("/home/agent/post_event.json", JSON.stringify({ event: "post" }));
|
||||
|
|
|
|||
2
dist/post/index.js.map
vendored
2
dist/post/index.js.map
vendored
File diff suppressed because one or more lines are too long
6
dist/pre/index.js
vendored
6
dist/pre/index.js
vendored
|
|
@ -6258,6 +6258,8 @@ function printInfo(web_url) {
|
|||
console.log("\x1b[32m%s\x1b[0m", "View security insights and recommended policy at:");
|
||||
console.log(`${web_url}/github/${process.env["GITHUB_REPOSITORY"]}/actions/runs/${process.env["GITHUB_RUN_ID"]}`);
|
||||
}
|
||||
const CONTAINER_MESSAGE = "This job is running in a container. Harden Runner does not run in a container as it needs sudo access to run. This job will not be monitored.";
|
||||
const UBUNTU_MESSAGE = "This job is not running in a GitHub Actions Hosted Runner Ubuntu VM. Harden Runner is only supported on Ubuntu VM. This job will not be monitored.";
|
||||
|
||||
// EXTERNAL MODULE: ./node_modules/@actions/tool-cache/lib/tool-cache.js
|
||||
var tool_cache = __nccwpck_require__(7784);
|
||||
|
|
@ -6335,11 +6337,11 @@ var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _argume
|
|||
(() => __awaiter(void 0, void 0, void 0, function* () {
|
||||
try {
|
||||
if (process.platform !== "linux") {
|
||||
console.log("Only runs on linux");
|
||||
console.log(UBUNTU_MESSAGE);
|
||||
return;
|
||||
}
|
||||
if (isDocker()) {
|
||||
console.log("StepSecurity Harden Runner does not run inside a Docker container");
|
||||
console.log(CONTAINER_MESSAGE);
|
||||
return;
|
||||
}
|
||||
var correlation_id = v4();
|
||||
|
|
|
|||
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,17 +1,16 @@
|
|||
import * as fs from "fs";
|
||||
import * as cp from "child_process";
|
||||
import * as core from "@actions/core";
|
||||
import * as common from "./common";
|
||||
import isDocker from "is-docker";
|
||||
|
||||
(async () => {
|
||||
if (process.platform !== "linux") {
|
||||
console.log("Only runs on linux");
|
||||
console.log(common.UBUNTU_MESSAGE);
|
||||
return;
|
||||
}
|
||||
if (isDocker()) {
|
||||
console.log(
|
||||
"StepSecurity Harden Runner does not run inside a Docker container"
|
||||
);
|
||||
console.log(common.CONTAINER_MESSAGE);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -8,3 +8,9 @@ export function printInfo(web_url) {
|
|||
`${web_url}/github/${process.env["GITHUB_REPOSITORY"]}/actions/runs/${process.env["GITHUB_RUN_ID"]}`
|
||||
);
|
||||
}
|
||||
|
||||
export const CONTAINER_MESSAGE =
|
||||
"This job is running in a container. Harden Runner does not run in a container as it needs sudo access to run. This job will not be monitored.";
|
||||
|
||||
export const UBUNTU_MESSAGE =
|
||||
"This job is not running in a GitHub Actions Hosted Runner Ubuntu VM. Harden Runner is only supported on Ubuntu VM. This job will not be monitored.";
|
||||
|
|
|
|||
10
src/index.ts
10
src/index.ts
|
|
@ -1,16 +1,14 @@
|
|||
import { printInfo } from "./common";
|
||||
import * as common from "./common";
|
||||
import * as core from "@actions/core";
|
||||
import isDocker from "is-docker";
|
||||
|
||||
(async () => {
|
||||
if (process.platform !== "linux") {
|
||||
console.log("Only runs on linux");
|
||||
console.log(common.UBUNTU_MESSAGE);
|
||||
return;
|
||||
}
|
||||
if (isDocker()) {
|
||||
console.log(
|
||||
"StepSecurity Harden Runner does not run inside a Docker container"
|
||||
);
|
||||
console.log(common.CONTAINER_MESSAGE);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -23,6 +21,6 @@ import isDocker from "is-docker";
|
|||
);
|
||||
} else {
|
||||
var web_url = "https://app.stepsecurity.io";
|
||||
printInfo(web_url);
|
||||
common.printInfo(web_url);
|
||||
}
|
||||
})();
|
||||
|
|
|
|||
10
src/setup.ts
10
src/setup.ts
|
|
@ -4,7 +4,7 @@ import * as fs from "fs";
|
|||
import * as httpm from "@actions/http-client";
|
||||
import * as path from "path";
|
||||
import { v4 as uuidv4 } from "uuid";
|
||||
import { printInfo } from "./common";
|
||||
import * as common from "./common";
|
||||
import * as tc from "@actions/tool-cache";
|
||||
import { verifyChecksum } from "./checksum";
|
||||
import isDocker from "is-docker";
|
||||
|
|
@ -12,13 +12,11 @@ import isDocker from "is-docker";
|
|||
(async () => {
|
||||
try {
|
||||
if (process.platform !== "linux") {
|
||||
console.log("Only runs on linux");
|
||||
console.log(common.UBUNTU_MESSAGE);
|
||||
return;
|
||||
}
|
||||
if (isDocker()) {
|
||||
console.log(
|
||||
"StepSecurity Harden Runner does not run inside a Docker container"
|
||||
);
|
||||
console.log(common.CONTAINER_MESSAGE);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -84,7 +82,7 @@ import isDocker from "is-docker";
|
|||
console.log(`Step Security Job Correlation ID: ${correlation_id}`);
|
||||
|
||||
if (!confg.disable_telemetry || confg.egress_policy === "audit") {
|
||||
printInfo(web_url);
|
||||
common.printInfo(web_url);
|
||||
}
|
||||
|
||||
let cmd = "cp",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue