Repository navigation
Conversation
annotateEgressDestination took the first http(s) URL in a raw command, so an allowlisted URL in a Referer or Origin header, a -e value, a user-agent string or a -d body hid the real destination and the gate allowed it. Match every URL and answer the origin only when all of them agree. Two origins, or any URL the unambiguous-authority test refuses, answer AMBIGUOUS_DESTINATION so the gate denies. A command that carries --resolve, --connect-to, a proxy or unix-socket option, or a proxy environment prefix gets the same sentinel, because those move the connection without naming a second URL. Adds the decoy rows to the curl corpus, unit tests for both classes, and end-to-end denials through the shipped manifest and allowlist. Closes GenAI-Security-Project#470 Signed-off-by: Raghuvar Karthik Durga <177662415+drk-ram@users.noreply.github.com>
drk-ram
requested review from
GangGreenTemperTatum,
afogel,
artmaro,
bar-capsule,
fewdisc,
mamicidal,
rocklambros and
sclintonowasp
as code owners
November 6, 2026 16:23
|
Thanks for this. It is queued rather than ignored. A lead has not reviewed this pull request yet. A lead will read it when they have time, and we can't promise a date. Nothing here is rejected. If a check below fails, please fix it. A pull request that waits a long time may be closed, and you can reopen it later. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
The egress annotator in the AGT Guardian now inspects every URL in a shell command instead of only the first. It answers the origin when all URLs agree, and the unresolvable sentinel when they differ or when the command carries
--resolve,--connect-to, a proxy or unix-socket option, or a proxy environment prefix. An allowlisted decoy in aRefererheader or-evalue no longer hides the real destination.Which issue does this implement
Closes #470
meaning, so it needs no issue
Base branch
integration, because this touches the specification, schemas, a referenceimplementation, an adapter, tests, or CI
main, because every changed path is on the documentation lane allowlist inCONTRIBUTING.md
Type of change
I tested this
uv run pytest -vpasses on my machineuv run mkdocs build --strictpasses on my machineCommands and results, on Windows x64 with Bun 1.4.4 (
ACS_OPA_PATHset):bun test packages/guardian/test/annotate-egress.test.ts: 88 pass, 0 failbun test packages/guardian/test/server.test.ts: the six new end-to-end denial tests pass. One test fails, "strips this repo's absolute root out of a real error message", which this change does not touch (Windows path handling).bun run typecheck: cleanuv run pytest -q: 1200 passed, 10 failed, 20 errors. The failures and errors are symlink, subprocess and timing tests intest_fetch_roadmap,test_overrides,test_pr_intake_workflow,test_publish_schemasandtest_closing_choice, which this Windows machine cannot run. This change touches only TypeScript underreference-implementations/agt.uv run mkdocs build --strict: passesChecklist
git commit -s(required by the DCO)Security
This closes an egress-gate bypass: a command with an allowlisted URL in a header or option value was allowed although the request went to an off-list host. The change only narrows what the annotator allows. It over-blocks any command that carries a URL and a proxy or
--resolvestyle option, which is the direction the module already chooses to fail in.