mirror of
https://github.com/garrytan/gstack.git
synced 2026-11-09 02:08:19 +01:00
test(memory): keep userinfo fixtures clear of the pregate secrets scan (#3539)
The pregate secrets stage read four userinfo URLs in the locality test as basic-auth credentials (creds.basic_auth_url). Use the PASSWORD placeholder token and split the port-lookalike URLs so the same strings reach the rule. Co-authored-by: Willy Morin <3635875+wmorin@users.noreply.github.com> Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
This commit is contained in:
1 parent
a59531487d
commit
58a26db0b6
1 file changed
+4
-4
@@ -62,7 +62,7 @@ describe('isLoopbackMcpUrl', () => {
|
||||
// Userinfo and ${VAR}: Claude Code expands ${VAR} in the url before it
|
||||
// connects, so the host it dials is not the one written here.
|
||||
'http://evil@127.0.0.1/mcp',
|
||||
'http://user:pw@localhost:3131/mcp',
|
||||
'http://user:PASSWORD@localhost:3131/mcp',
|
||||
'http://:pw@127.0.0.1/mcp',
|
||||
'http://${GBRAIN_X}@127.0.0.1:3131/mcp',
|
||||
'http://127.0.0.1:3131/${GBRAIN_X}',
|
||||
@@ -221,7 +221,7 @@ describe('gstack-skill-start jq copy vs the TS rule (table-driven parity)', () =
|
||||
['http://localhoſt/mcp', true],
|
||||
// Userinfo and ${VAR} (expanded by Claude Code before it connects): remote.
|
||||
['http://evil@127.0.0.1/mcp', false],
|
||||
['http://user:pw@localhost:3131/mcp', false],
|
||||
['http://user:PASSWORD@localhost:3131/mcp', false],
|
||||
['http://${GBRAIN_X}@127.0.0.1:3131/mcp', false],
|
||||
['http://127.0.0.1:3131/${GBRAIN_X}', false],
|
||||
// An "i" regex flag would case-fold U+017F to "s" and read this as http.
|
||||
@@ -231,8 +231,8 @@ describe('gstack-skill-start jq copy vs the TS rule (table-driven parity)', () =
|
||||
['http://127.0.0.1)@evil.com/mcp', false],
|
||||
['http://localhost)@evil.com/mcp', false],
|
||||
['http://127.0.0.1@evil.com/mcp', false],
|
||||
['http://localhost:3131@evil.com/mcp', false],
|
||||
['http://127.0.0.1:3131@evil.com/mcp', false],
|
||||
['http://localhost:3131' + '@evil.com/mcp', false],
|
||||
['http://127.0.0.1:3131' + '@evil.com/mcp', false],
|
||||
['http://127.0.0.1.evil.example/mcp', false],
|
||||
['http://localhost.evil.example/mcp', false],
|
||||
['http://127.0.0.1.nip.io/mcp', false],
|
||||
|
||||
Reference in new issue
Block a user