-
Notifications
You must be signed in to change notification settings - Fork 0
Wave-37 scope: C06 L59 source-code provenance policy #305
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -1,25 +1,25 @@ | ||||||
| # Wave-37 lane: w37-miri-hard — C00 L7 blocking Miri permutation CI | ||||||
| # Wave-37 lane: w37-source-prov — C06 L59 source-code provenance policy | ||||||
|
|
||||||
| **Branch:** `feat/sl-w37-miri-hard` | ||||||
| **Worktree:** `C:\Users\koosh\SessionLedger-wtrees\w37-miri-hard` | ||||||
| **Cluster / pillar:** C00 L7 | ||||||
| **Wave-36 overlap:** #296 loom permutation blocking | ||||||
| **Branch:** `feat/sl-w37-source-prov` | ||||||
| **Worktree:** `C:\Users\koosh\SessionLedger-wtrees\w37-source-prov` | ||||||
| **Cluster / pillar:** C06 L59 | ||||||
|
|
||||||
| ## Gap | ||||||
|
|
||||||
| `miri-smoke.yml` is nightly + `continue-on-error`. Add PR-blocking Miri job for | ||||||
| `race_model` (and optional `loom_model` subset) with policy doc anchors. | ||||||
| L59 score 2: signed merges present but no in-repo signed-commit policy SSOT. | ||||||
| Extend branch-protection + contributor policy with machine-verifiable anchors. | ||||||
|
|
||||||
| ## Acceptance criteria | ||||||
|
|
||||||
| 1. Add `scripts/miri-permutation-check.ps1 -SelfCheck` documenting policy. | ||||||
| 2. Add `.github/workflows/miri-permutation.yml` blocking on PR/push (ubuntu, race_model). | ||||||
| 3. Keep existing `miri-smoke.yml` soft nightly or document split. | ||||||
| 4. Update `docs/ops/concurrency-safety.md`. | ||||||
| 1. Add `docs/ops/source-provenance.md` SSOT (signed commits, CODEOWNERS, human org gates). | ||||||
| 2. Add `scripts/source-provenance-check.ps1 -SelfCheck`. | ||||||
| 3. Extend `scripts/branch-protection-check.ps1` policy hooks if needed. | ||||||
| 4. Update `CONTRIBUTING.md` cross-link. | ||||||
| 5. CHANGELOG bullet. **Do not edit** audit scorecard/traceability files. | ||||||
|
|
||||||
| ## Verify | ||||||
|
|
||||||
| ```powershell | ||||||
| pwsh ./scripts/miri-permutation-check.ps1 -SelfCheck | ||||||
| pwsh ./scripts/source-provenance-check.ps1 -SelfCheck | ||||||
| pwsh ./scripts/branch-protection-check.ps1 -PolicyOnly | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The
Suggested change
|
||||||
| ``` | ||||||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,108 @@ | ||
| # Source code provenance policy | ||
|
|
||
| Status: **C06 L59** — SSOT for **signed commits**, [`CODEOWNERS`](../../CODEOWNERS) | ||
| review gates, and **human org controls** (branch protection, maintainer 2FA) that | ||
| bind who may change SessionLedger source. This page records policy and | ||
| machine-verifiable anchors; it does **not** claim that GitHub org Settings are | ||
| provable from a git checkout alone. | ||
|
|
||
| Related: [`commit-signing.md`](commit-signing.md), [`branch-protection.md`](branch-protection.md), | ||
| [`CONTRIBUTING.md`](../../CONTRIBUTING.md), [`SECURITY.md`](../../SECURITY.md), | ||
| [`docs/adr/0004-commit-signing-policy.md`](../adr/0004-commit-signing-policy.md). | ||
|
|
||
| ## Policy layers | ||
|
|
||
| | Layer | Requirement | In-repo evidence | | ||
| |-------|-------------|------------------| | ||
| | DCO | `Signed-off-by:` on each commit | [`CONTRIBUTING.md`](../../CONTRIBUTING.md) | | ||
| | GPG / SSH | Cryptographic signature on each commit reaching `main` | [`commit-signing.md`](commit-signing.md), ADR 0004 | | ||
| | CODEOWNERS | Review from listed owners on owned paths | [`CODEOWNERS`](../../CODEOWNERS) | | ||
| | Branch discipline | Feature branches + PRs; no direct push to `main` | [`CONTRIBUTING.md`](../../CONTRIBUTING.md) | | ||
| | Branch protection | Require signed commits + PR before merge on `main` | Human org gate (see below) | | ||
| | Maintainer 2FA | Org/account 2FA for Settings / merge access | Human org gate (see below) | | ||
|
|
||
| Contributors must configure `commit.gpgsign` (GPG or SSH) **before** pushing. | ||
| DCO sign-off is complementary — it is **not** a substitute for GPG/SSH signatures. | ||
|
|
||
| ## CODEOWNERS review gates | ||
|
|
||
| [`CODEOWNERS`](../../CODEOWNERS) assigns default ownership for the tree and | ||
| crate-specific paths. GitHub uses CODEOWNERS to request reviews from listed | ||
| handles when matching files change. | ||
|
|
||
| Maintainers should enable **Require review from Code Owners** on `main` when the | ||
| repository settings allow it. That toggle is a **human org gate** — this | ||
| repository documents the expectation but cannot assert the toggle from checkout. | ||
|
|
||
| ## Signed commits (contributor + maintainer) | ||
|
|
||
| Operator setup, tip verification, and CI evidence live in | ||
| [`commit-signing.md`](commit-signing.md). Local checks: | ||
|
|
||
| ```powershell | ||
| pwsh ./scripts/commit-signing-check.ps1 -Ref HEAD -Count 5 | ||
| pwsh ./scripts/branch-protection-check.ps1 -PolicyOnly | ||
| ``` | ||
|
|
||
| Branch protection machine-verify (best-effort `gh api`, soft-skip without admin | ||
| scope): [`branch-protection.md`](branch-protection.md) + | ||
| [`scripts/branch-protection-check.ps1`](../../scripts/branch-protection-check.ps1). | ||
|
|
||
| ## Human org gates (Settings) | ||
|
|
||
| These controls are **required policy** but **not** machine-verifiable from | ||
| repository contents: | ||
|
|
||
| | Control | Why not in-tree? | Maintainer action | | ||
| |---------|------------------|-------------------| | ||
| | **Require signed commits** on `main` | GitHub branch protection API needs admin scope | Settings → Branches → `main` | | ||
| | **Require a pull request before merging** | Same | Same | | ||
| | **Require review from Code Owners** | Same | Same (when CODEOWNERS is active) | | ||
| | **Maintainer 2FA / hardware keys** | GitHub does not expose per-user 2FA to this repo | Org/account Settings (human attestation) | | ||
|
|
||
| Record the date branch protection was enabled in an internal ops note. Do **not** | ||
| commit screenshots of GitHub Settings or 2FA enrollment. | ||
|
|
||
| ## What this repository can verify | ||
|
|
||
| | Control | Verifiable in-tree? | Evidence | | ||
| |---------|---------------------|----------| | ||
| | Signed-commit policy SSOT | **Yes** | This page + ADR 0004 | | ||
| | CODEOWNERS file present | **Yes** | [`CODEOWNERS`](../../CODEOWNERS) | | ||
| | Recent `main` tip signature | Partial | `scripts/commit-signing-check.ps1` | | ||
| | Branch protection doc anchors | **Yes** | `scripts/branch-protection-check.ps1 -PolicyOnly` | | ||
| | GitHub branch protection live state | Partial (best-effort API) | `scripts/branch-protection-check.ps1` (no `-PolicyOnly`) | | ||
| | Org 2FA / hardware-key enrollment | **No** | Human attestation only | | ||
|
|
||
| ## Evidence checklist | ||
|
|
||
| | Gate | Status | Evidence / prerequisite | | ||
| |------|--------|-------------------------| | ||
| | Source provenance policy documented | **done** | This page | | ||
| | Source provenance SelfCheck | **done** | `scripts/source-provenance-check.ps1 -SelfCheck` | | ||
| | Branch protection PolicyOnly hook | **done** | `scripts/branch-protection-check.ps1 -PolicyOnly` | | ||
| | CONTRIBUTING.md cross-link | **done** | [`CONTRIBUTING.md`](../../CONTRIBUTING.md) § Source provenance | | ||
| | CODEOWNERS present | **done** | [`CODEOWNERS`](../../CODEOWNERS) | | ||
| | GitHub **Require signed commits** live proof | **NOT_VERIFIABLE_IN_REPO** | Human org gate — enable in Settings; optional `gh api` via branch-protection-check without `-PolicyOnly` | | ||
| | Maintainer 2FA live proof | **NOT_VERIFIABLE_IN_REPO** | Human org gate — org/account 2FA attestation out-of-band | | ||
|
|
||
| ## SelfCheck (machine proof) | ||
|
|
||
| Docs + path anchors only — no network, no GitHub API, no false org-gate claims: | ||
|
|
||
| ```powershell | ||
| pwsh ./scripts/source-provenance-check.ps1 -SelfCheck | ||
| ``` | ||
|
|
||
| The script asserts: | ||
|
|
||
| - This page documents **signed commits**, **CODEOWNERS**, and **human org gates** | ||
| - Cross-links to `CONTRIBUTING.md`, `commit-signing.md`, and `branch-protection.md` | ||
| - The evidence checklist includes **NOT_VERIFIABLE_IN_REPO** human org rows | ||
| - `scripts/branch-protection-check.ps1` exposes `-PolicyOnly` for hermetic policy hooks | ||
|
|
||
| ## Related | ||
|
|
||
| - [`branch-protection.md`](branch-protection.md) — PR + signed-commit machine verify | ||
| - [`commit-signing.md`](commit-signing.md) — contributor GPG/SSH setup + CI tip check | ||
| - [`docs/adr/0004-commit-signing-policy.md`](../adr/0004-commit-signing-policy.md) — decision record |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The worktree path contains a hardcoded absolute local path specific to a single user's environment. It is recommended to use a relative path or omit the absolute local path entirely to keep the documentation portable and avoid leaking local system details.