We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 587053e commit c8e0753Copy full SHA for c8e0753
.github/workflows/o2-linter.yml
@@ -2,7 +2,7 @@
2
# Find issues in O2 code
3
name: O2 linter
4
5
-# "on": [pull_request_target, push]
+"on": [pull_request_target, push]
6
permissions: {}
7
env:
8
BRANCH_MAIN: master
@@ -47,6 +47,8 @@ jobs:
47
fi
48
echo "linter_ran=1" >> "$GITHUB_OUTPUT"
49
[[ "${{ github.event_name }}" == "pull_request_target" ]] && options="-g"
50
+ # Checkout the script from the base branch to prevent execution of arbitrary code in the head branch.
51
+ git checkout ${{ env.BRANCH_BASE }} -- Scripts/o2_linter.py
52
# shellcheck disable=SC2086 # Ignore unquoted options.
53
python3 Scripts/o2_linter.py $options "${files[@]}"
54
echo "Tip: If you allow actions in your fork repository, O2 linter will run when you push commits."
0 commit comments