Skip to content

Commit

Permalink
Merge pull request #770 from martin-schulze-vireso/feature/further_ci…
Browse files Browse the repository at this point in the history
…_hardening

CI: Restrict permissions further
  • Loading branch information
martin-schulze-vireso committed Aug 23, 2023
2 parents 5d54614 + 355d20c commit 34de129
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ on:
release: { types: [published] }
workflow_dispatch:

permissions:
contents: read

jobs:
npmjs:
runs-on: ubuntu-latest
Expand All @@ -18,6 +21,8 @@ jobs:

github-npm:
runs-on: ubuntu-latest
permissions:
packages: write
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
- uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/release_dockerhub.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ permissions:
jobs:
dockerhub:
runs-on: ubuntu-latest
permissions:
packages: write
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ name: Tests
# Controls when the action will run.
on: [push, pull_request, workflow_dispatch]

permissions:
contents: read

jobs:
changelog:
runs-on: ubuntu-20.04
Expand Down Expand Up @@ -276,9 +279,6 @@ jobs:
coverage:
runs-on: ubuntu-20.04
permissions:
pull-requests: write
issues: write
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
- run: |
Expand Down
2 changes: 1 addition & 1 deletion docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ The format is based on [Keep a Changelog][kac] and this project adheres to

### Added

* hardened CI scripts by using hashes instead of versions for actions (#754)
* hardened CI scripts by using hashes instead of versions for actions and restricting permissions (#754, #770)
* add security.md (#762)
* add codespell CI checks (#720)

Expand Down

0 comments on commit 34de129

Please sign in to comment.