A workflow that runs forks with secrets
Review a repository’s GitHub Actions workflows. Find the one that checks out untrusted pull request code under pull_request_target, the secret it exposes, and the unpinned action.
- Terminal mission
- Intermediate
- 3 questions
- 0 of 3 solved
Your goal
Your goalFind the GitHub Actions workflow that runs code from forks with a secret in reach.
pull_request_target runs in the context of the base repository, with its secrets and a write token, even for pull requests from forks. That is safe only if the workflow never runs the fork’s code.
Third-party actions referenced by a branch or tag can change under you. A full commit SHA cannot.
What’s on screen
- Briefing
- the story: what happened and what evidence you were handed.
- Terminal
- the dark box. It is a pretend Linux shell that runs in your browser. Type a command and press Enter. Nothing you type touches a real system.
- Walkthrough
- the numbered path. Each step says what to type and what you should see. Hints open one at a time.
- Answer boxes
- under each question step. Type what you found and press Check.
Words to know
- SHA
- Secure Hash Algorithm, a fingerprint for data
dev-laptop · Supply chain
Type help for the command list and objectives for your tasks. Everything runs in this browser.
Up and down arrows walk your history. Ctrl+L clears the screen. Try help, ls, and objectives.
Read first
More in Supply chain
The whole walkthrough
Every step in order: 298 words, about 2 min. It gives away every answer, so try the steps first.