Skip to content

Commit 03ccff8

Browse files
h0x0erclaude
andcommitted
Remove agent-preinstalled skip for third-party runners
Reverts the skip-install and agentPreinstalled post-step logic from 815e48d, keeping the agent-ebpf v1.9.4 and macOS installer v0.0.9 bumps. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
1 parent 815e48d commit 03ccff8

6 files changed

Lines changed: 2 additions & 25 deletions

File tree

‎dist/post/index.js‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32312,11 +32312,6 @@ process.on("unhandledRejection", (reason) => {
3231232312
if (process.env.STATE_customVMImage === "true") {
3231332313
return;
3231432314
}
32315-
// Agent was already installed; its cleanup is handled by
32316-
// the runner's job hooks.
32317-
if (process.env.STATE_agentPreinstalled === "true") {
32318-
return;
32319-
}
3232032315
if (String(process.env.STATE_monitorStatusCode) ===
3232132316
STATUS_HARDEN_RUNNER_UNAVAILABLE) {
3232232317
console.log(HARDEN_RUNNER_UNAVAILABLE_MESSAGE);

‎dist/post/index.js.map‎

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎dist/pre/index.js‎

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -86214,11 +86214,6 @@ function resolveCacheHost() {
8621486214
lib_core.info(`Detected ${providerLabel} runner on ${process.platform}. HardenRunner is not supported on this third-party provider, skipping install.`);
8621586215
return;
8621686216
}
86217-
if (isAgentInstalled(process.platform)) {
86218-
external_fs_.appendFileSync(process.env.GITHUB_STATE, `agentPreinstalled=true${external_os_.EOL}`, { encoding: "utf8" });
86219-
lib_core.info(`Agent already present on ${providerLabel} runner, skipping installation.`);
86220-
return;
86221-
}
8622286217
lib_core.info(`Detected ${providerLabel} runner environment. Installing agent-bravo.`);
8622386218
confg.correlation_id = runnerName || confg.correlation_id;
8622486219
const ghesSelfHosted = confg.is_ghes && thirdPartyProvider === "codebuild";
@@ -86288,7 +86283,6 @@ function resolveCacheHost() {
8628886283
return;
8628986284
}
8629086285
if (isGithubHosted() && isAgentInstalled(process.platform)) {
86291-
external_fs_.appendFileSync(process.env.GITHUB_STATE, `agentPreinstalled=true${external_os_.EOL}`, { encoding: "utf8" });
8629286286
console.log("Agent already installed, skipping installation");
8629386287
return;
8629486288
}

‎dist/pre/index.js.map‎

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎src/cleanup.ts‎

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,6 @@ process.on("unhandledRejection", (reason) => {
6262
return;
6363
}
6464

65-
// Agent was already installed; its cleanup is handled by
66-
// the runner's job hooks.
67-
if (process.env.STATE_agentPreinstalled === "true") {
68-
return;
69-
}
70-
7165
if (
7266
String(process.env.STATE_monitorStatusCode) ===
7367
common.STATUS_HARDEN_RUNNER_UNAVAILABLE

‎src/setup.ts‎

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -358,11 +358,6 @@ async function resolveCacheHost(): Promise<string | undefined> {
358358
core.info(`Detected ${providerLabel} runner on ${process.platform}. HardenRunner is not supported on this third-party provider, skipping install.`);
359359
return;
360360
}
361-
if (isAgentInstalled(process.platform)) {
362-
fs.appendFileSync(process.env.GITHUB_STATE, `agentPreinstalled=true${EOL}`, { encoding: "utf8" });
363-
core.info(`Agent already present on ${providerLabel} runner, skipping installation.`);
364-
return;
365-
}
366361
core.info(`Detected ${providerLabel} runner environment. Installing agent-bravo.`);
367362
confg.correlation_id = runnerName || confg.correlation_id;
368363
const ghesSelfHosted = confg.is_ghes && thirdPartyProvider === "codebuild";
@@ -438,7 +433,6 @@ async function resolveCacheHost(): Promise<string | undefined> {
438433
}
439434

440435
if (isGithubHosted() && isAgentInstalled(process.platform)) {
441-
fs.appendFileSync(process.env.GITHUB_STATE, `agentPreinstalled=true${EOL}`, { encoding: "utf8" });
442436
console.log("Agent already installed, skipping installation");
443437
return;
444438
}

0 commit comments

Comments
 (0)