Skip to content

[static-analysis] RGS-004: Comment-Triggered Workflow Without Author Authorization Check in brave.lock.ymlΒ #30945

Description

@github-actions

🚨 Runner-Guard Security Finding

Rule: RGS-004 β€” Comment-Triggered Workflow Without Author Authorization Check
Severity: High
File: .github/workflows/brave.lock.yml
Occurrences: 1590 across 17 workflows

Description

Workflows triggered by issue_comment, pull_request_review_comment, or workflow_run events access secrets or have write permissions, but do not verify the comment author's authorization level before executing privileged operations.

The issue_comment event fires for comments from ANY GitHub user, including those with no affiliation to the repository. Without an explicit check on github.event.comment.author_association (e.g., requiring OWNER, MEMBER, or COLLABORATOR), any external user can trigger the workflow by posting a comment on any open issue or pull request.

Affected Workflows (17 total)

  • brave.lock.yml (most occurrences)
  • ace-editor.lock.yml
  • ai-moderator.lock.yml
  • archie.lock.yml
  • cloclo.lock.yml
  • dev-hawk.lock.yml
  • grumpy-reviewer.lock.yml
  • mergefest.lock.yml
  • pdf-summary.lock.yml
  • plan.lock.yml
  • pr-code-quality-reviewer.lock.yml
  • pr-nitpick-reviewer.lock.yml
  • q.lock.yml
  • scout.lock.yml
  • security-review.lock.yml
  • tidy.lock.yml
  • unbloat-docs.lock.yml

Impact

If a workflow accesses secrets, performs deployments, or has write permissions, this effectively grants those privileges to arbitrary external users who post comments. This is a high-confidence indicator that the workflow could be exploited to exfiltrate secrets or perform unauthorized operations.

Remediation

Add an authorization check early in the workflow that verifies github.event.comment.author_association is one of OWNER, MEMBER, or COLLABORATOR before proceeding with any privileged operations:

- name: Check author authorization
  id: check_auth
  uses: actions/github-script@v9
  with:
    script: |
      const assoc = context.payload.comment?.author_association;
      const allowed = ['OWNER', 'MEMBER', 'COLLABORATOR'];
      if (!allowed.includes(assoc)) {
        core.setFailed(`Unauthorized: comment author association is '${assoc}'`);
      }

Note: Some workflows (like tidy.lock.yml) already include a check_membership step. If team-membership is verified via API, runner-guard may still flag it because it cannot reason about multi-step authorization flows. Review each workflow to confirm whether authorization is already enforced before acting.


Detected by runner-guard v2.6.0 β€” CI/CD source-to-sink vulnerability scanner
Workflow run: https://github.com/github/gh-aw/actions/runs/25538644099

Generated by Static Analysis Report Β· ● 438.8K Β· β—·

  • expires on May 15, 2026, 5:38 AM UTC

Activity

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