Skip to content

Commit

Permalink
fix: github workflow vulnerable to script injection
Browse files Browse the repository at this point in the history
Signed-off-by: Diogo Teles Sant'Anna <[email protected]>
  • Loading branch information
diogoteles08 committed Aug 7, 2024
1 parent 68c73f6 commit 0b5eb69
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/workflows/hermetic_library_generation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ on:
paths:
- 'generation_config.yaml'

env:
HEAD_REF: ${{ github.head_ref }}

jobs:
library_generation:
# skip pull requests coming from a forked repository
Expand All @@ -37,6 +40,6 @@ jobs:
[ -z "$(git config user.name)" ] && git config --global user.name "cloud-java-bot"
bash .github/scripts/hermetic_library_generation.sh \
--target_branch ${{ github.base_ref }} \
--current_branch ${{ github.head_ref }}
--current_branch $HEAD_REF
env:
GH_TOKEN: ${{ secrets.CLOUD_JAVA_BOT_TOKEN }}

0 comments on commit 0b5eb69

Please sign in to comment.