Provisioning of encrypted secrets to runner #2445
Replies: 1 comment 3 replies
-
Based on the docu I would come to the conclusion it is your first point. Based on runner diagnostic logs (Download logs archive) Based on runner diagnostic logs (Download logs archive) and job log if you reference
A step, which leaks all secrets```yaml - run: echo "$ALL_MY_SECRETS" env: ALL_MY_SECRETS: ${{ tojson(secrets) }} ``` |
Beta Was this translation helpful? Give feedback.
-
The doc https://docs.github.com/en/actions/security-guides/encrypted-secrets#using-encrypted-secrets-in-a-workflow is a bit vague about how secrets are provisioned to runners. I'd like to understand better which secrets are exposed to a workflow:
GH scans the workflow to run and unseals the secrets, then launch a request for a runner and gives the decrypted secrets. The runner, as it executes scripts / jobs, uses these secrets where they are referenced, e.g. in env variable and scripts. It's not possible for secrets that are not referenced by the job to be stolen.
The runner initially has no access to secrets. Each time it needs a secrets (e.g., when it parse scripts) it makes a REST API call to GH to get the secret. This means secrets that are not references by a job / workflow can be leaked anyway. From a security perspective, this is worse.
Which one is it? Can we update the documentation with this additional information?
Beta Was this translation helpful? Give feedback.
All reactions