Skip to content

Security: generated workflow trusts ripr dedupe comments from any author #4732

Closed

Description

@EffortlessSteven

Finding

The generated workflow's "Capture existing RIPR inline comments" step keeps every PR review comment whose body contains <!-- ripr:dedupe=. It never checks who wrote the comment.

On a public repository, anyone can post a review comment carrying a predictable key (ripr:{seam}:{file}:{line}). That has two effects:

  • A matching body makes the plan mark ripr's card "keep", so the real advisory is silently suppressed.
  • A different body makes the plan mark it "update", and the job PATCHes the other author's comment with the job token.

This affects same-repository PRs in inline comment mode.

Fix

Capture only comments whose .user.login is github-actions[bot] and whose .user.type is Bot. The publish steps always post with github.token, so that is the exact author. If someone switches to a custom token, the failure is duplicate cards, not suppression or edits to someone else's comment.

Add a replay test with forged comments from a human and from another bot.

Severity: low/medium.


Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions