diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index b644424..689fb9f 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -8,19 +8,27 @@ on: branches: - main +permissions: {} + jobs: build: name: Deploy docs runs-on: ubuntu-latest + permissions: + contents: write steps: - name: Checkout main - uses: actions/checkout@v5 + uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5 + with: + persist-credentials: true - name: Install uv - uses: astral-sh/setup-uv@v7 + uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7 with: version: "0.9.*" enable-cache: true - name: Deploy docs run: uv run mkdocs gh-deploy --force --strict + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/update-reports.yml b/.github/workflows/update-reports.yml index 1c0eab4..8570353 100644 --- a/.github/workflows/update-reports.yml +++ b/.github/workflows/update-reports.yml @@ -12,23 +12,28 @@ on: - 'reports/pyproject.toml' workflow_dispatch: +permissions: {} + jobs: update-reports: runs-on: ubuntu-latest + environment: gh-stats permissions: contents: write pull-requests: write steps: - name: Checkout repository - uses: actions/checkout@v5 + uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5 + with: + persist-credentials: false - name: Get current date id: date run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT - name: Install uv - uses: astral-sh/setup-uv@v7 + uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7 with: version: "0.9.*" enable-cache: true @@ -56,7 +61,7 @@ jobs: run: uv run generate_docs.py - name: Create Pull Request - uses: peter-evans/create-pull-request@v7.0.11 + uses: peter-evans/create-pull-request@22a9089034f40e5a961c8808d113e2c98fb63676 # v7.0.11 with: commit-message: "Update reports for ${{ github.run_id }}" title: "Update reports (${{ steps.date.outputs.date }})" diff --git a/.github/workflows/zizmor.yml b/.github/workflows/zizmor.yml new file mode 100644 index 0000000..19313ab --- /dev/null +++ b/.github/workflows/zizmor.yml @@ -0,0 +1,35 @@ +name: GitHub Actions Security Analysis + +on: + push: + branches: [main] + paths: + - '.github/workflows/**' + - '.github/actions/**' + pull_request: + branches: ["**"] + paths: + - '.github/workflows/**' + - '.github/actions/**' + workflow_dispatch: + +permissions: {} + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + zizmor: + name: Run zizmor + runs-on: ubuntu-latest + permissions: + security-events: write # Required by zizmor-action to upload SARIF files + steps: + - name: Checkout repository + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + with: + persist-credentials: false + + - name: Run zizmor + uses: zizmorcore/zizmor-action@71321a20a9ded102f6e9ce5718a2fcec2c4f70d8 # v0.5.2