Skip to content

Commit ec06b46

Browse files
committed
test(security): add E2E tests for command injection and credential sanitization
Adds two new Brev E2E test suites targeting the vulnerabilities fixed by PR NVIDIA#119 (Telegram bridge command injection) and PR NVIDIA#156 (credential exposure in migration snapshots + blueprint digest bypass). Test suites: - test-telegram-injection.sh: 8 tests covering command substitution, backtick injection, quote-breakout, parameter expansion, process table leaks, and SANDBOX_NAME validation - test-credential-sanitization.sh: 13 tests covering auth-profiles.json deletion, credential field stripping, non-credential preservation, symlink safety, blueprint digest verification, and pattern-based field detection These tests are expected to FAIL on main (unfixed code) and PASS once PR NVIDIA#119 and NVIDIA#156 are merged. Refs: NVIDIA#118, NVIDIA#119, NVIDIA#156, NVIDIA#813
1 parent 4cfc3b3 commit ec06b46

4 files changed

Lines changed: 1263 additions & 0 deletions

File tree

.github/workflows/e2e-brev.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ on:
2222
options:
2323
- full
2424
- credential-sanitization
25+
- telegram-injection
2526
- all
2627
keep_alive:
2728
description: "Keep Brev instance alive after tests (for SSH debugging)"

test/e2e/brev-e2e.test.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,4 +175,14 @@ describe.runIf(hasRequiredVars)("Brev E2E", () => {
175175
},
176176
600_000,
177177
);
178+
179+
it.runIf(TEST_SUITE === "telegram-injection" || TEST_SUITE === "all")(
180+
"telegram bridge injection suite passes on remote VM",
181+
() => {
182+
const output = runRemoteTest("test/e2e/test-telegram-injection.sh");
183+
expect(output).toContain("PASS");
184+
expect(output).not.toMatch(/FAIL:/);
185+
},
186+
600_000,
187+
);
178188
});

0 commit comments

Comments
 (0)