Skip to content

fix(agt-bridge): refuse a manifest bundle that disables policy - #519

Open
aaronormerod wants to merge 1 commit into
GenAI-Security-Project:integrationfrom
aaronormerod:fix/bridge-bundle-guard
Open

aaronormerod wants to merge 1 commit into
GenAI-Security-Project:integrationfrom
aaronormerod:fix/bridge-bundle-guard

Conversation

@aaronormerod

Copy link
Copy Markdown
Collaborator

What changed

createBridge now reads the manifest and refuses a bundle: with a . or .. segment or a path that is not normalized. Measured with rm -rf / as the step: ./lib, lib/., ./lib/, lib/./, lib/../lib, sub/../lib, ../policy/lib, .//lib, lib// and sub//lib returned allow. . and lib/.. denied every step. lib, lib/, sub/lib and an absolute path are unchanged. A /./ in the manifest path, which the old guard checks, did not disable policy when measured.

Which issue does this implement

Closes #374

Base branch

  • integration, because this touches a reference implementation and tests

Type of change

  • Reference implementation or adapter

I tested this

  • I synced my branch with the base branch before opening this
  • uv run pytest -v passes on my machine
  • uv run mkdocs build --strict passes on my machine

Also bun test in reference-implementations/agt: 1316 pass, 0 fail, 4 skip, on Bun 1.3.11. bun run typecheck passes on Node 20. A Guardian started on bundle: ./lib exits with code 1.

Checklist

  • Commits are signed off with git commit -s (required by the DCO)
  • Prose follows STYLE.md
  • No secrets, tokens, or internal URLs in the diff

Security

  • This change has no security impact

A manifest that allowed destructive steps now stops the bridge at startup.

createBridge checked the manifest path for /./, which did not disable
policy when measured. The bundle: value does. ./lib, lib/., ./lib/,
lib/./, lib/../lib, sub/../lib, ../policy/lib, .//lib, lib// and
sub//lib each answered allow for rm -rf /. . and lib/.. denied every
step. Refuse a bundle with a . or .. segment or a path that is not
normalized. lib, lib/, sub/lib and an absolute path are unchanged.

Closes GenAI-Security-Project#374

Signed-off-by: aaronormerod <137795541+aaronormerod@users.noreply.github.com>
@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown

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.

@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown

This pull request's description says it closes #374, which is on the project roadmap. When it merges, GitHub closes that issue and the roadmap counts it as delivered. Please confirm the change delivers the whole issue before merging.

@acs-board-reconciler acs-board-reconciler Bot moved this from Needs triage to In progress in ACS Project Tracker Nov 7, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status:needs-triage Not yet triaged. Applied by the issue forms

Projects

Status: In progress

Development

Successfully merging this pull request may close these issues.

[Bug] The /./ guard checks the manifest path, so bundle: ./lib silently disables policy

1 participant