mirror of
https://github.com/step-security/harden-runner
synced 2026-08-09 13:11:02 +00:00
Revert "feat(runners): detect AWS CodeBuild-hosted runners as third-party provider"
This reverts commit bf94c00d6b.
This commit is contained in:
Vendored
-2
@@ -31942,8 +31942,6 @@ function detectThirdPartyRunnerProvider() {
|
||||
return "namespace";
|
||||
if (process.env["BITRISE_IO"])
|
||||
return "bitrise";
|
||||
if (process.env["CODEBUILD_RUNNER_TYPE"] === "GITHUB")
|
||||
return "codebuild";
|
||||
const runnerName = (_a = process.env["RUNNER_NAME"]) !== null && _a !== void 0 ? _a : "";
|
||||
if (runnerName.startsWith("warp-"))
|
||||
return "warp";
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
-2
@@ -31948,8 +31948,6 @@ function detectThirdPartyRunnerProvider() {
|
||||
return "namespace";
|
||||
if (process.env["BITRISE_IO"])
|
||||
return "bitrise";
|
||||
if (process.env["CODEBUILD_RUNNER_TYPE"] === "GITHUB")
|
||||
return "codebuild";
|
||||
const runnerName = (_a = process.env["RUNNER_NAME"]) !== null && _a !== void 0 ? _a : "";
|
||||
if (runnerName.startsWith("warp-"))
|
||||
return "warp";
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
-2
@@ -85065,8 +85065,6 @@ function detectThirdPartyRunnerProvider() {
|
||||
return "namespace";
|
||||
if (process.env["BITRISE_IO"])
|
||||
return "bitrise";
|
||||
if (process.env["CODEBUILD_RUNNER_TYPE"] === "GITHUB")
|
||||
return "codebuild";
|
||||
const runnerName = (_a = process.env["RUNNER_NAME"]) !== null && _a !== void 0 ? _a : "";
|
||||
if (runnerName.startsWith("warp-"))
|
||||
return "warp";
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
@@ -99,7 +99,6 @@ describe("detectThirdPartyRunnerProvider", () => {
|
||||
delete process.env.DEPOT_RUNNER;
|
||||
delete process.env.NAMESPACE_GITHUB_RUNTIME;
|
||||
delete process.env.BITRISE_IO;
|
||||
delete process.env.CODEBUILD_RUNNER_TYPE;
|
||||
delete process.env.RUNNER_NAME;
|
||||
});
|
||||
|
||||
@@ -127,16 +126,6 @@ describe("detectThirdPartyRunnerProvider", () => {
|
||||
expect(detectThirdPartyRunnerProvider()).toBe("bitrise");
|
||||
});
|
||||
|
||||
test("returns codebuild when CODEBUILD_RUNNER_TYPE=GITHUB", () => {
|
||||
process.env.CODEBUILD_RUNNER_TYPE = "GITHUB";
|
||||
expect(detectThirdPartyRunnerProvider()).toBe("codebuild");
|
||||
});
|
||||
|
||||
test("returns null when CODEBUILD_RUNNER_TYPE has a non-GITHUB value", () => {
|
||||
process.env.CODEBUILD_RUNNER_TYPE = "OTHER";
|
||||
expect(detectThirdPartyRunnerProvider()).toBeNull();
|
||||
});
|
||||
|
||||
test("returns warp for RUNNER_NAME prefix warp-", () => {
|
||||
process.env.RUNNER_NAME = "warp-4x-x64-abc";
|
||||
expect(detectThirdPartyRunnerProvider()).toBe("warp");
|
||||
|
||||
+1
-2
@@ -59,13 +59,12 @@ export function shouldDeployAgentOnSelfHosted(
|
||||
return deployOnSelfHostedVm && !isContainer && !agentAlreadyInstalled;
|
||||
}
|
||||
|
||||
export type ThirdPartyRunnerProvider = "depot" | "namespace" | "warp" | "blacksmith" | "bitrise" | "codebuild";
|
||||
export type ThirdPartyRunnerProvider = "depot" | "namespace" | "warp" | "blacksmith" | "bitrise";
|
||||
|
||||
export function detectThirdPartyRunnerProvider(): ThirdPartyRunnerProvider | null {
|
||||
if (process.env["DEPOT_RUNNER"] === "1") return "depot";
|
||||
if (process.env["NAMESPACE_GITHUB_RUNTIME"]) return "namespace";
|
||||
if (process.env["BITRISE_IO"]) return "bitrise";
|
||||
if (process.env["CODEBUILD_RUNNER_TYPE"] === "GITHUB") return "codebuild";
|
||||
const runnerName = process.env["RUNNER_NAME"] ?? "";
|
||||
if (runnerName.startsWith("warp-")) return "warp";
|
||||
if (runnerName.startsWith("blacksmith-")) return "blacksmith";
|
||||
|
||||
Reference in New Issue
Block a user