Commit 0d20b7c
fix: gate pr-triage secrets on same-repository pull_request_target
Merge #6053
## What the patch does
`pr-triage.yml` in `google/adk-python` runs on `pull_request_target` and mounts `ADK_TRIAGE_AGENT` and `GOOGLE_API_KEY` while the triage agent processes untrusted fork PR content.
This patch adds a fork guard: automated `pull_request_target` runs only when `head.repo.full_name == github.repository`. Maintainers can still trigger via `workflow_dispatch`.
**Pull request:** COLE_SEU_LINK_AQUI
## How it works
- **Before:** CLA-signed fork PR could auto-trigger privileged triage agent with API secrets in environment.
- **After:** External fork PRs no longer auto-run secret-backed triage; `workflow_dispatch` preserved.
## Writing effort
Modest — coordinated `if:` guard in `.github/workflows/pr-triage.yml`.
## Security impact
Compelling proactive hardening: prevents untrusted fork PR content from reaching privileged LLM CI with secrets.
No live exploit was performed. Local trust-boundary simulation only.
## Project scope
`google/adk-python` is OT1 in Google OSS repository tier.
## Relation to prior submissions
Proactive patch; pivots from REPORT-002 OSS VRP GHA class. **This is the security patch PR**, not a duplicate VRP report.
## Diff access
COLE_SEU_LINK_AQUI/files
COPYBARA_INTEGRATE_REVIEW=#6053 from DVHRMNTCBSL:security/pr-analyze-fork-guard 7ec1ef0
PiperOrigin-RevId: 9303156121 parent ea474e6 commit 0d20b7c
1 file changed
Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
16 | 20 | | |
17 | 21 | | |
18 | 22 | | |
| |||
0 commit comments