Skip to content

ci: defer privileged recipe scans for forks - #10825

Merged
DOsinga merged 9 commits into
aaif-goose:mainfrom
artiehinz:fix/recipe-scanner-fork-boundary
Jul 30, 2026
Merged

ci: defer privileged recipe scans for forks#10825
DOsinga merged 9 commits into
aaif-goose:mainfrom
artiehinz:fix/recipe-scanner-fork-boundary

Conversation

@artiehinz

@artiehinz artiehinz commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Summary

  • keep the secret-bearing recipe AI scanner limited to branches in aaif-goose/goose;
  • block fork recipe PRs until an approving review of the exact current head is verified from a user with write, maintain, or admin permission; and
  • preserve both the existing required security-scan job context and legacy security-scan/recipe-scanner commit status from an always-running final gate.

Same-repository recipe scan behavior is unchanged. Removed-only recipe changes exit the fork boundary without enforcement.

Why

Fork recipe PRs currently fail before scanning because actions/checkout correctly refuses their head SHA in this pull_request_target workflow. #10780 reproduces the failure.

The scanner later runs goose with the developer extension, outbound network access, passwordless download tooling, OPENAI_API_KEY, and private training-data secrets. The prior #10782 proposal to opt out of checkout protection was therefore unsafe and was withdrawn after review.

This change does not load or process fork-controlled recipe instructions in the privileged job:

  • fork-review-boundary uses GitHub file/review metadata only, requires an authorized approval of the exact current head SHA, fails on any active current-head change request from an authorized reviewer, and otherwise fails with rerun instructions;
  • origin-ai-scan retains the existing scanner implementation but runs only for same-repository branches; and
  • security-scan always runs under the existing required job name, publishes the legacy commit status, and fails unless the applicable dependency succeeds. A skipped privileged scanner therefore cannot satisfy branch protection or leave an approved fork pending.

The fork boundary has only pull-requests: read; getCollaboratorPermissionLevel uses the installation token's implicit metadata read permission. It runs pinned base-branch github-script, performs no checkout, does not read recipe contents, and executes no fork-controlled value. The final result job has only statuses: write.

GitHub's security guidance recommends avoiding fork checkout or other processing of untrusted PR content in pull_request_target:

Testing

  • workflow YAML parsed successfully, including least-privilege and required-context assertions;
  • actionlint v1.7.12 passed;
  • both embedded github-script blocks passed Node syntax checking;
  • a deterministic mocked approval harness passed current-head write approval, stale approval, later changes-requested, read-only reviewer, removed-recipe, and separate authorized approver-plus-blocker cases;
  • a four-case result matrix passed fork/origin success and failure propagation through the required job and legacy status contexts; and
  • git diff --check passed.

Related Issues

Urgent security-workflow repair; no Ready issue. Unblocks #10780 and supersedes the withdrawn #10782 approach.

@artiehinz

Copy link
Copy Markdown
Contributor Author

@codex review

@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: 699e48a795

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread .github/workflows/recipe-security-scanner.yml Outdated
@artiehinz

Copy link
Copy Markdown
Contributor Author

@codex review

@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: c4d85a4792

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread .github/workflows/recipe-security-scanner.yml Outdated
Comment thread .github/workflows/recipe-security-scanner.yml Outdated
@artiehinz

Copy link
Copy Markdown
Contributor Author

@codex review

@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: cc8a60b04e

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread .github/workflows/recipe-security-scanner.yml
@artiehinz

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep it up!

Reviewed commit: 946c83bba3

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@artiehinz

Copy link
Copy Markdown
Contributor Author

@codex review

@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: 946c83bba3

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread .github/workflows/recipe-security-scanner.yml
Comment thread .github/workflows/recipe-security-scanner.yml Outdated
@artiehinz

Copy link
Copy Markdown
Contributor Author

@codex review

@artiehinz

Copy link
Copy Markdown
Contributor Author

@codex review

@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: a7a27c5fd6

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread .github/workflows/recipe-security-scanner.yml
@artiehinz

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🚀

Reviewed commit: a980ca873f

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@DOsinga

DOsinga commented Jul 30, 2026

Copy link
Copy Markdown
Collaborator

to be honest I think we should just drop the entire recipe scanner. we're not really using it and it has been fiddly and security risky from the start. can you do that?

@artiehinz

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Swish!

Reviewed commit: a980ca873f

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@artiehinz

Copy link
Copy Markdown
Contributor Author

@codex review

@artiehinz

Copy link
Copy Markdown
Contributor Author

Sorry! Hope this works! Please let me know if there is anything I should do from my side!

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🚀

Reviewed commit: a980ca873f

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@DOsinga
DOsinga added this pull request to the merge queue Jul 30, 2026
Merged via the queue into aaif-goose:main with commit 022c17c Jul 30, 2026
24 checks passed
lifeizhou-ap added a commit that referenced this pull request Jul 31, 2026
* main:
  fix(desktop): allow removing images when editing user messages (#9979)
  Fetch cursor-agent models from CLI (#10367)
  fix(cerebras): preserve thinking inline for models that reject reasoning_content (#10774)
  perf: make CLI streaming render incremental instead of O(n^2) (#10487)
  Moving to issues as the new PRs (#10818)
  ci: defer privileged recipe scans for forks (#10825)
  docs: adopt issue-first contribution workflow (#10819)
  Add Azure AI Foundry multi-LLM provider (#10622)
  fix(together): parse model list response (#10576)
  docs: remove retired site resources (#10817)
  feat: streaming shell output while commands run (#10808)
lifeizhou-ap added a commit to vincenzopalazzo/goose that referenced this pull request Jul 31, 2026
* main: (224 commits)
  fix(desktop): allow removing images when editing user messages (aaif-goose#9979)
  Fetch cursor-agent models from CLI (aaif-goose#10367)
  fix(cerebras): preserve thinking inline for models that reject reasoning_content (aaif-goose#10774)
  perf: make CLI streaming render incremental instead of O(n^2) (aaif-goose#10487)
  Moving to issues as the new PRs (aaif-goose#10818)
  ci: defer privileged recipe scans for forks (aaif-goose#10825)
  docs: adopt issue-first contribution workflow (aaif-goose#10819)
  Add Azure AI Foundry multi-LLM provider (aaif-goose#10622)
  fix(together): parse model list response (aaif-goose#10576)
  docs: remove retired site resources (aaif-goose#10817)
  feat: streaming shell output while commands run (aaif-goose#10808)
  feat(acp): allow session/new to request a Hidden session via _meta.hidden (aaif-goose#10811)
  chore: removed stale text pnpm workspace (aaif-goose#10809)
  feat(otel): emit GenAI semantic convention attributes (aaif-goose#10700)
  fix: avoid double loading full conversation on session open (aaif-goose#10794)
  feat(providers): forward images and MCP embedded-resource blobs in Anthropic and Google formats (aaif-goose#10340)
  Deprecate and remove ui/text TUI (aaif-goose#10799)
  Upgrade to rmcp 3.0 (aaif-goose#10789)
  fix(release): signing environment (aaif-goose#10797)
  feat(tools): collapse const-union enums in tool schemas (aaif-goose#10577)
  ...
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