Skip to content

Commit

Permalink
Secure pr_check workflow
Browse files Browse the repository at this point in the history
Make sure the PR-target is only run against sanctioned base branches.
  • Loading branch information
mdellweg committed Dec 9, 2024
1 parent 5f397e3 commit cedf4b0
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion templates/github/.github/workflows/pr_checks.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,13 @@ with context %}
name: "{{ plugin_app_label | camel }} PR static checks"
on:
pull_request_target:
types: ["opened", "synchronize", "reopened"]
types:
- "opened"
- "synchronize"
- "reopened"
branches:
- "{{ default_branch }}"
- "[0-9]+.[0-9]+"

# This workflow runs with elevated permissions.
# Do not even think about running a single bit of code from the PR.
Expand Down

0 comments on commit cedf4b0

Please sign in to comment.