Skip to content

sec(ci): v* tag pushes are unrestricted and trigger the cudly-mcp release/publish pipeline unapproved #9

Closed as not planned

Description

@cristim

Summary

.github/workflows/release.yml (LeanerCloud/cloud-commitments-cli#1893) is this repo's first workflow triggered by a v* tag push, and its goreleaser, mcpb, and publish-registry jobs hold contents: write / id-token: write. CodeRabbit flagged (correctly) that nothing currently restricts who can trigger this pipeline: the repo has no tag-protection ruleset, so any collaborator with push access can create/push a v* tag and cause a real GitHub Release plus an mcp-publisher publish to the public MCP Registry under this org's OIDC identity.

This is the tag-level half of the same class of gap LeanerCloud/cloud-commitments-cli#1660 tracks for deployment environments. LeanerCloud/cloud-commitments-cli#1893 adds environment: release bindings to the three privileged jobs as the code-side half of the mitigation, matching this repo's existing (documented, honest) pattern in cleanup-staging.yml -- but per LeanerCloud/cloud-commitments-cli#1660's own finding, an environment: binding provides no real reviewer gate until protection rules are configured out-of-band, and GitHub auto-creates a referenced environment bare (no reviewers, no branch policy) on first use. Configuring that is a repo-admin action, not something a workflow-file PR can do.

What's needed (both are repo-admin / out-of-band actions)

  1. Configure required reviewers on the release environment (Settings -> Environments -> release -> Required reviewers). Falls under LeanerCloud/cloud-commitments-cli#1660's general remit but calling it out here since release is a new environment feat(mcp): add GoReleaser + release workflow + MCPB bundle for cudly-mcp cloud-commitments-cli#1893 introduces.
  2. Add a tag-protection ruleset restricting creation/update of refs matching v* to release maintainers (Settings -> Rules -> Rulesets, target "tag", pattern v*). The repo currently has only protect-default-branch (target: branch) -- no tag ruleset exists at all.

Until both are configured, pushing a v* tag runs the full release/publish pipeline unapproved -- same shape as LeanerCloud/cloud-commitments-cli#1660's finding, just for tags instead of environments.

Why not block LeanerCloud/cloud-commitments-cli#1893 on this

The workflow is genuinely inert until a maintainer manually creates and pushes a v* tag (out of scope for LeanerCloud/cloud-commitments-cli#1893 itself, which is machinery-only). The environment binding is landing now as the cheap code-side half; this issue tracks the two admin-side actions that make it a real gate.

Activity

  1. cristim commented on Oct 7, 2026

    @cristim
    MemberAuthor

    claimed by cc-mcp-w4

  2. cristim commented on Oct 7, 2026

    @cristim
    MemberAuthor

    Closing as a duplicate of #3, which is already claimed by cc-mcp (worker 1).

    Evidence (all re-verified this session):

    1. The two requested actions in this issue are byte-for-byte the same two checkboxes in Configure release environment reviewers + v* tag-protection ruleset #3: required reviewers on the release environment, and a tag ruleset restricting creation/update of v* refs. Configure release environment reviewers + v* tag-protection ruleset #3 also states the repo has zero rulesets today, verified via gh api repos/LeanerCloud/cloud-commitments-mcp/rulesets.
    2. .github/workflows/release.yml on origin/main already cites Configure release environment reviewers + v* tag-protection ruleset #3, not this issue, as the tracker: line 31 "Tracked in Configure release environment reviewers + v* tag-protection ruleset #3: configuring required reviewers on release and adding a v* tag-protection ruleset are both repo-admin actions outside what this workflow file can enforce", plus environment: release # see the SECURITY note above and #3 on lines 111, 155 and 225.
    3. gh api repos/LeanerCloud/cloud-commitments-mcp/environments --jq '.total_count' returns 0 and .../rulesets returns [], so the two admin actions in Configure release environment reviewers + v* tag-protection ruleset #3 have not been applied yet either.

    So there is no work here beyond #3, and #3 is being handled. Parking rather than duplicating the config or racing the other worker. Reopen this if #3 is closed without the tag ruleset landing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions