gha-command-proof validates the GitHub Actions runner command protocol without needing GitHub. It parses workflow commands written to stdout/stderr, validates environment files such as GITHUB_ENV and GITHUB_OUTPUT, redacts registered masks, and emits a text, JSON, or Markdown receipt.
It is built for offline CI runners, action authors, and tools like ci-forge that need to explain whether a local run behaved like a GitHub runner would.
cargo install gha-command-proof --lockedValidate a command stream:
gha-command-proof log .\examples\logs\good.logValidate an environment file:
gha-command-proof env-file --kind env .\examples\env\GITHUB_ENV
gha-command-proof env-file --kind output .\examples\env\GITHUB_OUTPUTValidate a whole step boundary:
gha-command-proof step `
--log .\examples\logs\good.log `
--github-env .\examples\env\GITHUB_ENV `
--github-output .\examples\env\GITHUB_OUTPUTWrite JSON or Markdown receipts:
gha-command-proof log .\examples\logs\good.log --format json --output receipt.json
gha-command-proof step --log .\examples\logs\good.log --format markdown --output receipt.mdWrite a redacted copy of the log:
gha-command-proof log .\examples\logs\good.log --redacted-log-output redacted.log- Modern
::command key=value::dataworkflow commands. - Legacy
##[command key=value]dataworkflow commands still parsed by GitHub runners. - Runner escape mappings for command data and properties.
add-maskredaction, including multiline and whitespace-separated mask candidates.stop-commandssuppression and resume-token validation.- Annotation commands:
notice,warning, anderror. - Group balance for
group/endgroup. - Disabled commands:
set-envandadd-path. - Deprecated commands:
set-outputandsave-state. GITHUB_ENV,GITHUB_OUTPUT, andGITHUB_STATEassignment and heredoc syntax.GITHUB_ENVrestrictions forNODE_OPTIONSand default runner variables.GITHUB_OUTPUTvalues that were previously registered withadd-mask.GITHUB_PATHpath records.GITHUB_STEP_SUMMARYsize limit and redacted summary content.
jobs:
gha-command-proof:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: wildmason/gha-command-proof@v1
with:
mode: step
log: step.log
github-output: github-output.txt
format: markdown
output: gha-command-proof.mdThe action wrapper installs the published crate with cargo install. For air-gapped use, install the binary in your runner image and call the CLI directly.
The CLI exits 0 when there are no failed checks. Warnings do not fail the run unless --strict is passed.
Every run emits a receipt with:
- tool name and version
- checked timestamp
- pass/warn/fail/skip summary
- check list with optional source and line
- parsed command records
- parsed environment-file records
Receipt data is designed to be consumed by offline runners and support-bundle tools. Masked values are redacted before they are rendered.
See docs/spec.md for protocol scope and docs/RULES.md for stable check IDs.
gha-command-proof validates the command channel and file-command protocol. It does not execute workflows, evaluate expressions, resolve actions, run containers, upload artifacts, or emulate GitHub API services.
Licensed under either of:
- Apache License, Version 2.0 (LICENSE-APACHE)
- MIT license (LICENSE-MIT)
at your option.