Repository navigation
security: add immutable release tag ruleset recipe - #33
Merged
Merged
Conversation
7 tasks
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.
Summary
Hardens version-pinned releases by adding an importable repository ruleset recipe for immutable
v*tags, derived from GitHub's officialgithub/ruleset-recipestag protection example.Reuse-first design
GitHub's official
tag-rulesets/prevent-tag-delete.jsonalready provides:target: tag;deletionprotection;non_fast_forwardprotection.This repository changes only what its release contract requires:
refs/tags/v*rather than all tags;updaterule so an existing release tag cannot be moved through an ordinary ref update either.New release creation remains allowed.
Files
.github/rulesets/immutable-release-tags.json— importable repo-level recipe;scripts/validate-release-ruleset.py— exact deterministic validation of target/protections/no default bypass;scripts/manage-release-ruleset.sh— idempotent admin helper (status/apply), create-or-update by ruleset name;docs/release-hardening.md— provenance, UI import, CLI application and verification steps;Administrative boundary
The live repository currently has no rulesets. Creating/updating a repository ruleset requires
Administration: write(or an equivalent custom ruleset-edit role), which the current connector intentionally does not have.This PR does not add an admin token or self-modifying repository policy to CI. After merge, a repository administrator can either import the JSON from Settings → Rules → Rulesets or run:
The helper creates the named ruleset when absent, updates it in place when present, and then verifies live state.
Why
GitHub CLI 2.98.0 now executes
gh skill publish --dry-runsuccessfully for this repository but warns that no active tag protection ruleset exists. The repository recommends release-pinned installs such asv1.2.2, so release tags should not be mutable after publication.Traceability
Refs #32
Related Agent Plugin pilot: #28
References