Skip to content

trust add: warn when a hand-written policy pins no event, and refuse more risky events #31

Open

Description

@lnsp

Follow-ups from the review of #30 (valar trust add). Both are low severity: the server still matches policies exactly, and these only warn about policies that may be too broad.

  • Missing event claim. A hand-written subject without a pull_request segment and without an event_name claim (for example repo:acme/web:ref:refs/heads/main) still admits pull_request_target, workflow_run and similar events, and gives no warning. Warn when a hand-written GitHub policy pins no event_name.
  • Deny-list gaps. The list of risky events misses issues, discussion and discussion_comment. These run with the base repository's context, so they belong next to pull_request_target, workflow_run and issue_comment.

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

    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