GHA Cache Auditor
GHA Cache Auditor statically checks GitHub Actions workflows for cache keys and restore prefixes that may reuse incompatible files. It does not run workflows, access GitHub, or modify your repository.
Install
Python 3.11 or newer is required.
uv tool install gha-cache-auditor
Or install it into the active Python environment:
python -m pip install gha-cache-auditor
Quick start
Run the auditor from the repository root:
gha-cache-audit .
For example, this cache key hashes the lockfile but does not distinguish Node.js versions in the matrix:
jobs:
test:
strategy:
matrix:
node: [22, 24]
steps:
- uses: actions/setup-node@v6
with:
node-version: ${{ matrix.node }}
- uses: actions/cache@v4
with:
path: node_modules
key: deps-${{ hashFiles('package-lock.json') }}
The auditor reports that matrix.node is missing from the cache identity. A
safer key for this example is:
key: deps-${{ runner.os }}-${{ matrix.node }}-${{ hashFiles('package-lock.json') }}
What it checks
- GHA-CACHE-001: installed dependencies shared across runtimes or architectures.
- GHA-CACHE-002: installed dependencies shared across operating systems or missing an explicitly configured artifact input.
- GHA-CACHE-003: installed dependencies whose key does not hash the local lockfile or requirements file.
- GHA-CACHE-004: build outputs whose key omits relevant source or configuration inputs.
- GHA-CACHE-005: restore prefixes that omit runtime or platform dimensions used by the primary key.
The default minimum confidence is high. Use --min-confidence medium to
include medium-confidence findings. Choose text, JSON, or SARIF output with
--format text, --format json, or --format sarif.
GitHub Action
Use a release tag in your workflow:
steps:
- uses: actions/checkout@v5
- uses: 0then0/gha-cache-audit@vX.Y.Z
with:
format: sarif
min-confidence: high
Replace vX.Y.Z with a published release tag. The Action returns a nonzero
status when it finds an issue. Its report output points to the generated
report file, which can be uploaded in a following step.
Documentation
- User guide: supported workflows, rule details, configuration, output, and limitations.
- Contributing: development checks, tests, and release process.
Licensed under Apache-2.0; see the LICENSE.
Metadata
Release files for gha-cache-auditor 0.1.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| gha_cache_auditor-0.1.5.tar.gz | 32.4 kB | With provenance | Details for gha_cache_auditor-0.1.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| gha_cache_auditor-0.1.5-py3-none-any.whl | Python 3 | none | any | Details for gha_cache_auditor-0.1.5-py3-none-any.whl |
Total release size: 57.0 kB
Release files / gha_cache_auditor-0.1.5.tar.gz
| Download URL | gha_cache_auditor-0.1.5.tar.gz |
|---|---|
| Size | 32.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5bbc853a10acc09ee2d0222c677f1abc222a305601a649fbf6492b1fb0696f54
|
|
BLAKE2b-256 checksum How to use checksums |
6b25e3cbfab5ba1170a83679c4588ff31ad059a34c7be123c2cb56676879a553
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 27, 2026.
Transparency logRelease files / gha_cache_auditor-0.1.5-py3-none-any.whl
| Download URL | gha_cache_auditor-0.1.5-py3-none-any.whl |
|---|---|
| Size | 24.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3f5904fe49321e657ac356684d5660287cefcbfcf04d67f046605dff4602746f
|
|
BLAKE2b-256 checksum How to use checksums |
1b35a3871d6a7f2331e05eac3d6b808532e9289c00112702f074a21398e3070e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 27, 2026.
Transparency logSecurity for gha-cache-auditor 0.1.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for gha_cache_auditor-0.1.5.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 27, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.