Skip to content

ci: allow maintainers to run the module scorecard on fork PRs via /scorecard - #1065

Open
bpmct wants to merge 3 commits into
mainfrom
bpmct/scorecard-community-prs
Open

ci: allow maintainers to run the module scorecard on fork PRs via /scorecard#1065
bpmct wants to merge 3 commits into
mainfrom
bpmct/scorecard-community-prs

Conversation

@bpmct

@bpmct bpmct commented Aug 19, 2026

Copy link
Copy Markdown
Member

Fork PRs currently get no scorecard comment because they don't have access to secrets. This adds an issue_comment trigger: a maintainer comments /scorecard on a community PR to run the check on demand. Same-repo PRs keep the automatic pull_request behavior, unchanged.

The first version of this used pull_request_target, which zizmor rightly blocked. This approach avoids it: issue_comment runs in the base-repo context, the maintainer restriction (OWNER/MEMBER/COLLABORATOR) makes every fork-PR scoring an explicit human decision, and it doubles as cost control for the Anthropic API.

Discussions are not affected. PR mode only reads them for the baseline, and the token only has discussions: read anyway.

To keep secrets safe, the scoring scripts always run from the base repo. PR content is fetched via refs/pull/N/merge and only pulled in under registry/coder/modules/, read as plain text for the prompt, never executed.

🤖 Generated with Coder Agents on behalf of @bpmct

@bpmct
bpmct marked this pull request as ready for review August 19, 2026 21:40
@bpmct bpmct changed the title ci: run module scorecard check on community (fork) PRs ci: allow maintainers to run the module scorecard on fork PRs via /scorecard Aug 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants