Awesome Reviewers

When writing GitHub Actions workflows, apply security best practices for (1) permissions scope and (2) trust boundaries around PR data.

1) Use least-permissive permissions

2) Treat PR data as untrusted

Example pattern

permissions: {}

jobs:
  create-labels:
    runs-on: ubuntu-latest
    permissions:
      issues: write

    steps:
      - uses: actions/labeler@v6
        with:
          # PR-derived identifiers are OK if the action only analyzes diffs
          # but ensure label rules/config are not taken from untrusted PR content.
          pr-number: ${{ inputs.pr_number }}

If an action’s behavior around PR-provided config is unclear, verify in documentation/source or constrain the workflow so trusted configuration is used.