You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
intake-triage: give the model a read-only token; move label writes to a model-free job #804
In intake-triage.yml, the job that runs the model (both the key job and, after #803, the subscription job) holds issues: write. That job passes GH_TOKEN: ${{ github.token }} to the run-claude-cli step so the model can run read-only gh queries. The CLI's subprocess environment scrub leaves GitHub tokens in place, so the model's tool calls hold a token that can write to issues. Today only fixed read-only gh rules are allowed under dontAsk, so this is defense in depth.
Proposal
Give the model a read-only token: run the model in a job whose GITHUB_TOKEN has issues: read (and contents: read).
Move the label, comment and Issue Type writes into a downstream job with no model in it. It validates the model job's structured output, received as a job output or a checked artifact, and applies it.
Decision: Split intake triage into read-only model jobs and one model-free apply job. The model gets no gh tools and its leg holds only the Claude credential; a single apply job with needs: [claude, subscription] validates a minimal job output and does every write. Land this first in the intake-triage trust work; fix(intake-triage): pass the model only comments from write-access authors #782 follows it.
The model step passes GH_TOKEN: ${{ github.token }} (:599, :1147). The comment at :589-591 notes the subprocess scrub leaves GitHub tokens in place.
The model's Bash rules allow gh issue view, gh issue list and gh search issues (:510-512, repeated at :1058-1060), and the prompt tells the model to read the issue with gh issue view ... --json title,body,author,labels,comments (:530, :536).
The "Apply the triage" step runs inside each model job (:641 onward, and its copy at :1189 onward), reading the execution file from the local runner.
The status job already joins both legs with needs: [claude, subscription] (:1377-1380).
Model jobs (claude, subscription): permissions at most contents: read and issues: read; job-level cache-mode: none; the run-claude-cli step env holds only the Claude credential (no GH_TOKEN); no Bash(gh ...) rule in the allowed tools.
Because the model loses gh, a script step (no model) fetches what the model reads today and hands it over inside the checkout (the model's reads are confined to the checkout). Pass the title, body and comments as today; fix(intake-triage): pass the model only comments from write-access authors #782 adds the author filter to the comments. Duplicate search also moves to the script step (for example a bounded list of open issue numbers and titles); the implementer picks the bound and states it in the PR.
Each model job exposes a minimal job output: the validated structured fields the apply step needs (labels, type, proposed class, comment text, escalation flag, result subtype, error flag, denial count). Nothing else crosses jobs.
One new apply job, no run-claude-cli step, needs: [claude, subscription], issues: write. It takes the subscription leg's output when that leg ran, otherwise the key leg's, and re-validates every value itself:
labels kept only when they are in the caller's allowlist and exist in the repository;
Issue Type and proposed class checked against the enums it recomputes;
the issue number taken from the event payload (issues event) or the issue-number workflow input, never from model output, as in Anthropic's edit-issue-labels.sh;
all model output dropped on an escalated run (existing rules kept).
Delete the duplicated apply block; one copy remains.
Update the SECURITY MODEL header and the canonical caller block. The caller's grant stays contents: read, issues: write; the reusable workflow narrows it per job.
Neither claude nor subscription grants issues: write; each has at most contents: read and issues: read.
Both model jobs set cache-mode: none.
The run-claude-cli step in both model jobs receives no GH_TOKEN or other GitHub token; the only secret in its env is the Claude credential.
The allowed-tools list in both jobs contains no Bash(gh rule, and the prompt no longer tells the model to run gh.
Exactly one job applies labels, comment, Issue Type and floor; it contains no run-claude-cli step, has needs: [claude, subscription] and holds issues: write.
A test feeds the apply logic a label outside the allowlist, a label that does not exist in the repository, an unknown type and an issue number in the model output; none is applied, and the issue number used is the event's.
A credit-stop run applies the triage exactly once, from the subscription leg (test).
Existing apply tests (node --test .github/scripts/*.test.cjs) pass, and the two model jobs stay step-equal under .github/scripts/intake-triage-legs.test.cjs.
A live run in claude-code-plugins after the repin shows labels, Issue Type and floor applied, linked in the PR.
Sequencing / dependencies: after #744 merges; before #782, which filters the comments this change starts pre-fetching. #806 touches the subscription job's report step; no conflict, but rebase whichever lands second. Related done work: #799, #803.
MEDIUM (single publisher), cache-mode: none: GitHub's dependency caching reference says cache-mode, not token permissions, governs cache access, that workflow_dispatch and schedule runs default to cache write and other triggers to read, and that none removes cache access (changelog). Callers dispatch intake triage, so on those runs the setting closes a live write path; on issues runs it is defence in depth. Prior cache poisoning from an AI triage workflow: Clinejection (the author's attribution of the vector is hedged).
UNVERIFIED: the job-output size limit was not checked; keep the output to the fields listed above.
Activity
fix(run-claude-cli)!: run the subscription leg as its own job (#803)
kyle-sexton commentedon Oct 20, 2026
Agent-ready brief (triaged 2026-10-20)
Decision: Split intake triage into read-only model jobs and one model-free apply job. The model gets no
ghtools and its leg holds only the Claude credential; a single apply job withneeds: [claude, subscription]validates a minimal job output and does every write. Land this first in the intake-triage trust work; fix(intake-triage): pass the model only comments from write-access authors #782 follows it.Current state (origin/main
834f4e1):issues: write:claudeat intake-triage.yml:290-292 andsubscriptionat :838-840.GH_TOKEN: ${{ github.token }}(:599, :1147). The comment at :589-591 notes the subprocess scrub leaves GitHub tokens in place.gh issue view,gh issue listandgh search issues(:510-512, repeated at :1058-1060), and the prompt tells the model to read the issue withgh issue view ... --json title,body,author,labels,comments(:530, :536).statusjob already joins both legs withneeds: [claude, subscription](:1377-1380).cache-mode.e0d8796) is about to merge and changes both apply steps and the SECURITY MODEL header (the lane comment gains aProposed work class:line). Rebase onto main after feat(intake-triage): record the proposed work class on every run #744 merges and move the post-feat(intake-triage): record the proposed work class on every run #744 apply logic, not the version above.Scope:
claude,subscription):permissionsat mostcontents: readandissues: read; job-levelcache-mode: none; the run-claude-cli step env holds only the Claude credential (noGH_TOKEN); noBash(gh ...)rule in the allowed tools.gh, a script step (no model) fetches what the model reads today and hands it over inside the checkout (the model's reads are confined to the checkout). Pass the title, body and comments as today; fix(intake-triage): pass the model only comments from write-access authors #782 adds the author filter to the comments. Duplicate search also moves to the script step (for example a bounded list of open issue numbers and titles); the implementer picks the bound and states it in the PR.needs: [claude, subscription],issues: write. It takes the subscription leg's output when that leg ran, otherwise the key leg's, and re-validates every value itself:issuesevent) or theissue-numberworkflow input, never from model output, as in Anthropic's edit-issue-labels.sh;contents: read,issues: write; the reusable workflow narrows it per job.Out of scope: the comment author filter (fix(intake-triage): pass the model only comments from write-access authors #782); the
fallback-reasontoken (report-lane-outcome: record a key-to-subscription fallback as a lane-record token #806); changes to the author gate or theskippedjob.Acceptance criteria:
claudenorsubscriptiongrantsissues: write; each has at mostcontents: readandissues: read.cache-mode: none.GH_TOKENor other GitHub token; the only secret in its env is the Claude credential.Bash(ghrule, and the prompt no longer tells the model to rungh.needs: [claude, subscription]and holdsissues: write.node --test .github/scripts/*.test.cjs) pass, and the two model jobs stay step-equal under.github/scripts/intake-triage-legs.test.cjs.Sequencing / dependencies: after #744 merges; before #782, which filters the comments this change starts pre-fetching. #806 touches the subscription job's report step; no conflict, but rebase whichever lands second. Related done work: #799, #803.
Evidence:
codexjob, separate write job), OWASP LLM01, CaMeL.cache-mode: none: GitHub's dependency caching reference sayscache-mode, not token permissions, governs cache access, thatworkflow_dispatchandscheduleruns default to cache write and other triggers to read, and thatnoneremoves cache access (changelog). Callers dispatch intake triage, so on those runs the setting closes a live write path; onissuesruns it is defence in depth. Prior cache poisoning from an AI triage workflow: Clinejection (the author's attribution of the vector is hedged).fix(actionlint): ignore the job-level cache-mode key (#822)
fix(intake-triage): pass the model only comments from trusted authors (…
feat(report-lane-outcome): record why a fallback credential ran (#834)