Skip to content

fix(review): contain REVIEW.md discovery - #11367

Merged
jbg merged 1 commit into
mainfrom
jbg/security-review-md-containment
Aug 20, 2026
Merged

jbg merged 1 commit into
mainfrom
jbg/security-review-md-containment

Conversation

@jbg

@jbg jbg commented Aug 19, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • canonicalize repository REVIEW.md candidates before reading them
  • skip symlink targets outside the repository boundary
  • preserve ordinary files and symlinks that resolve within the repository

Security invariant

Repository review instructions may only be loaded from files that resolve inside the repository being reviewed.

Verification

  • bin/cargo fmt --all -- --check
  • bin/cargo test -p goose checks::tests --lib — 21 passed
  • bin/cargo build -p goose
  • bin/cargo clippy -p goose --all-targets -- -D warnings
  • git diff origin/main...HEAD --check

This finding was discovered by Project Loupe

Signed-off-by: Jasper Hugo <jasper@spiral.xyz>

@DOsinga DOsinga left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This correctly enforces the repository boundary before loading REVIEW.md files, while preserving ordinary files and in-repository symlinks. The regression tests cover both root and scoped escaping symlinks and the allowed in-repository case.

@jbg
jbg added this pull request to the merge queue Aug 19, 2026
Merged via the queue into main with commit 760f4d5 Aug 20, 2026
24 checks passed
@jbg
jbg deleted the jbg/security-review-md-containment branch August 20, 2026 02:53
michaelneale added a commit that referenced this pull request Aug 20, 2026
* origin/main:
  fix: bound retry command diagnostics (#11365)
  Disable thinking for tool call labels (#11207)
  fix(review): contain REVIEW.md discovery (#11367)
  fix(acp): preserve tool result audience metadata (#11375)
  test(providers): isolate environment-proxy test in its own binary (#11262)
  fix(security): bind Foundry API keys to request origin (#11347)
  fix: canonicalize mangled tool names before permission inspection (follow-up to #10230) (#10285)
  feat(providers): add Lynkr as a declarative OpenAI-compatible provider (#11372)
  fix: sanitize Pi imported output (#10990)
  fix(otel): honor RUST_LOG directives for logs (#11360)
  feat(skills): add web-search and browser-use built-in skills (#11233)
  feat(dictation): add model-native audio transcription provider (#10589)
  feat(aws_bedrock): route OpenAI GPT-5.6 (sol/terra/luna) via Bedrock … (#10502)
  refactor(goose-local-inference): move mlx deps under macos (#11328)
  feat(providers): add PleumRouter declarative provider (#10479)
jbg added a commit that referenced this pull request Aug 20, 2026
* origin/main: (50 commits)
  chore(deps): bump the ui-minor-and-patch group across 1 directory with 53 updates (#11386)
  fix(security): bound call graph traversal (#11193)
  fix: pin arrayref to known-good commit (#11389)
  feat(providers): add SayGM as declarative OpenAI-compatible provider (#11267)
  feat(providers): custom provider cost fields drive cost tracking (config-declared pricing fallback) (#11220)
  fix(deps): repair dangling syn reference in Cargo.lock (#11385)
  fix(flake): add cudaforge hash for git dependency (#10910)
  feat: auto-focus chat input when user starts typing (#11184)
  fix(security): fail closed on invalid Codex ACP mode (#11362)
  fix(mcp): keep stdio extensions alive across worker exits (#10364)
  feat(ui): collapse scheduled job sessions into accordion in chat history (#11265)
  fix: bound retry command diagnostics (#11365)
  Disable thinking for tool call labels (#11207)
  fix(review): contain REVIEW.md discovery (#11367)
  fix(acp): preserve tool result audience metadata (#11375)
  test(providers): isolate environment-proxy test in its own binary (#11262)
  fix(security): bind Foundry API keys to request origin (#11347)
  fix: canonicalize mangled tool names before permission inspection (follow-up to #10230) (#10285)
  feat(providers): add Lynkr as a declarative OpenAI-compatible provider (#11372)
  fix: sanitize Pi imported output (#10990)
  ...

# Conflicts:
#	crates/goose/src/agents/state_machine/tests/hooks_lifecycle.rs
jbg added a commit that referenced this pull request Aug 20, 2026
* origin/main: (59 commits)
  chore(deps): bump the ui-minor-and-patch group across 1 directory with 53 updates (#11386)
  fix(security): bound call graph traversal (#11193)
  fix: pin arrayref to known-good commit (#11389)
  feat(providers): add SayGM as declarative OpenAI-compatible provider (#11267)
  feat(providers): custom provider cost fields drive cost tracking (config-declared pricing fallback) (#11220)
  fix(deps): repair dangling syn reference in Cargo.lock (#11385)
  fix(flake): add cudaforge hash for git dependency (#10910)
  feat: auto-focus chat input when user starts typing (#11184)
  fix(security): fail closed on invalid Codex ACP mode (#11362)
  fix(mcp): keep stdio extensions alive across worker exits (#10364)
  feat(ui): collapse scheduled job sessions into accordion in chat history (#11265)
  fix: bound retry command diagnostics (#11365)
  Disable thinking for tool call labels (#11207)
  fix(review): contain REVIEW.md discovery (#11367)
  fix(acp): preserve tool result audience metadata (#11375)
  test(providers): isolate environment-proxy test in its own binary (#11262)
  fix(security): bind Foundry API keys to request origin (#11347)
  fix: canonicalize mangled tool names before permission inspection (follow-up to #10230) (#10285)
  feat(providers): add Lynkr as a declarative OpenAI-compatible provider (#11372)
  fix: sanitize Pi imported output (#10990)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants