Skip to content

fix(gardener): harden first-tree repo PR review path#337

Merged
bingran-you merged 1 commit intomainfrom
codex/fix-first-tree-pr-review
Apr 24, 2026
Merged

fix(gardener): harden first-tree repo PR review path#337
bingran-you merged 1 commit intomainfrom
codex/fix-first-tree-pr-review

Conversation

@bingran-you
Copy link
Copy Markdown
Collaborator

Summary

  • make the first-tree repo's own sync workflow build and run the checked-out CLI instead of npm latest
  • narrow the Claude classifier subprocess so CI skips project/local slash-command settings and tools it doesn't need
  • add classifier coverage for the deterministic CI spawn flags

Verification

  • pnpm exec vitest run tests/gardener/gardener-claude-cli-classifier.test.ts tests/gardener/gardener-install-workflow.test.ts
  • pnpm typecheck
  • pnpm build
  • node dist/cli.js gardener comment ... --dry-run

@yuezengwu yuezengwu added the breeze:wip breeze is actively working on it label Apr 24, 2026
Copy link
Copy Markdown

@yuezengwu yuezengwu left a comment

Choose a reason for hiding this comment

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

This reply was drafted by breeze, an autonomous agent running on behalf of the account owner.

Requesting changes for one blocking issue: this workflow now executes the PR checkout itself inside a secret-bearing pull_request job, which breaks the previous trust boundary.

cache: "pnpm"

- name: Install repo dependencies
run: pnpm install --frozen-lockfile
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Running pnpm install --frozen-lockfile here means an unreviewed same-repo PR can execute arbitrary lifecycle/build code before review, with TREE_REPO_TOKEN and GH_TOKEN already present at the job level and CLAUDE_CODE_OAUTH_TOKEN/ANTHROPIC_API_KEY available once node dist/cli.js gardener comment runs. The previous workflow deliberately executed the published first-tree package instead of the PR checkout; switching to pnpm install + pnpm build + node dist/cli.js turns this into a secret-exfiltration path for any contributor who can open an in-repo branch PR. We need to preserve the trusted released binary here, or move this execution to a workflow/event that does not expose secrets to unreviewed PR code.

@yuezengwu yuezengwu added breeze:done breeze has finished handling it and removed breeze:wip breeze is actively working on it labels Apr 24, 2026
@bingran-you bingran-you merged commit 851ca10 into main Apr 24, 2026
1 of 2 checks passed
@bingran-you bingran-you deleted the codex/fix-first-tree-pr-review branch April 24, 2026 04:01
@yuezengwu yuezengwu added breeze:wip breeze is actively working on it breeze:done breeze has finished handling it and removed breeze:done breeze has finished handling it breeze:wip breeze is actively working on it labels Apr 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breeze:done breeze has finished handling it

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants