Skip to content

Commit

Permalink
workflows: Fix security issues
Browse files Browse the repository at this point in the history
read-all permissions gives access to e.g. security-events, which these
don't need, and can easily lead to leaks

Co-Authored-By: 13x1 <[email protected]>
Co-Authored-By: basti564 <[email protected]>
  • Loading branch information
3 people committed Oct 26, 2024
1 parent 59aee1c commit 6b8ce4a
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 4 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/codeowners.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ on:
pull_request_target:
types: [opened, ready_for_review, synchronize, reopened, edited]

# We don't need any default GitHub token
permissions: {}

env:
OWNERS_FILE: ci/OWNERS
# Don't do anything on draft PRs
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/editorconfig.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
name: "Checking EditorConfig"

permissions: read-all
permissions:
pull-requests: read
contents: read

on:
# avoids approving first time contributors
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/manual-nixos.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: "Build NixOS manual"

permissions: read-all
permissions:
contents: read

on:
pull_request_target:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/manual-nixpkgs.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: "Build Nixpkgs manual"

permissions: read-all
permissions:
contents: read

on:
pull_request_target:
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/nix-parse.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
name: "Check whether nix files are parseable"

permissions: read-all
permissions:
pull-requests: read
contents: read

on:
# avoids approving first time contributors
Expand Down

0 comments on commit 6b8ce4a

Please sign in to comment.