D4: Encrypted Secrets & Variables
GH-200 GitHub Actions exam practice questions · 11 flashcards
Question
Secret scopes?
1 / 11
Tip: Space flips the card, ← / → navigate.
Show all 11 Encrypted Secrets & Variables practice questions and answers
- Secret scopes?Organization, repository, environment.
- Variable scopes?Organization, repository, environment (vars context).
- Accessing secrets in workflows?${{ secrets.NAME }} usually mapped to env.
- Accessing variables?${{ vars.NAME }}.
- Secrets in actions?Pass as inputs or env; actions can't read secrets directly.
- Secrets REST API?Get repo public key, encrypt with libsodium sealed box, PUT /repos/{o}/{r}/actions/secrets/{name}.
- Variables REST API?POST/PATCH /repos/{o}/{r}/actions/variables.
- gh CLI for secrets?gh secret set NAME --body ... --env/--org/--repos.
- Secret naming rules?Alphanumeric/underscore, can't start with GITHUB_ or a number, case-insensitive.
- Variable limits?Up to 1,000 org, 500 repo, 100 environment variables; 48 KB each.
- Scenario: rotate a secret across 200 repos automatically. Approach?Org secret updated via REST API/gh CLI.