inbo / inbo/tutorials

Tutorial on good practices for GitHub actions (Continuous integration)

Open
#360 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

proposal tutorial
Dominant language
HTML
Stars
24
Forks
10
Avg merge
2d 32m
Merged PRs (30d)
2

Description

I recently was warned about a security issue with one of the actions I used (tj-actions/changed-files). The action got hacked and could potentially retrieve tokens from actions logs.

I learned a few lessons from this which are good to share in a tutorial:

  • avoid use of PAT (personal access tokens): GitHub now has short-lived permissions settings which can be used instead
  • always use minimal required permissions (i.e. do not give write access if not needed)
  • only use external actions from trusted sources (possibly a task for IT to set organisation level allowed/not-allowed actions)
  • pinning an action by its version tag is not guaranteed to be safe: a hacker could point it to a different commit; to be safe, pin an action by the full SHA of the commit you want to use

Please leave comments in this thread if you know of other good practices.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the existing tutorials in the repository and current GitHub Actions security guidance. Use the issue's four listed practices as the initial scope, verify them against authoritative sources, and consider the comment thread for additional practices; done means a clear, accurate tutorial covering the agreed guidance.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions
Domain
ci-cd, documentation, security
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.