Skip to content

fix: reject invalid subrecipe content - #10994

Merged
DOsinga merged 2 commits into
mainfrom
jbg/security-subrecipe-raw-content
Aug 8, 2026
Merged

fix: reject invalid subrecipe content#10994
DOsinga merged 2 commits into
mainfrom
jbg/security-subrecipe-raw-content

Conversation

@jbg

@jbg jbg commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • reject invalid YAML/JSON subrecipes with a sanitized error instead of returning their raw bytes into Summon context
  • preserve documented absolute and relative references for valid external Recipe files
  • add focused regressions for both invalid secret-bearing content and a valid external child

Addresses https://github.com/project-loupe/audit-goose/issues/93.

Security boundary

A selected parent recipe may reference external recipe files, but an invalid referenced file must not be copied verbatim into provider-visible load output. This keeps valid external Recipe compatibility while removing the raw-content fallback.

Verification

  • bin/cargo fmt
  • bin/cargo test -p goose external_subrecipe_content
  • bin/cargo test -p goose test_template_inheritance
  • bin/cargo build -p goose
  • bin/cargo clippy --all-targets -- -D warnings
  • git diff --check

This finding was discovered by Project Loupe.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ec944e0b91

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread crates/goose/src/agents/platform_extensions/summon.rs
@jbg
jbg requested review from DOsinga and jamadeo August 6, 2026 00:10

@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.

The final diff keeps validation on the provider-visible Summon load path, removes the invalid-subrecipe raw-content disclosure, and preserves templated delegation through the existing render path. The focused regressions cover both sanitized invalid content and valid external recipes. Required checks pass and I found no blocking concerns.

@DOsinga
DOsinga added this pull request to the merge queue Aug 8, 2026
Merged via the queue into main with commit 39733ef Aug 8, 2026
26 checks passed
@DOsinga
DOsinga deleted the jbg/security-subrecipe-raw-content branch August 8, 2026 14:41
michaelneale added a commit that referenced this pull request Aug 9, 2026
* origin/main: (47 commits)
  chore(deps): bump pypa/gh-action-pypi-publish from 1.14.1 to 1.14.2 (#11037)
  chore(deps): bump actions/setup-java from 5.6.0 to 5.7.0 (#11036)
  chore(deps): bump Jimver/cuda-toolkit from 0.2.35 to 0.2.36 (#11035)
  chore(deps-dev): bump js-yaml from 4.3.0 to 4.3.1 in /documentation (#11052)
  chore(deps-dev): bump @types/yauzl from 2.10.3 to 3.4.0 in /ui (#10975)
  chore(deps-dev): bump electron from 41.0.0 to 41.10.3 in /ui (#10969)
  chore(deps): bump brace-expansion from 1.1.16 to 1.1.18 in /documentation (#10947)
  chore(deps-dev): bump postcss from 8.5.8 to 8.5.23 in /ui (#10946)
  chore(deps): bump aiohttp from 3.14.1 to 3.14.3 in /scripts/provider-error-proxy (#10945)
  chore(deps): bump fast-uri from 3.1.4 to 3.1.5 in /documentation (#10944)
  fix: reject invalid subrecipe content (#10994)
  chore(deps): bump azure/login from 3.0.0 to 3.0.1 (#11033)
  chore(deps): bump pnpm/action-setup from 6.0.9 to 6.0.10 (#11034)
  Cache-safe request assembly: append-only turn context and declared cache semantics (#11022)
  Unrolled agent loop (#9574)
  fix: keep turn-context in place for OpenAI Responses-stack models so prompt caching works (#10993)
  fix(developer): byte-bound the shell truncation preview (#10992)
  fix(openrouter): stop silently ignoring thinking effort off (#10991)
  fix: dispatch edited queued messages (#10933)
  fix: contain recipe template paths (#10930)
  ...
lifeizhou-ap added a commit that referenced this pull request Aug 10, 2026
* main:
  fix(streaming): skip metadata-only SSE frames instead of failing the turn (#10942)
  fix(telegram): send responses as rich markdown (#11062)
  fix(acp): send session setup updates after new and fork session responses (#11018)
  fix(ui): remove duplicated brace-expansion keys that break every pnpm install (#11071)
  chore(deps): bump pypa/gh-action-pypi-publish from 1.14.1 to 1.14.2 (#11037)
  chore(deps): bump actions/setup-java from 5.6.0 to 5.7.0 (#11036)
  chore(deps): bump Jimver/cuda-toolkit from 0.2.35 to 0.2.36 (#11035)
  chore(deps-dev): bump js-yaml from 4.3.0 to 4.3.1 in /documentation (#11052)
  chore(deps-dev): bump @types/yauzl from 2.10.3 to 3.4.0 in /ui (#10975)
  chore(deps-dev): bump electron from 41.0.0 to 41.10.3 in /ui (#10969)
  chore(deps): bump brace-expansion from 1.1.16 to 1.1.18 in /documentation (#10947)
  chore(deps-dev): bump postcss from 8.5.8 to 8.5.23 in /ui (#10946)
  chore(deps): bump aiohttp from 3.14.1 to 3.14.3 in /scripts/provider-error-proxy (#10945)
  chore(deps): bump fast-uri from 3.1.4 to 3.1.5 in /documentation (#10944)
  fix: reject invalid subrecipe content (#10994)
  chore(deps): bump azure/login from 3.0.0 to 3.0.1 (#11033)
  chore(deps): bump pnpm/action-setup from 6.0.9 to 6.0.10 (#11034)
  Cache-safe request assembly: append-only turn context and declared cache semantics (#11022)
leanzero-srl pushed a commit to leanzero-srl/goose-local-edition that referenced this pull request Aug 11, 2026
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