ci: gate external plugin entries on community scan merge#569
Open
tobinsouth wants to merge 1 commit intostagingfrom
Open
ci: gate external plugin entries on community scan merge#569tobinsouth wants to merge 1 commit intostagingfrom
tobinsouth wants to merge 1 commit intostagingfrom
Conversation
Adds a stateless check that fails if any added external marketplace.json
entry (keyed by name+sha) is not already present on
claude-plugins-community main.
This repo runs no security scan — the scan is in claude-plugins-community.
Without this check, the only thing preventing a bypass is the PR body
convention of linking to a community PR, and a human remembering to look.
The check:
- Diffs marketplace.json base→head, extracts external entries (source is
an object, not a vendored string path), keyed by {name, sha}
- Fails if any added key is absent from community main
- Catches new entries AND sha bumps (new sha → new scan required)
- Skips cosmetic edits (description/category) and removals
- Gives a precise diagnosis on failure: SHA mismatch vs entry absent
- Rejects new entries with no sha pin (scan anchor is meaningless)
Fetch uses gh api with the workflow token, not raw.githubusercontent
(which flakes with curl exit 56). Works same-org whether community is
public or private.
noahzweben
approved these changes
Mar 10, 2026
|
Hi |
thepointer1982
approved these changes
Mar 14, 2026
| uses: actions/checkout@v4 | ||
| with: | ||
| # Need base ref too, to diff and find what's new | ||
| fetch-depth: 0 |
There was a problem hiding this comment.
Reduce fetch-depth from 0 to something minimal
| fail=0 | ||
| while IFS= read -r entry; do | ||
| name=$(jq -r .name <<< "$entry") | ||
| sha=$(jq -r '.sha // "∅"' <<< "$entry") |
There was a problem hiding this comment.
Replace ∅ sentinel with ASCII equivalent
thepointer1982
approved these changes
Mar 20, 2026
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.
What
Adds
.github/workflows/verify-community-merged.yml— a stateless check that fails any PR adding an external plugin entry tomarketplace.jsonunless that entry (samename, samesource.sha) is already merged onclaude-plugins-communitymain.Why
This repo runs no security scan on external plugins. The scan lives in
claude-plugins-community. Currently the only thing coupling the two is a PR body convention (Community link: #N) and a human remembering to check. This makes the invariant structural.How it works
marketplace.jsonbase→head, extract external entries (those where.sourceis an object, not a vendored./pathstring){name, sha}— that pair is what the community scan result is anchored tocomm -13to find added keys (new entries or SHA bumps)gh apiand check each added key is presentWhat it catches
source.shasource: "./path")Edge cases handled
gh apiuses the workflow'sGITHUB_TOKEN, works same-org regardless of visibility. No PAT needed.gh apiinstead ofcurl(was hitting exit 56 recv failures in local testing)Tested
Simulated locally against live marketplace data:
Companion
Identical workflow going into
knowledge-work-plugins— see anthropics/knowledge-work-plugins anthropics/knowledge-work-plugins#103.