Skip to main content

Update GitHub Actions configurations to use hashpins, instead of mutable pins, in a Dependabot-compatible way

Project description

gha-hashpinner

Finds mutable pins in GitHub Actions config and replaces them with immutable commit SHAs.

This is a security best practice that protects against supply chain attacks.

The immutable hashpins generated by this tool include version comments which are Dependabot-compatible.

E.g.:

❌ Mutable pins are a bad practice (you might get pwned!):

jobs:
  my-job:
    steps:
      - name: "Checkout"
        uses: "actions/checkout@v4"

✅ This tool will convert them to immutable pins:

jobs:
  my-job:
    steps:
      - name: "Checkout"
        uses: "actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5"  # v4

Install

uv tool install gha-hashpinner

Usage

From a GitHub repository containing GitHub Actions workflows in .github/workflows:

gha-hashpinner .

Or, update a specific workflow file:

gha-hashpinner .github/workflows/my-workflow.yml

Alternatives

Why?

I deeply distrust the NPM ecosystem. The Go package above is not user-friendly to install.

I wanted something I could install with uv tool install.

LLMs plus a dash of review and engineering judgement make it fast and easy to build tools like this.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gha_hashpinner-0.0.1.tar.gz (61.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gha_hashpinner-0.0.1-py3-none-any.whl (12.0 kB view details)

Uploaded Python 3

File details

Details for the file gha_hashpinner-0.0.1.tar.gz.

File metadata

  • Download URL: gha_hashpinner-0.0.1.tar.gz
  • Upload date:
  • Size: 61.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for gha_hashpinner-0.0.1.tar.gz
Algorithm Hash digest
SHA256 9315d41af6faac09c5e457070d594e699bb86600b5745d29f04d9c8de6c16c28
MD5 b7e794c843324a1fa9fab3ae225d7b5a
BLAKE2b-256 6ef0a75cdd0a371460474a7506e8606724b761f36a7864b659e0a1deec3dbeb5

See more details on using hashes here.

Provenance

The following attestation bundles were made for gha_hashpinner-0.0.1.tar.gz:

Publisher: publish.yml on mfisher87/gha-hashpinner

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file gha_hashpinner-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: gha_hashpinner-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 12.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for gha_hashpinner-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7fb0aaacd68f703067b16adbb6f0fabc6a9353e9dbfe24b6fe77875894c1808f
MD5 819e539788149fd87e17c5f29037c814
BLAKE2b-256 3e1aef3246772f72716a9fa39fd3a98ad64ea735a0e2bb3ed657fd9693fd427b

See more details on using hashes here.

Provenance

The following attestation bundles were made for gha_hashpinner-0.0.1-py3-none-any.whl:

Publisher: publish.yml on mfisher87/gha-hashpinner

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page