Check for is-docker
This commit is contained in:
parent
56008243b5
commit
9a1f78a5a0
5 changed files with 288 additions and 281 deletions
546
package-lock.json
generated
546
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
|
@ -28,6 +28,7 @@
|
|||
"@actions/http-client": "^1.0.11",
|
||||
"@actions/tool-cache": "^1.7.1",
|
||||
"ansi-regex": ">=5.0.1",
|
||||
"is-docker": "^3.0.0",
|
||||
"node-fetch": ">=3.2.0",
|
||||
"uuid": "^8.3.2"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -1,12 +1,19 @@
|
|||
import * as fs from "fs";
|
||||
import * as cp from "child_process";
|
||||
import * as core from "@actions/core";
|
||||
import isDocker from "is-docker";
|
||||
|
||||
(async () => {
|
||||
if (process.platform !== "linux") {
|
||||
console.log("Only runs on linux");
|
||||
return;
|
||||
}
|
||||
if (isDocker()) {
|
||||
console.log(
|
||||
"StepSecurity Harden Runner does not run inside a Docker container"
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
fs.writeFileSync(
|
||||
"/home/agent/post_event.json",
|
||||
|
|
|
|||
|
|
@ -1,11 +1,18 @@
|
|||
import { printInfo } from "./common";
|
||||
import * as core from "@actions/core";
|
||||
import isDocker from "is-docker";
|
||||
|
||||
(async () => {
|
||||
if (process.platform !== "linux") {
|
||||
console.log("Only runs on linux");
|
||||
return;
|
||||
}
|
||||
if (isDocker()) {
|
||||
console.log(
|
||||
"StepSecurity Harden Runner does not run inside a Docker container"
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
if (
|
||||
core.getBooleanInput("disable-telemetry") &&
|
||||
|
|
|
|||
|
|
@ -7,12 +7,20 @@ import { v4 as uuidv4 } from "uuid";
|
|||
import { printInfo } from "./common";
|
||||
import * as tc from "@actions/tool-cache";
|
||||
import { verifyChecksum } from "./checksum";
|
||||
import isDocker from "is-docker";
|
||||
|
||||
(async () => {
|
||||
try {
|
||||
if (process.platform !== "linux") {
|
||||
console.log("Only runs on linux");
|
||||
return;
|
||||
}
|
||||
if (isDocker()) {
|
||||
console.log(
|
||||
"StepSecurity Harden Runner does not run inside a Docker container"
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
var correlation_id = uuidv4();
|
||||
var env = "agent";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue