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
fix: use pull_request_target for agentic CI on fork PRs (#541)
* fix: use pull_request_target for agentic CI on fork PRs
* fix: read recipe files from base branch to prevent prompt injection
Recipe files define the agent's prompt. When using pull_request_target,
the fork's HEAD is checked out, so a malicious fork could craft recipe
files to exfiltrate API secrets via prompt injection. Fix by adding a
second sparse checkout from the base branch for .agents/recipes/ and
reading prompts from there instead of the fork tree.
* fix: align actions/checkout version for base-recipes checkout
Match the base-branch recipe checkout to v6.0.2 (same SHA as the PR
branch checkout) for consistency.
* fix: move expression interpolations to env vars in gate and review jobs
Replace direct ${{ }} interpolation in run: blocks with env vars.
Most values are GitHub-controlled, but github.event.label.name can
contain arbitrary characters and could break shell quoting. Moving
everything to env: is consistent with the injection-hardening pattern
applied in the rest of the workflow.
0 commit comments