Skip to content

Commit

Permalink
Add zizmor security linter to pre-commit (#436)
Browse files Browse the repository at this point in the history
  • Loading branch information
tkoyama010 authored Dec 21, 2024
1 parent 58a1e46 commit 535f226
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 11 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: "Pull Request Labeler"
on:
pull_request_target:
pull_request:
types: [opened, reopened]

jobs:
Expand All @@ -11,6 +11,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: actions/labeler@v5
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
Expand Down
15 changes: 5 additions & 10 deletions .github/workflows/publish-to-pypi.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,18 @@
name: Build and publish Python 🐍 distributions 📦 to PyPI and TestPyPI
on:
workflow_dispatch:
pull_request:
push:
tags:
- "*"
branches:
- main
- "release/*"
permissions:
id-token: write
jobs:
build-n-publish:
runs-on: ubuntu-latest
environment: pypi
permissions:
id-token: write
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- name: Set up Python
uses: actions/setup-python@v5
with:
Expand All @@ -36,7 +34,4 @@ jobs:
--wheel
--outdir dist/
- name: Publish distribution to PyPI
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}
1 change: 1 addition & 0 deletions .github/workflows/testing-and-deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 2
persist-credentials: false

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
Expand Down
5 changes: 5 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -96,3 +96,8 @@ repos:
args: [--branch, main]
- id: requirements-txt-fixer
- id: trailing-whitespace

- repo: https://github.com/woodruffw/zizmor-pre-commit
rev: v0.8.0
hooks:
- id: zizmor

0 comments on commit 535f226

Please sign in to comment.