Skip to content

fix: harden GitHub Actions workflows#79

Closed
fzipi wants to merge 52 commits intomasterfrom
fix/harden-gha-workflows
Closed

fix: harden GitHub Actions workflows#79
fzipi wants to merge 52 commits intomasterfrom
fix/harden-gha-workflows

Conversation

@fzipi
Copy link
Member

@fzipi fzipi commented Mar 16, 2026

what

  • pin all GitHub Actions to full-length commit SHAs instead of mutable tags
  • add top-level permissions blocks to all workflows

why

  • unpinned actions using tag references (e.g. @v2) are vulnerable to tag mutation attacks where a compromised or malicious upstream can replace the tag to point to different code
  • workflows without explicit permissions inherit the default token permissions, which may be overly broad and violate the principle of least privilege

refs

fgsch and others added 30 commits November 19, 2020 23:08
Some older python versions (e.g. 3.5.2) don't have it.
Signed-off-by: Felipe Zipitria <felipe.zipitria@owasp.org>
feat(py3): apply 2to3 to move away from py2 syntax where needed
continue-on-error will not bubble up the error, so fail for now.
This is only needed in the python 2 case so we don't need to do anything
here.
There are various errors that require a newer version of pytest, which
is incompatible with python2. While we migrate away, limit these tests
to Python 3.9.
Signed-off-by: Felipe Zipitria <felipe.zipitria@owasp.org>
Signed-off-by: Felipe Zipitria <felipe.zipitria@owasp.org>
Signed-off-by: Felipe Zipitria <felipe.zipitria@owasp.org>
Signed-off-by: Felipe Zipitria <felipe.zipitria@owasp.org>
Signed-off-by: Felipe Zipitria <felipe.zipitria@owasp.org>
Signed-off-by: Felipe Zipitria <felipe.zipitria@owasp.org>
Signed-off-by: Felipe Zipitria <felipe.zipitria@owasp.org>
Signed-off-by: Felipe Zipitria <felipe.zipitria@owasp.org>
Signed-off-by: Felipe Zipitria <felipe.zipitria@owasp.org>
Signed-off-by: Felipe Zipitria <felipe.zipitria@owasp.org>
Signed-off-by: Felipe Zipitria <felipe.zipitria@owasp.org>
Signed-off-by: Felipe Zipitria <felipe.zipitria@owasp.org>
Signed-off-by: Felipe Zipitria <felipe.zipitria@owasp.org>
Rearrange imports and minor polish
Felipe Zipitria and others added 22 commits November 26, 2020 18:38
Signed-off-by: Felipe Zipitria <fzipitria@perceptyx.com>
feat(pypi): adds publishing using twine
Signed-off-by: Felipe Zipitria <felipe.zipitria@owasp.org>
fix(encoding): remove encoding for base64 encoded request
Signed-off-by: Felipe Zipitria <felipe.zipitria@owasp.org>
build: use git tag for version release
Signed-off-by: Felipe Zipitria <felipe.zipitria@owasp.org>
Bumps [pyyaml](https://github.com/yaml/pyyaml) from 4.2b1 to 5.4.
- [Release notes](https://github.com/yaml/pyyaml/releases)
- [Changelog](https://github.com/yaml/pyyaml/blob/master/CHANGES)
- [Commits](https://github.com/yaml/pyyaml/commits/5.4)

Signed-off-by: dependabot[bot] <support@github.com>
…tests

Made tests more reliable, enabled and fixed some tests
Added test build for Python 3.10

Split from PR #66, part 2
Give log checker more information, so it can produce identifiable log markers
- pin all third-party actions to commit SHAs instead of mutable tags
- add explicit minimal permissions blocks to all workflows
@fzipi fzipi force-pushed the fix/harden-gha-workflows branch from 9867da8 to 4996d6d Compare March 16, 2026 16:06
@fzipi fzipi deleted the branch master March 16, 2026 17:48
@fzipi fzipi closed this Mar 16, 2026
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.

3 participants