[Security Research] Artifact Poisoning PoC — Non-destructive callback in fork-controlled script#169766
[Security Research] Artifact Poisoning PoC — Non-destructive callback in fork-controlled script#169766rawnly25 wants to merge 6 commits intocockroachdb:masterfrom
Conversation
This commit demonstrates that fork-controlled scripts are executed in the workflow_run privileged context. The injected callback only sends hostname/whoami - no secrets are accessed.
|
Merging to
After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here |
|
Thank you for contributing to CockroachDB. Please ensure you have followed the guidelines for creating a PR. Before a member of our team reviews your PR, I have some potential action items for you:
🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf. |
|
|
This ensures code-cover-gen.yml succeeds so code-cover-publish.yaml triggers.
|
Thank you for updating your pull request. Before a member of our team reviews your PR, I have some potential action items for you:
🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf. |
|
Thank you for updating your pull request. Before a member of our team reviews your PR, I have some potential action items for you:
🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf. |
This ensures: 1) Callback fires before any failure, 2) Artifact uploads, 3) Job succeeds so handler triggers
|
Thank you for updating your pull request. Before a member of our team reviews your PR, I have some potential action items for you:
🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf. |
- Fix continue-on-error placement - Hardcode webhook URL - Add always() on critical steps
|
Thank you for updating your pull request. Before a member of our team reviews your PR, I have some potential action items for you:
🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf. |
|
Thank you for updating your pull request. Before a member of our team reviews your PR, I have some potential action items for you:
🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf. |
Security Research: Artifact Poisoning Proof of Concept
This PR demonstrates a non-destructive security proof of concept for the
workflow_runtrust boundary vulnerability incode-cover-publish.yaml.What this PR does
Adds a harmless
curlcallback (sending onlyhostname+whoami) tobuild/ghactions/pr-codecov-run-tests.shto prove that fork-controlled scripts execute in the CI context when triggered bycode-cover-gen.yml.Why this matters
The
code-cover-publish.yamlworkflow:workflow_runfrom any successfulpull_requestworkflowsecrets.CODECOVER_SERVICE_ACCOUNT_KEY)Impact
An attacker can:
This PoC is non-destructive
hostname,whoami,workflow,run_id— no secrets or tokensSuggested Fix
Add source validation to
code-cover-publish.yaml:And migrate from static service account key to OIDC (Workload Identity Federation).