ahoward / ahoward/spin

workflow: enforce the collaborator gate (author_association)

Open Beginner friendly
#10 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

transport
Dominant language
Ruby
Stars
1
Forks
0
PR merge metrics
No merged PRs in 30d

Description

the github-as-substrate workflow's if: only checks for the ```spin marker:

if: >
  contains(github.event.issue.body, '```spin') ||
  contains(github.event.comment.body, '```spin')

the header comment claims a collaborator gate, but there is none — any
stranger can open an issue with a ```spin block and spend the repo's Actions
minutes (a free-compute faucet). discovered while proving #5 live.

fix

add an author_association check to the if:, e.g.

if: >
  (contains(github.event.issue.body, '```spin') ||
   contains(github.event.comment.body, '```spin')) &&
  contains(fromJSON('["OWNER","MEMBER","COLLABORATOR"]'),
           github.event.issue.author_association ||
           github.event.comment.author_association)

verify with a non-collaborator account (or a fork PR) that it actually
blocks. note author_association is per-event (issue vs comment) — handle both.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the github-as-substrate workflow and its existing if: expression. Add the collaborator gate while handling issue and comment author_association values, then verify with a non-collaborator account or fork PR that a spin block is blocked and an allowed association still runs.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions
Domain
ci-cd, security
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.