Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
fix: add explicit permissions to all GitHub Actions workflows (#19419)
Danny Xub0028c5dfa3d
diff --git a/.github/workflows/backend-tests-default.yml b/.github/workflows/backend-tests-default.ymlindex ed2bf067e6..a15fdb234c 100644--- a/.github/workflows/backend-tests-default.yml+++ b/.github/workflows/backend-tests-default.yml@@ -11,6 +11,8 @@ on:- 'proto/**/*.go'- 'action/**'+permissions: {}+jobs:go-tests:runs-on: ubuntu-latestdiff --git a/.github/workflows/backend-tests.yml b/.github/workflows/backend-tests.ymlindex c7eaa2fb43..321de929ea 100644--- a/.github/workflows/backend-tests.yml+++ b/.github/workflows/backend-tests.yml@@ -11,6 +11,9 @@ on:- 'proto/**/*.go'- 'action/**'+permissions:+ contents: read+concurrency:group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}cancel-in-progress: truediff --git a/.github/workflows/build-push-action-image.yml b/.github/workflows/build-push-action-image.ymlindex a9b62b9e55..52634945e5 100644--- a/.github/workflows/build-push-action-image.yml+++ b/.github/workflows/build-push-action-image.yml@@ -6,6 +6,9 @@ on:branches:- 'release/*.*.*'+permissions:+ contents: read+concurrency:group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}cancel-in-progress: truediff --git a/.github/workflows/build-push-demo-image.yml b/.github/workflows/build-push-demo-image.ymlindex a763c185db..611dfe8c1b 100644--- a/.github/workflows/build-push-demo-image.yml+++ b/.github/workflows/build-push-demo-image.yml@@ -3,6 +3,9 @@ name: Build and Push Demo Image to GARon:workflow_dispatch:+permissions:+ contents: read+env:GAR_LOCATION: us-central1GAR_REPOSITORY: bytebasediff --git a/.github/workflows/demo-daily-deploy.yml b/.github/workflows/demo-daily-deploy.ymlindex 77362cec39..f34e836772 100644--- a/.github/workflows/demo-daily-deploy.yml+++ b/.github/workflows/demo-daily-deploy.yml@@ -4,6 +4,8 @@ on:- cron: '0 0 * * *'workflow_dispatch:+permissions: {}+jobs:deploy:if: github.repository == 'bytebase/bytebase'diff --git a/.github/workflows/docker-tag-latest.yml b/.github/workflows/docker-tag-latest.ymlindex ec4d5d569b..39d37d2c6e 100644--- a/.github/workflows/docker-tag-latest.yml+++ b/.github/workflows/docker-tag-latest.yml@@ -14,6 +14,8 @@ on:required: truetype: string+permissions: {}+jobs:docker:runs-on: ubuntu-latestdiff --git a/.github/workflows/draft-release.yml b/.github/workflows/draft-release.ymlindex 855e577888..bac06d0949 100644--- a/.github/workflows/draft-release.yml+++ b/.github/workflows/draft-release.yml@@ -5,6 +5,9 @@ on:tags:- '*.*.*'+permissions:+ contents: write+jobs:draft-release:runs-on: ubuntu-latestdiff --git a/.github/workflows/frontend-tests-default.yml b/.github/workflows/frontend-tests-default.ymlindex 190b0e2e27..38c9c7acbd 100644--- a/.github/workflows/frontend-tests-default.yml+++ b/.github/workflows/frontend-tests-default.yml@@ -9,6 +9,8 @@ on:paths-ignore:- 'frontend/**'+permissions: {}+jobs:static-checks:runs-on: ubuntu-latestdiff --git a/.github/workflows/frontend-tests.yml b/.github/workflows/frontend-tests.ymlindex 840789fc50..6157ad7295 100644--- a/.github/workflows/frontend-tests.yml+++ b/.github/workflows/frontend-tests.yml@@ -8,6 +8,9 @@ on:paths:- 'frontend/**'+permissions:+ contents: read+concurrency:group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}cancel-in-progress: truediff --git a/.github/workflows/golangci-lint-default.yml b/.github/workflows/golangci-lint-default.ymlindex d365cbab22..3e6d201ea6 100644--- a/.github/workflows/golangci-lint-default.yml+++ b/.github/workflows/golangci-lint-default.yml@@ -12,6 +12,8 @@ on:- 'go.mod'- 'proto/**/*.go'+permissions: {}+jobs:golangci-lint:runs-on: ubuntu-latestdiff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.ymlindex 3ac28119a4..ef534e5fae 100644--- a/.github/workflows/golangci-lint.yml+++ b/.github/workflows/golangci-lint.yml@@ -12,6 +12,9 @@ on:- 'proto/**/*.go'- '.golangci.yaml'+permissions:+ contents: read+concurrency:group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}cancel-in-progress: truediff --git a/.github/workflows/proto-linter-default.yml b/.github/workflows/proto-linter-default.ymlindex 32965da0b7..663f24e2ad 100644--- a/.github/workflows/proto-linter-default.yml+++ b/.github/workflows/proto-linter-default.yml@@ -7,6 +7,8 @@ on:paths-ignore:- 'proto/**'+permissions: {}+jobs:lint-protos:runs-on: ubuntu-latestdiff --git a/.github/workflows/test_link.yml b/.github/workflows/test_link.ymlindex a868362712..92241d4615 100644--- a/.github/workflows/test_link.yml+++ b/.github/workflows/test_link.yml@@ -8,6 +8,9 @@ on:paths:- 'frontend/**'+permissions:+ contents: read+jobs:link-tests:runs-on: self-hosteddiff --git a/.github/workflows/test_link_default.yml b/.github/workflows/test_link_default.ymlindex 157c4cfa11..54eb0c9b02 100644--- a/.github/workflows/test_link_default.yml+++ b/.github/workflows/test_link_default.yml@@ -8,6 +8,8 @@ on:paths-ignore:- 'frontend/**'+permissions: {}+jobs:go-tests:runs-on: ubuntu-latest