Semver notation rather than branches or tags is a great solution to this problem. Specify the version that want, let the package manager resolve it, and then periodically update all of your packages. It would also improve build stability.
Semver notation rather than branches or tags is a great solution to this problem. Specify the version that want, let the package manager resolve it, and then periodically update all of your packages. It would also improve build stability.
Use a seperate system for deployments. That system must be hygienic.
This isn't foolproof but would make secrets dumping not too useful. Obviously an attack could still inject crap into your artefact. But you have more time and they need to target you. A general purpose exploit probably won't hurt as much.
your build should always use hashes and not version tags of GHA's
There is some latent concern that most git installations use SHA-1 hashes, as opposed to SHA-256. [0]
Also the trick of creating a branch that happens to be named the same as a revision, which then takes precedence for certain commands.
TIL; yikes! (and thanks)
[0]https://git-scm.com/book/ms/v2/Git-Tools-Signing-Your-Work
In other words: you specify version 44, the attacker creates 44.1, you're still hosed.
All the tags point to commit `^0e58ed8` https://github.com/tj-actions/changed-files/commit/0e58ed867...
uses: actions/checkout@v4
… you can use … uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683So you need to check the action.yml itself to see if it has a sha256 pinned (in the case it uses Docker).