Feat/conftest policies#7
Merged
Merged
Conversation
Add a policy/ directory of Rego policies (conftest) enforcing the metio CI conventions that actionlint can't know: third-party uses: pinned to a commit SHA, no local action refs inside reusable workflows, no untrusted github.event context interpolated into run: blocks, a top-level permissions: block on every workflow, and a concurrency block on release workflows that use release-notes. Each rule ships with *_test.rego unit tests; CI runs `conftest verify` then `conftest test` over the shipped files, and the dev container carries conftest so the gate reproduces locally. The concurrency policy caught a real defect: release.yml used release-notes without the concurrency block its README documents as required; add it. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Signed-off-by: Sebastian Hoß <seb@xn--ho-hia.de>
The org pins every consumed action to a commit SHA — first-party metio/ci/* refs as well as third-party — and lets Renovate keep the pins current, rather than tracking a mutable @main/tag ref. Drop the metio/ exemption from the SHA-pin policy so first-party refs are checked too; only same-repo ./ refs stay exempt (our own code in the checkout, nothing to pin). Correct the README and CLAUDE.md guidance, which described the wrong @main/tag policy, and switch the examples to the @<sha> pin form. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Signed-off-by: Sebastian Hoß <seb@xn--ho-hia.de>
Add a "Convention policies" section describing the policy/ gate, how it runs (verify then test, locally and in CI), and what each deny rule enforces. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Signed-off-by: Sebastian Hoß <seb@xn--ho-hia.de>
CLAUDE.md called the caller's aggregate "All Tests Pass" while verify.yml, the README, and golang.yml's comment all name it "Verify". Align CLAUDE.md on "Verify" so the docs match the actual required check. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Signed-off-by: Sebastian Hoß <seb@xn--ho-hia.de>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.