Skip to content

📖 [Docs]: Secure GitHub App token handling patterns documented#63

Open
Marius Storhaug (MariusStorhaug) wants to merge 2 commits into
mainfrom
secure-workflow-best-practices
Open

📖 [Docs]: Secure GitHub App token handling patterns documented#63
Marius Storhaug (MariusStorhaug) wants to merge 2 commits into
mainfrom
secure-workflow-best-practices

Conversation

@MariusStorhaug

Copy link
Copy Markdown
Member

This adds a codified security standard for GitHub App installation token handling in workflows and composite-action usage so teams can apply least-privilege token patterns consistently.

Changed: Secure GitHub App token handling guidance for workflows and composite actions

The GitHub Actions standard now defines when to use github.token, PATs, and GitHub App installation tokens, and sets GitHub App tokens as the default write identity for workflow automation.

It now explicitly states that workflow permissions: only scopes github.token and does not scope app installation tokens, then defines the required controls for minted app tokens: always set repositories: and explicit permission-* inputs, never mint unscoped tokens, prefer step-level token injection, use GH_TOKEN for gh, and prefer environment-based token passing over named token inputs when actions support both.

Examples were added for minimum-scope token minting with actions/create-github-app-token pinned to a full SHA, safe step-level token injection, and safer token passing patterns that reduce debug-log exposure risk.

Technical Details

  • Extended src/docs/Coding-Standards/GitHub-Actions.md with a new GitHub App token section placed after permission-baseline guidance.
  • Added a token-type comparison table and prescriptive rules for installation-token scoping and injection boundaries.
  • Aligned the new guidance with existing standards already present in this page for SHA pinning and explicit secret passing.
Related issues
  • N/A (requested directly as cross-session documentation work)

@MariusStorhaug
Marius Storhaug (MariusStorhaug) marked this pull request as ready for review July 23, 2026 22:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant