mirror of
https://github.com/step-security/harden-runner
synced 2026-08-09 13:11:02 +00:00
Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f2f9cdcd95 | ||
|
|
778c6e0671 |
Vendored
+23
-23
@@ -88144,7 +88144,7 @@ var setup_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _ar
|
||||
disable_sudo: lib_core.getBooleanInput("disable-sudo"),
|
||||
disable_file_monitoring: lib_core.getBooleanInput("disable-file-monitoring"),
|
||||
private: ((_b = (_a = github.context === null || github.context === void 0 ? void 0 : github.context.payload) === null || _a === void 0 ? void 0 : _a.repository) === null || _b === void 0 ? void 0 : _b.private) || false,
|
||||
is_github_hosted: isGithubHosted(),
|
||||
is_github_hosted: true,
|
||||
is_debug: lib_core.isDebug(),
|
||||
one_time_key: "",
|
||||
};
|
||||
@@ -88245,29 +88245,29 @@ var setup_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _ar
|
||||
}
|
||||
const runnerName = process.env.RUNNER_NAME || "";
|
||||
lib_core.info(`RUNNER_NAME: ${runnerName}`);
|
||||
if (!isGithubHosted()) {
|
||||
external_fs_.appendFileSync(process.env.GITHUB_STATE, `selfHosted=true${external_os_.EOL}`, {
|
||||
encoding: "utf8",
|
||||
});
|
||||
if (!external_fs_.existsSync("/home/agent/agent")) {
|
||||
lib_core.info(SELF_HOSTED_NO_AGENT_MESSAGE);
|
||||
return;
|
||||
}
|
||||
if (confg.egress_policy === "block") {
|
||||
try {
|
||||
if (process.env.USER) {
|
||||
chownForFolder(process.env.USER, "/home/agent");
|
||||
}
|
||||
const confgStr = JSON.stringify(confg);
|
||||
external_fs_.writeFileSync("/home/agent/block_event.json", confgStr);
|
||||
yield setup_sleep(5000);
|
||||
}
|
||||
catch (error) {
|
||||
lib_core.info(`[!] Unable to write block_event.json: ${error}`);
|
||||
}
|
||||
}
|
||||
/*if (!isGithubHosted()) {
|
||||
fs.appendFileSync(process.env.GITHUB_STATE, `selfHosted=true${EOL}`, {
|
||||
encoding: "utf8",
|
||||
});
|
||||
if (!fs.existsSync("/home/agent/agent")) {
|
||||
core.info(common.SELF_HOSTED_NO_AGENT_MESSAGE);
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (confg.egress_policy === "block") {
|
||||
try {
|
||||
if (process.env.USER) {
|
||||
chownForFolder(process.env.USER, "/home/agent");
|
||||
}
|
||||
|
||||
const confgStr = JSON.stringify(confg);
|
||||
fs.writeFileSync("/home/agent/block_event.json", confgStr);
|
||||
await sleep(5000);
|
||||
} catch (error) {
|
||||
core.info(`[!] Unable to write block_event.json: ${error}`);
|
||||
}
|
||||
}
|
||||
return;
|
||||
}*/
|
||||
let _http = new lib.HttpClient();
|
||||
let statusCode;
|
||||
_http.requestOptions = { socketTimeout: 3 * 1000 };
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
+3
-3
@@ -64,7 +64,7 @@ interface MonitorResponse {
|
||||
disable_sudo: core.getBooleanInput("disable-sudo"),
|
||||
disable_file_monitoring: core.getBooleanInput("disable-file-monitoring"),
|
||||
private: context?.payload?.repository?.private || false,
|
||||
is_github_hosted: isGithubHosted(),
|
||||
is_github_hosted: true,
|
||||
is_debug: core.isDebug(),
|
||||
one_time_key: "",
|
||||
};
|
||||
@@ -208,7 +208,7 @@ interface MonitorResponse {
|
||||
|
||||
const runnerName = process.env.RUNNER_NAME || "";
|
||||
core.info(`RUNNER_NAME: ${runnerName}`);
|
||||
if (!isGithubHosted()) {
|
||||
/*if (!isGithubHosted()) {
|
||||
fs.appendFileSync(process.env.GITHUB_STATE, `selfHosted=true${EOL}`, {
|
||||
encoding: "utf8",
|
||||
});
|
||||
@@ -230,7 +230,7 @@ interface MonitorResponse {
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
}*/
|
||||
|
||||
let _http = new httpm.HttpClient();
|
||||
let statusCode;
|
||||
|
||||
Reference in New Issue
Block a user