Skip to content

Commit

Permalink
ci: Harden GitHub Actions (#410)
Browse files Browse the repository at this point in the history
Signed-off-by: StepSecurity Bot <[email protected]>
  • Loading branch information
step-security-bot authored Oct 29, 2023
1 parent 1809336 commit 723e979
Show file tree
Hide file tree
Showing 8 changed files with 35 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/build.yaml
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
name: Building
on: [push, pull_request]
permissions:
contents: read

jobs:
build:
name: Build
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,15 @@ on:
schedule:
- cron: '10 6 * * 2'

permissions:
contents: read

jobs:
analyze:
permissions:
actions: read # for github/codeql-action/init to get workflow details
contents: read # for actions/checkout to fetch code
security-events: write # for github/codeql-action/autobuild to send a status report
name: Analyze
runs-on: ubuntu-latest

Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/docs.yaml
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,13 @@ on:

name: Generate docs

permissions:
contents: read

jobs:
build:
permissions:
contents: write # for Git to git push
name: Release
runs-on: ubuntu-latest
steps:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/goreleaser-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ on:
branches:
- 'release-please--**'

permissions:
contents: read

jobs:
verify-goreleaser:
name: Check GoReleaser config
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/linting.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
name: reviewdog
on: [pull_request]
permissions:
contents: read

jobs:
golangci-lint:
permissions:
checks: write # for reviewdog/action-golangci-lint to report issues using checks
contents: read # for actions/checkout to fetch code
name: golangci-lint
runs-on: ubuntu-latest
steps:
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/readme.yaml
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,13 @@ on:

name: Generate readme

permissions:
contents: read

jobs:
build:
permissions:
contents: write # for Git to git push
name: Release
runs-on: ubuntu-latest
steps:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/test-install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ on:
- .github/workflows/test-install.yaml
- install.sh

permissions:
contents: read

jobs:
test-install-sh:
name: Test install.sh
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/test.yaml
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
name: Testing
on: [push, pull_request]
permissions:
contents: read

jobs:
build:
name: Test
Expand Down

0 comments on commit 723e979

Please sign in to comment.