mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-12-18 02:50:30 +00:00
ci: Set permissions for GitHub actions
Restrict the GitHub token permissions only to the required ones; this way, even if the attackers will succeed in compromising your workflow, they won’t be able to do much. - Included permissions for the action. https://github.com/ossf/scorecard/blob/main/docs/checks.md#token-permissions https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs Signed-off-by: naveen <172697+naveensrinivasan@users.noreply.github.com> naveensrinivasan <172697+naveensrinivasan@users.noreply.github.com>
This commit is contained in:
parent
b1a0f42b31
commit
2672fad90a
3
.github/workflows/build-multi-stage.yaml
vendored
3
.github/workflows/build-multi-stage.yaml
vendored
@ -5,6 +5,9 @@ on:
|
||||
pull_request:
|
||||
branches:
|
||||
- '*'
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
codespell:
|
||||
name: multi-arch-build
|
||||
|
3
.github/workflows/codespell.yaml
vendored
3
.github/workflows/codespell.yaml
vendored
@ -7,6 +7,9 @@ on:
|
||||
pull_request:
|
||||
branches:
|
||||
- '*'
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
codespell:
|
||||
name: codespell
|
||||
|
3
.github/workflows/commitlint.yaml
vendored
3
.github/workflows/commitlint.yaml
vendored
@ -5,6 +5,9 @@ on:
|
||||
pull_request:
|
||||
branches:
|
||||
- '*'
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
commitlint:
|
||||
name: commitlint
|
||||
|
3
.github/workflows/go-test.yaml
vendored
3
.github/workflows/go-test.yaml
vendored
@ -5,6 +5,9 @@ on:
|
||||
pull_request:
|
||||
branches:
|
||||
- '*'
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
go-test:
|
||||
name: go-test
|
||||
|
3
.github/workflows/golangci-lint.yaml
vendored
3
.github/workflows/golangci-lint.yaml
vendored
@ -5,6 +5,9 @@ on:
|
||||
pull_request:
|
||||
branches:
|
||||
- '*'
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
golangci-lint:
|
||||
name: golangci-lint
|
||||
|
3
.github/workflows/lint-extras.yaml
vendored
3
.github/workflows/lint-extras.yaml
vendored
@ -5,6 +5,9 @@ on:
|
||||
pull_request:
|
||||
branches:
|
||||
- '*'
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
lint-extras:
|
||||
name: lint-extras
|
||||
|
3
.github/workflows/mod-check.yaml
vendored
3
.github/workflows/mod-check.yaml
vendored
@ -5,6 +5,9 @@ on:
|
||||
pull_request:
|
||||
branches:
|
||||
- '*'
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
mod-check:
|
||||
name: mod-check
|
||||
|
3
.github/workflows/publish-artifacts.yaml
vendored
3
.github/workflows/publish-artifacts.yaml
vendored
@ -9,6 +9,9 @@ on:
|
||||
- devel
|
||||
# Push events to branches matching refs/heads/release-v*
|
||||
- 'release-v*'
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
push:
|
||||
name: Publish artifacts
|
||||
|
@ -5,6 +5,10 @@ on:
|
||||
schedule:
|
||||
# Run the retest action every 30 minutes
|
||||
- cron: "30 * * * *"
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
retest:
|
||||
runs-on: ubuntu-latest
|
6
.github/workflows/stale.yaml
vendored
6
.github/workflows/stale.yaml
vendored
@ -7,8 +7,14 @@ on:
|
||||
# Run the stalebot every day at 9pm UTC
|
||||
- cron: "00 21 * * *"
|
||||
# yamllint disable rule:line-length
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
stale:
|
||||
permissions:
|
||||
issues: write # for actions/stale to close stale issues
|
||||
pull-requests: write # for actions/stale to close stale PRs
|
||||
runs-on: ubuntu-18.04
|
||||
if: github.repository == 'ceph/ceph-csi'
|
||||
steps:
|
||||
|
3
.github/workflows/test-retest-action.yaml
vendored
3
.github/workflows/test-retest-action.yaml
vendored
@ -5,6 +5,9 @@ on:
|
||||
pull_request:
|
||||
branches: [devel]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
Loading…
Reference in New Issue
Block a user