RunbookProof
Static analysis for commands embedded in documentation, operational runbooks, and AI-generated instructions.
RunbookProof finds risky infrastructure and shell commands before they are copied, reviewed, or executed. It scans Markdown files without running any command and produces human-readable, JSON, or SARIF 2.1.0 reports.
Project status: Pre-alpha
0.1.0. Rule coverage and interfaces may change before the first stable release.
Why RunbookProof?
Operational commands increasingly live in:
- deployment and incident-response runbooks
- project documentation
- internal knowledge bases
- AI-generated troubleshooting instructions
- pull requests and code reviews
A command can look reasonable while still deleting resources, exposing services publicly, assigning excessive privileges, or using unsafe shell behavior.
RunbookProof provides an automated verification layer between written instructions and execution.
Highlights
- Static analysis only — commands are never executed
- Scans individual Markdown files or complete directories
- Recursively discovers
.mdfiles - Detects commands inside fenced code blocks
- Uses specialized verification packs for common DevOps tools
- Reports rule IDs, severities, evidence, source lines, and stable fingerprints
- Supports text, JSON, and SARIF 2.1.0 output
- Writes reports directly to files with
-oor--output - Integrates with GitHub Code Scanning
- Produces deterministic machine-readable output
- Supports Python 3.11 through Python 3.14
Quick start
RunbookProof currently installs from source.
git clone https://github.com/antonisloukis/runbookproof.git
cd runbookproof
uv sync --frozen
uv run runbookproof --version
Scan one Markdown file:
uv run runbookproof scan README.md
Scan every Markdown file in a directory:
uv run runbookproof scan docs/
Usage
runbookproof scan PATH [--format {text,json,sarif}] [-o OUTPUT] [--ignore-rule RULE_ID] [--config PATH]
runbookproof rules [--format {text,json}]
Human-readable output
Text is the default output format:
uv run runbookproof scan docs/
JSON output
Print JSON to standard output:
uv run runbookproof scan docs/ --format json
Write JSON directly to a file:
uv run runbookproof scan docs/ \
--format json \
--output report.json
JSON reports include:
- scan and finding counts
- error, warning, and informational counts
- activated verification packs
- command metadata and source locations
- finding evidence
- stable fingerprints
- the resulting process exit code
SARIF output
Generate a SARIF 2.1.0 report:
uv run runbookproof scan docs/ \
--format sarif \
--output runbookproof.sarif
SARIF output can be consumed by GitHub Code Scanning and other SARIF-compatible analysis platforms.
Short output option
-o is an alias for --output:
uv run runbookproof scan README.md \
--format sarif \
-o runbookproof.sarif
Ignore selected rules
Ignore a finding by its rule ID:
uv run runbookproof scan docs/ \
--ignore-rule RBP-AZURE-001
The option can be repeated and rule IDs are case-insensitive:
uv run runbookproof scan docs/ \
--ignore-rule RBP-AZURE-001 \
--ignore-rule RBP-AWS-002
Ignored findings are removed from text, JSON, and SARIF output. They are also excluded from finding counts and exit-code calculation.
Configuration file
RunbookProof automatically loads .runbookproof.toml from the current working directory when the file exists:
[scan]
ignore_rules = [
"RBP-AZURE-001",
"RBP-AWS-002",
]
Run the scan normally:
uv run runbookproof scan docs/
Rules from the configuration file are combined with any --ignore-rule options supplied on the command line.
Use a different configuration file with --config:
uv run runbookproof scan docs/ \
--config config/runbookproof.toml
An explicitly selected configuration file must exist and contain valid TOML.
Rule catalogue
List every built-in rule:
uv run runbookproof rules
Generate machine-readable output:
uv run runbookproof rules --format json
The complete reference is available in
docs/rules.md.
Built-in verification packs
| Pack | Command family |
|---|---|
| AWS CLI | aws |
| Azure CLI | az |
| Bash | shell commands and operators |
| Docker | docker |
| Git | git |
| Kubernetes | kubectl |
| Node packages | npm-compatible package commands |
| Python packages | pip-compatible package commands |
| Terraform | terraform |
| Universal | cross-tool safety checks |
The verification engine runs applicable packs against each extracted command and combines their findings into a single report.
Exit codes
| Code | Meaning |
|---|---|
0 |
Scan completed without error-level findings |
1 |
Scan completed and detected one or more error-level findings |
2 |
RunbookProof could not complete the scan or write its output |
Warnings and informational findings do not produce exit code 1.
GitHub Code Scanning
This repository contains a workflow that:
- scans repository Markdown files
- generates a SARIF report
- uploads the report to GitHub Code Scanning
- fails the workflow when error-level findings are present
A minimal integration follows the same pattern:
name: RunbookProof
on:
pull_request:
push:
branches:
- main
permissions:
contents: read
security-events: write
jobs:
scan:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: astral-sh/setup-uv@v8
with:
python-version: "3.11"
- name: Generate SARIF
run: |
uvx --from . runbookproof scan . \
--format sarif \
--output runbookproof.sarif
- name: Upload SARIF
uses: github/codeql-action/upload-sarif@v4
with:
sarif_file: runbookproof.sarif
For production workflows, pin third-party actions to full commit SHAs.
How it works
Markdown input
│
▼
Command extraction
│
▼
Normalized command model
│
▼
Applicable verification packs
│
▼
Findings and supporting evidence
│
▼
Text, JSON, or SARIF report
RunbookProof separates extraction, command modeling, verification, and report rendering. This makes individual verification packs independently testable and allows new command families to be added without redesigning the analysis engine.
Development
Install the locked development environment:
uv sync --frozen
Run formatting checks:
uv run ruff format --check .
Run linting:
uv run ruff check .
Run strict type checking:
uv run mypy
Run the complete test suite:
uv run pytest
Run all local validation commands together:
uv run ruff format --check .
uv run ruff check .
uv run mypy
uv run pytest
git diff --check
Release process
Release preparation and publishing instructions are documented in
docs/releasing.md.
Release history is maintained in
CHANGELOG.md.
Roadmap
- Finding suppression with documented justifications
- Custom and third-party verification packs
- Reusable GitHub Action distribution
- First public package release
Security model
RunbookProof analyzes command text only. It does not execute commands, access cloud accounts, change infrastructure, or require cloud credentials.
Because static analysis cannot understand every operational context, findings should support — not replace — human review.
License
Licensed under the Apache License 2.0.
Built by Antonis Loukis.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file runbookproof-0.1.0.tar.gz.
File metadata
- Download URL: runbookproof-0.1.0.tar.gz
- Upload date:
- Size: 56.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.32 {"installer":{"name":"uv","version":"0.11.32","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
49cfc97e257c64f729daf1fe01e3952f7c3329fa145775ab2fe32cee3fab3011
|
|
| MD5 |
5d678d663a61a18e9c663aebbee7e444
|
|
| BLAKE2b-256 |
6583e37ea604f2baa6256f652b8c899b8aae0f4dda7b9c7a2a6db4cace2e143a
|
File details
Details for the file runbookproof-0.1.0-py3-none-any.whl.
File metadata
- Download URL: runbookproof-0.1.0-py3-none-any.whl
- Upload date:
- Size: 73.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.32 {"installer":{"name":"uv","version":"0.11.32","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1dd5c167883fe5fbecaf3d3d9d8a04061fbdd2dfbc8e798104fff761345786b7
|
|
| MD5 |
bca9d61e608c459a8cae4ebc436427a1
|
|
| BLAKE2b-256 |
4ab3f63baac526ab876c18b5a4694aadec2f752240ed1483346709330b536c5f
|