fix: claim-notice permissions, README fallback, stale mirror files#267
Merged
Merged
Conversation
Three bugs fixed: 1. claim-notice.yml: pull_request -> pull_request_target Fork PRs get read-only GITHUB_TOKEN on pull_request events. pull_request_target runs with base branch token, granting pull-requests: write permission. The workflow only runs scripts/post-claim-notice.py from the base branch (no PR code execution), so this is safe. 2. post-claim-notice.py: README fallback when plugin not in registry When a PR is merged, the claim-notice workflow fires immediately but the registry sync hasn't completed yet. Now falls back to checking the local README.md for plugin repo URLs. 3. generate_plugins_json.py: add SKILL.md, .github/dependabot.yml, codex.mcp.json, .mcp.json to OPTIONAL_PLUGIN_FILES These trust-relevant files were not mirrored from upstream repos, causing stale trust scores (e.g. VidSeeds.ai stuck at security 66 despite upstream having SECURITY.md, SKILL.md, Dependabot config).
Contributor
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
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
Three bugs identified from merged PRs that didn't get claim-notice comments and stale trust metadata:
Bug 1: claim-notice.yml —
pull_request→pull_request_targetPR #261 was merged but the claim-notice workflow failed with
HTTP 403: Resource not accessible by integration. Fork PRs get a read-onlyGITHUB_TOKENonpull_requestevents, even withpermissions: pull-requests: write. Switching topull_request_targetruns with the base branch's token, granting write access. Safe because the workflow only runsscripts/post-claim-notice.pyfrom the base branch (no PR code execution).Bug 2: post-claim-notice.py — README fallback when plugin not in registry
PR #43 in awesome-ai-plugins was merged, the workflow ran with
completed/success, but it printedSkipping: none of the PR repos are in the registry. Root cause: when a PR is merged, the claim-notice workflow fires immediately but the registry sync pipeline hasn't completed yet. Fix: fall back to checking the localREADME.mdfor the plugin repo URL.Bug 3: generate_plugins_json.py — stale trust metadata files
PR #266 reported VidSeeds.ai stuck at security 66 because the mirrored bundle was stale. Root cause:
OPTIONAL_PLUGIN_FILESwas missingSKILL.md,.github/dependabot.yml,codex.mcp.json, and.mcp.json. These trust-relevant files exist upstream but were never mirrored, causing the scanner to see stale trust scores.Test plan
build_comment_body('testuser')produces@testusertagnormalize_repo_urlhandles.gitsuffix, trailing slashes, extra pathsOPTIONAL_PLUGIN_FILEShas 17 entries including new filesSECURITY.md,README.md,.codexignore)