Skip to content

Commit

Permalink
Fix zizmor security issues in GA
Browse files Browse the repository at this point in the history
  • Loading branch information
marvinfriede committed Dec 15, 2024
1 parent 15c3a01 commit 361aa82
Show file tree
Hide file tree
Showing 6 changed files with 43 additions and 13 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: "CodeQL"

on:
push:
branches: [ "main" ]
branches: ["main"]
pull_request:
branches: [ "main" ]
branches: ["main"]
schedule:
- cron: "25 21 * * 5"

Expand All @@ -20,11 +20,13 @@ jobs:
strategy:
fail-fast: false
matrix:
language: [ python ]
language: [python]

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
persist-credentials: false

- name: Initialize CodeQL
uses: github/codeql-action/init@v2
Expand Down
10 changes: 8 additions & 2 deletions .github/workflows/macos-arm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
persist-credentials: false

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
Expand All @@ -88,7 +90,11 @@ jobs:
run: echo "TOXENV=py$(echo ${{ matrix.python-version }} | tr -d '.')-torch$(echo ${{ matrix.torch-version }} | tr -d '.')" >> $GITHUB_ENV

- name: Print TOXENV
run: echo "TOXENV is set to '${{ env.TOXENV }}'."
run: echo "TOXENV is set to '${TOXENV}'."
env:
TOXENV: ${{ env.TOXENV }}

- name: Unittests with tox
run: tox -e ${{ env.TOXENV }}
run: tox -e $TOXENV
env:
TOXENV: ${{ env.TOXENV }}
10 changes: 8 additions & 2 deletions .github/workflows/macos-x86.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
persist-credentials: false

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
Expand All @@ -99,7 +101,11 @@ jobs:
run: echo "TOXENV=py$(echo ${{ matrix.python-version }} | tr -d '.')-torch$(echo ${{ matrix.torch-version }} | tr -d '.')" >> $GITHUB_ENV

- name: Print TOXENV
run: echo "TOXENV is set to '${{ env.TOXENV }}'."
run: echo "TOXENV is set to '${TOXENV}'."
env:
TOXENV: ${{ env.TOXENV }}

- name: Unittests with tox
run: tox -e ${{ env.TOXENV }}
run: tox -e $TOXENV
env:
TOXENV: ${{ env.TOXENV }}
4 changes: 4 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
persist-credentials: false

- name: Build wheel (bdist)
run: pipx run build --wheel
Expand All @@ -47,6 +49,8 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
persist-credentials: false

- name: Build source distribution (sdist)
run: pipx run build --sdist
Expand Down
12 changes: 9 additions & 3 deletions .github/workflows/ubuntu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
persist-credentials: false

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
Expand All @@ -105,13 +107,17 @@ jobs:
run: echo "TOXENV=py$(echo ${{ matrix.python-version }} | tr -d '.')-torch$(echo ${{ matrix.torch-version }} | tr -d '.')" >> $GITHUB_ENV

- name: Print TOXENV
run: echo "TOXENV is set to '${{ env.TOXENV }}'."
run: echo "TOXENV is set to '${TOXENV}'."
env:
TOXENV: ${{ env.TOXENV }}

- name: Unittests with tox
run: tox -e ${{ env.TOXENV }}
run: tox -e $TOXENV
env:
TOXENV: ${{ env.TOXENV }}

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@7f8b4b4bde536c465e797be725718b88c5d95e0e # 5.1.1
if: >
matrix.python-version == '3.11' &&
matrix.torch-version == '2.2.2' &&
Expand Down
10 changes: 8 additions & 2 deletions .github/workflows/windows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
persist-credentials: false

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
Expand All @@ -97,7 +99,11 @@ jobs:
run: echo "TOXENV=py$(echo ${{ matrix.python-version }} | tr -d '.')-torch$(echo ${{ matrix.torch-version }} | tr -d '.')" >> $GITHUB_ENV

- name: Print TOXENV
run: echo "TOXENV is set to '${{ env.TOXENV }}'."
run: echo "TOXENV is set to '${TOXENV}'."
env:
TOXENV: ${{ env.TOXENV }}

- name: Unittests with tox
run: tox -e ${{ env.TOXENV }}
run: tox -e $TOXENV
env:
TOXENV: ${{ env.TOXENV }}

0 comments on commit 361aa82

Please sign in to comment.