Skip to content

Commit

Permalink
Merge pull request #178 from maxmind/nobeid/github-actions-zizmor
Browse files Browse the repository at this point in the history
integrate zizmor in github actions
  • Loading branch information
ugexe authored Jan 10, 2025
2 parents 2ccc25f + 725c59c commit eec5b1b
Show file tree
Hide file tree
Showing 7 changed files with 40 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/address-sanitizer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ jobs:
uses: actions/checkout@v4
with:
submodules: true
persist-credentials: false

- name: Set up Python
uses: actions/setup-python@v5
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/clang-analyzer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ jobs:
uses: actions/checkout@v4
with:
submodules: true
persist-credentials: false

- name: Install clang-tools
run: sudo apt install clang-tools
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,13 @@ jobs:
# a pull request then we can checkout the head.
fetch-depth: 2
submodules: true
persist-credentials: false

# If this run was triggered by a pull request event, then checkout
# the head of the pull request instead of the merge commit.
- run: git checkout HEAD^2
if: ${{ github.event_name == 'pull_request' }}

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ jobs:
- uses: actions/checkout@v4
with:
submodules: true
persist-credentials: false

- name: Set up QEMU
if: runner.os == 'Linux'
Expand Down Expand Up @@ -50,6 +51,7 @@ jobs:
- uses: actions/checkout@v4
with:
submodules: true
persist-credentials: false

- name: Build sdist
run: pipx run build --sdist
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/test-libmaxminddb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ jobs:
uses: actions/checkout@v4
with:
submodules: true
persist-credentials: false

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ jobs:
uses: actions/checkout@v4
with:
submodules: true
persist-credentials: false

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
Expand Down
32 changes: 32 additions & 0 deletions .github/workflows/zizmor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: GitHub Actions Security Analysis with zizmor

on:
push:
branches: ["main"]
pull_request:
branches: ["**"]

jobs:
zizmor:
name: zizmor latest via PyPI
runs-on: ubuntu-latest
permissions:
security-events: write
# required for workflows in private repositories
contents: read
actions: read
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
persist-credentials: false

- name: Install the latest version of uv
uses: astral-sh/setup-uv@v5
with:
enable-cache: false

- name: Run zizmor
run: uvx zizmor --format plain .
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit eec5b1b

Please sign in to comment.