Skip to content

Commit

Permalink
Address zizmor findings
Browse files Browse the repository at this point in the history
No persisting credentials, and the test and docs jobs in the test workflow
each get job-scoped content writing permissions.
  • Loading branch information
nicholasjng committed Jan 7, 2025
1 parent ecb51f6 commit 6e7eba2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/python.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,23 @@ on:
branches:
- main

permissions:
contents: write

jobs:
lint:
name: Run code checks and formatting hooks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- name: Set up Python 3.10 and dependencies
uses: ./.github/actions/python-deps
with:
pythonVersion: "3.10"
- name: Run pre-commit checks
run: uv run pre-commit run --all-files --verbose --show-diff-on-failure
test:
permissions:
contents: write
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -52,6 +53,8 @@ jobs:
LAKEFS_BLOCKSTORE_TYPE: "local"
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
Expand All @@ -73,6 +76,8 @@ jobs:
docs:
name: Build documentation for lakefs-spec
runs-on: ubuntu-latest
permissions:
contents: write
services:
lakefs:
image: treeverse/lakefs:latest
Expand All @@ -89,6 +94,7 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false
- name: Set up Python 3.11 and dependencies
uses: ./.github/actions/python-deps
with:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0 # for documentation builds
persist-credentials: false
- name: Set up Python and dependencies
uses: ./.github/actions/python-deps
with:
Expand Down

0 comments on commit 6e7eba2

Please sign in to comment.