Skip to content

Commit

Permalink
chore: secure hermetic_library_generation workflow
Browse files Browse the repository at this point in the history
Thanks to @diogoteles08 for the inspection on our repos.
This PR inlines environment variables to avoid overriding script injections.
  • Loading branch information
diegomarquezp authored Aug 19, 2024
1 parent 169aea5 commit 9fabd65
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/workflows/hermetic_library_generation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,12 @@ on:

env:
HEAD_REF: ${{ github.head_ref }}
REPO_FULL_NAME: ${{ github.event.pull_request.head.repo.full_name }}

jobs:
library_generation:
# skip pull requests come from a forked repository
if: github.event.pull_request.head.repo.full_name == github.repository
if: ${{ env.REPO_FULL_NAME }} == github.repository
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down

0 comments on commit 9fabd65

Please sign in to comment.