Skip to content

Commit

Permalink
Guard against malicious ecosystem comment artifacts (#11879)
Browse files Browse the repository at this point in the history
  • Loading branch information
zanieb authored Jun 14, 2024
1 parent 4f49e91 commit 2d6d85e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/pr-comment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,14 @@ jobs:
id: generate-comment
if: steps.download-ecosystem-result.outputs.found_artifact == 'true'
run: |
// Guard against malicious ecosystem results that symlink to a secret
// file on this runner
if [[ -L pr/ecosystem/ecosystem-result ]]
then
echo "Error: ecosystem-result cannot be a symlink"
exit 1
fi
# Note this identifier is used to find the comment to update on
# subsequent runs
echo '<!-- generated-comment ecosystem -->' >> comment.txt
Expand Down

0 comments on commit 2d6d85e

Please sign in to comment.