hygiene fails a push or pull request on:
- a secret in the tree or in the pushed commits, found by gitleaks
- a name or host from the
LEAK_DENYLISTorg secret in a tracked file. A hit prints aspath:line, never with the name - a commit without a
Signed-off-byline for its author (DCO). Bot commits need none
Add .github/workflows/hygiene.yml to a repo:
name: hygiene
on: [push, pull_request]
jobs:
hygiene:
uses: BlindspotSoftware/.github/.github/workflows/hygiene.yml@main
secrets: inheritPull requests from forks get no secrets, so they skip the denylist; the next push to the default branch checks it.
- A test key or fixture that gitleaks flags: add its fingerprint from the log to
.gitleaksignore, or a path to an allowlist in.gitleaks.toml, both in the repo root. - A denylisted name: remove it from the file. The list lives only in the org secret, never in a repo. A line that has to keep the name, such as a live host in a config, can say
denylist:allowin a comment. - A missing sign-off:
git commit --amend --signoff, orgit rebase --signoff <base>for several commits.
scripts/ holds the checks. scripts/selftest.sh runs them against throwaway repos, on every pull request here.