actions-hardify

command module
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 31, 2026 License: MIT Imports: 9 Imported by: 0

README

GitHub Actions Hardener

A CLI tool that finds all GitHub Actions workflows in a folder and hardens them.

Installation

go install github.com/richard87/actions-hardify@latest
  • Restrict permissions for GITHUB_TOKEN.
  • Pin actions to a full length commit SHA.
  • list outdated versions, suggest upgrade to newest version
  • Use github api to find versions

Usage

$ export GITHUB_TOKEN=$(gh auth token)
$ actions-hardify                                                 
                      
Found 2 workflow file(s)

+--------------------------------+----------------+-------------+----------+--------+
| FILE                           | LOCATION       | PERMISSIONS | OLD      | NEW    |
+--------------------------------+----------------+-------------+----------+--------+
| .github/workflows/pr.yaml      | build          | ok          | # v6.0.2 | v6.0.2 |
| .github/workflows/pr.yaml      | build          | ok          | # v6.4.0 | v6.4.0 |
| .github/workflows/pr.yaml      | test           | ok          | # v6.0.2 | v6.0.2 |
| .github/workflows/pr.yaml      | test           | ok          | # v6.4.0 | v6.4.0 |
| .github/workflows/pr.yaml      | lint           | ok          | # v6.0.2 | v6.0.2 |
| .github/workflows/pr.yaml      | lint           | ok          | # v6.4.0 | v6.4.0 |
| .github/workflows/pr.yaml      | lint           | ok          | # v9.2.0 | v9.2.0 |
| .github/workflows/release.yaml | release-please | ok          | # v4.4.0 | v4.4.0 |
+--------------------------------+----------------+-------------+----------+--------+

Total: 8 finding(s)

✅ Workflows hardened successfully.

Contributing

See CONTRIBUTING.md for guidelines.

License

This project is licensed under the MIT License.

Acknowledgements

Thanks to Step Security for the inspiration behind this CLI.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL