14. Install Falsify GitHub Action (5 minutes)
Back to README · BYOK + Policy · Share pack (one screen) · False-green cards
This guide installs the PR gate in a target repo (the repo you want to protect), not necessarily the Falsify repo itself.
What you get
After install, every PR that changes decision docs will produce:
- a PR comment with
PASS / PASS_WITH_DEBT / BLOCK falsify-report.json(machine-readable)falsify-report.md(human-readable)- a failing GitHub Check when verdict is
BLOCK
The OSS template is an adversarial-review layer, not production or deployment authority. It cannot grant a claim-bearing production PASS; that requires a separately deployed authority adapter, signer, and sandbox.
Prerequisites
- GitHub repo with Actions enabled
- Decision docs live in markdown (for example
reports/,research/, migration plans) - (Optional) OpenAI-compatible API key for live model-backed review (BYOK)
Step 1 — Add the workflow (2 min)
- In your target repo, create:
.github/workflows/falsify-pr-review.yml
- Copy contents from:
https://github.com/shi275773124/Falsify/blob/main/templates/github-action-pr-review-prototype.yml
- Edit
TARGET_GLOBSnear the top of the jobenvblock:
env:
TARGET_GLOBS: "reports/**/*.md research/**/*.md"
Keep this tight. Do not scan your whole repo.
- Commit and push to
main.
Step 2 — Open a test PR (1 min)
Change one markdown file under your target globs, for example:
reports/deployment-claim.md
Open a PR. You should see:
- workflow
falsify-pr-reviewruns - PR comment
<!-- falsify-pr-summary -->appears or updates - artifacts
falsify-reportuploaded
Without API secrets, live review is unavailable. The template records BLOCK rather than laundering lint-only output into PASS; add BYOK credentials to run the model-backed review.
Step 3 — (Optional) Enable BYOK live review (1 min)
Repo → Settings → Secrets and variables → Actions → New repository secret
Add:
| Secret | Example |
|---|---|
FALSIFY_API_BASE |
https://api.deepseek.com/v1 |
FALSIFY_API_KEY |
sk-... |
FALSIFY_MODEL |
deepseek-chat |
Re-run the PR workflow. Live falsify review --json will run when the key exists.
Step 4 — (Optional) Add policy file (1 min)
Add repo policy file (OSS):
.falsify/policy.yml
Start from:
templates/falsify-policy.yml
Policy documents globs, limits, and enforcement intent for your team.
Note: the current workflow prototype reads TARGET_GLOBS from workflow env. Keep TARGET_GLOBS aligned with .falsify/policy.yml targets.globs until native policy loading ships.
Step 5 — Turn on required check (when ready)
After observing the reports on non-consequential documents:
- Repo → Settings → Branches → branch protection rule
- Require status check:
falsify-pr-review(or your workflow job name) - Do not make this OSS template a production/deployment authorization check. It is a review signal; use a separately implemented authority gate for claim-bearing PASS.
Verification checklist
Run these checks on your first PR:
- [ ] Missing
FALSIFY_API_KEYyieldsBLOCK, never a lint-onlyPASS - [ ] PR comment includes verdict + findings grouped by cutline
- [ ] Artifact contains
falsify-report.jsonwithschema_version: falsify.report.v0.1 - [ ] A deliberate weak claim returns
BLOCKwhen live review is enabled - [ ] Known Debt without
upgrade_triggerreturnsBLOCKwhenFALSIFY_STRICT_KNOWN_DEBT_TRIGGER=1
Modes
| Mode | Secrets | Behavior |
|---|---|---|
| No evidence | none | lint runs, live review is skipped, verdict is BLOCK |
| Live BYOK | FALSIFY_* set |
model-backed review runs; this remains non-authoritative OSS review |
| Strict debt | default on | missing Known Debt trigger becomes BLOCK |
Troubleshooting
No files scanned
- Your changed files do not match
TARGET_GLOBS - Fix globs or move decision docs into covered paths
Workflow BLOCKs because live review was skipped
- Expected without
FALSIFY_API_KEY: no evidence, no PASS - Add BYOK secrets to enable the model-backed OSS review
Check fails with BLOCK unexpectedly
- Open
falsify-report.mdartifact - Fix
Must Fixitems or add missingupgrade_triggerfor Known Debt
Token cost too high
- Tighten
TARGET_GLOBS - Reduce changed file size
- Use advisory mode on low-risk repos