Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .github/workflows/audit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@ on:
- cron: '20 6 * * 1' # weekly, Monday — catches newly-disclosed CVEs even with no code changes
workflow_dispatch:

permissions: read-all
# Read the repository and nothing else. The SBOM and claims-guard jobs only
# check out code and upload a workflow artifact; the Scorecard job sets its
# own grants below.
permissions:
contents: read

jobs:
scorecard:
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ on:
branches: [main]
pull_request:

# Read-only token. The job checks out the repository and fetches the base
# branch, and writes nothing back to GitHub.
permissions:
contents: read

concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
Expand Down
19 changes: 15 additions & 4 deletions .github/workflows/cla.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,26 @@ on:
pull_request_target:
types: [opened, closed, synchronize]

# Nothing at the top level beyond reading the repository. The grants the
# CLA job needs are on the job itself, below.
permissions:
actions: write
contents: write
pull-requests: write
statuses: write
contents: read

jobs:
cla:
runs-on: ubuntu-latest
# What contributor-assistant/github-action does with the workflow token:
# contents: write commits each new signature to
# signatures/version1/cla.json on main
# pull-requests: write posts and updates the CLA comment on the pull request
# actions: write re-runs the pull request's failed CLA run once
# everyone has signed
# It never calls the commit statuses API, so `statuses: write` is not
# granted; the CLA result is the job's own pass or fail.
permissions:
actions: write
contents: write
pull-requests: write
steps:
- name: CLA Assistant
if: (github.event.comment.body == 'recheck' || github.event.comment.body == 'I have read the CLA Document and I hereby sign the CLA') || github.event_name == 'pull_request_target'
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ concurrency:
group: docker-publish-${{ github.ref }}
cancel-in-progress: true

# Read-only by default. Each job below asks for what it needs on top: build
# pushes to GHCR (packages: write), release creates the GitHub Release
# (contents: write).
permissions:
contents: read

env:
REGISTRY: ghcr.io
# Hardcoded lowercase — GHCR tags reject the repo's actual "Calnode/calnode"
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/ns8-module.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ concurrency:
group: ns8-module-publish
cancel-in-progress: false

# Read-only by default. Only the build job writes, to push the module image
# to GHCR (packages: write), and it says so itself.
permissions:
contents: read

jobs:
validate:
runs-on: ubuntu-latest
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/test-module.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,16 @@ on:
# types: [completed]
# ...after setting the do_token secret.

# Read-only by default; the job below grants what the reusable workflow uses.
permissions:
contents: read

jobs:
test:
name: Run tests
# The called workflow checks out code (contents: read), sets a commit
# status for the run (statuses: write) and comments UI screenshots on the
# pull request (pull-requests: write).
permissions:
contents: read
pull-requests: write
Expand Down
Loading