Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 62 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Documentation CI

on:
push:
pull_request:
workflow_dispatch:

permissions:
contents: read

concurrency:
group: documentation-ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

jobs:
validate:
runs-on: ubuntu-24.04
timeout-minutes: 15
steps:
- name: Check out full history
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
persist-credentials: false

- name: Download and verify Gitleaks
shell: bash
run: |
set -euo pipefail
archive="$RUNNER_TEMP/gitleaks_8.30.1_linux_x64.tar.gz"
binary="$RUNNER_TEMP/gitleaks"
curl --fail --location --silent --show-error --proto '=https' --proto-redir '=https' --tlsv1.2 \
--output "$archive" \
https://github.com/gitleaks/gitleaks/releases/download/v8.30.1/gitleaks_8.30.1_linux_x64.tar.gz
printf '%s %s\n' \
'551f6fc83ea457d62a0d98237cbad105af8d557003051f41f3e7ca7b3f2470eb' \
"$archive" | sha256sum --check
tar -xzOf "$archive" gitleaks > "$binary"
chmod 0755 "$binary"
test -x "$binary"

- name: Run standard-library tests and native scanner canaries
env:
GITLEAKS_BINARY: ${{ runner.temp }}/gitleaks
TMPDIR: ${{ runner.temp }}
run: |
set -euo pipefail
test -x "$GITLEAKS_BINARY"
python3 -m unittest discover -s tests -v

- name: Validate documentation
run: python3 scripts/check_docs.py

- name: Scan working-tree files
env:
GITLEAKS_BINARY: ${{ runner.temp }}/gitleaks
run: python3 scripts/check_secrets.py --working-tree

- name: Scan all fetched Git history
env:
GITLEAKS_BINARY: ${{ runner.temp }}/gitleaks
run: python3 scripts/check_secrets.py --history
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,21 @@ blueprints/

Each recipe follows the same seven sections: Purpose, Inputs, Flow, Boundaries, Outputs, Adaptation, and Verification. Worked examples illustrate the design; they are not claims of an installed system or measured performance.

## Contributor validation

Run these checks from the repository root with Python 3.10+ and the Gitleaks 8.30.1 binary available locally:

```sh
python3 scripts/check_docs.py
GITLEAKS_BINARY=/path/to/gitleaks python3 scripts/check_secrets.py --working-tree
GITLEAKS_BINARY=/path/to/gitleaks python3 scripts/check_secrets.py --history
GITLEAKS_BINARY=/path/to/gitleaks python3 -m unittest discover -s tests -v
```

The documentation check enforces the [catalog's authoring contract](blueprints/README.md), catalog coverage, and local file links. It supports plain inline and explicit reference file links, fenced/inline code, and public-looking HTTPS targets; ambiguous or unsupported syntax fails. Local anchor fragments and angle-wrapped local destinations are unsupported and rejected rather than treated as verified. HTTPS targets are syntax-checked, not fetched.

Use a clean checkout: local ignored/untracked files participate in validation, and symlinks are refused (including those in a local virtual environment). Gitleaks uses its default detector and path allowlists; some paths such as lockfiles, images, and paths containing `gitleaks.toml` remain excluded, including in history. The working-tree scan separately includes the root scanner-control files under safe staging names. It does not verify credentials with live services, certify owner-private disclosure safety, or guarantee detection of every secret. Hosted CI runs after upload and cannot replace a pre-publication review. These checks are repository validation tooling, not an installer or runtime integration.

## Scope

The current kit is documentation-only. It does not include an installer, runtime integrations, credentials, scheduler configuration, or automated deployment. Choose those bindings in the environment that owns the work, and keep its privacy and approval rules intact.
Loading