Skip to content

Commit

Permalink
Add read-only token permissions to GitHub Action workflows (vitessio#…
Browse files Browse the repository at this point in the history
…12718)

* Workflow templates set read-only permissions

Signed-off-by: Pedro Kaj Kjellerup Nacht <pnacht@google.com>

* Regenerate workflows with read-only permissions

Almost all workflows recreated with `make generate_ci_workflows`.

Signed-off-by: Pedro Kaj Kjellerup Nacht <pnacht@google.com>

* restrict permissions in more places

Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr>

---------

Signed-off-by: Pedro Kaj Kjellerup Nacht <pnacht@google.com>
Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr>
Co-authored-by: Florent Poinsard <florent.poinsard@outlook.fr>
  • Loading branch information
pnacht and frouioui authored Mar 27, 2023
1 parent 0de7e01 commit e1b79be
Show file tree
Hide file tree
Showing 110 changed files with 218 additions and 4 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/check_label.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ concurrency:
group: format('{0}-{1}', ${{ github.ref }}, 'Check Pull Request labels')
cancel-in-progress: true

permissions: read-all

jobs:
check_pull_request_labels:
name: Check Pull Request labels
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/check_make_vtadmin_authz_testgen.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
name: check_make_vtadmin_authz_testgen
on: [push, pull_request]
jobs:

permissions: read-all

jobs:
build:
name: Check Make vtadmin_authz_testgen
runs-on: ubuntu-22.04
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/check_make_vtadmin_web_proto.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
name: check_make_vtadmin_web_proto
on: [push, pull_request]
jobs:

permissions: read-all

jobs:
build:
name: Check Make VTAdmin Web Proto
runs-on: ubuntu-22.04
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/close_stale_pull_requests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@ on:

workflow_dispatch: {}

permissions:
pull-requests: write
permissions: read-all

jobs:
close_stale_pull_requests:
runs-on: ubuntu-22.04
permissions:
pull-requests: write

steps:
- uses: actions/stale@v5
with:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/cluster_endtoend_12.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ concurrency:
group: format('{0}-{1}', ${{ github.ref }}, 'Cluster (12)')
cancel-in-progress: true

permissions: read-all

env:
LAUNCHABLE_ORGANIZATION: "vitess"
LAUNCHABLE_WORKSPACE: "vitess-app"
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/cluster_endtoend_13.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ concurrency:
group: format('{0}-{1}', ${{ github.ref }}, 'Cluster (13)')
cancel-in-progress: true

permissions: read-all

env:
LAUNCHABLE_ORGANIZATION: "vitess"
LAUNCHABLE_WORKSPACE: "vitess-app"
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/cluster_endtoend_15.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ concurrency:
group: format('{0}-{1}', ${{ github.ref }}, 'Cluster (15)')
cancel-in-progress: true

permissions: read-all

env:
LAUNCHABLE_ORGANIZATION: "vitess"
LAUNCHABLE_WORKSPACE: "vitess-app"
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/cluster_endtoend_18.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ concurrency:
group: format('{0}-{1}', ${{ github.ref }}, 'Cluster (18)')
cancel-in-progress: true

permissions: read-all

env:
LAUNCHABLE_ORGANIZATION: "vitess"
LAUNCHABLE_WORKSPACE: "vitess-app"
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/cluster_endtoend_21.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ concurrency:
group: format('{0}-{1}', ${{ github.ref }}, 'Cluster (21)')
cancel-in-progress: true

permissions: read-all

env:
LAUNCHABLE_ORGANIZATION: "vitess"
LAUNCHABLE_WORKSPACE: "vitess-app"
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/cluster_endtoend_22.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ concurrency:
group: format('{0}-{1}', ${{ github.ref }}, 'Cluster (22)')
cancel-in-progress: true

permissions: read-all

env:
LAUNCHABLE_ORGANIZATION: "vitess"
LAUNCHABLE_WORKSPACE: "vitess-app"
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/cluster_endtoend_backup_pitr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ concurrency:
group: format('{0}-{1}', ${{ github.ref }}, 'Cluster (backup_pitr)')
cancel-in-progress: true

permissions: read-all

env:
LAUNCHABLE_ORGANIZATION: "vitess"
LAUNCHABLE_WORKSPACE: "vitess-app"
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/cluster_endtoend_backup_pitr_mysql57.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ concurrency:
group: format('{0}-{1}', ${{ github.ref }}, 'Cluster (backup_pitr) mysql57')
cancel-in-progress: true

permissions: read-all

env:
LAUNCHABLE_ORGANIZATION: "vitess"
LAUNCHABLE_WORKSPACE: "vitess-app"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ concurrency:
group: format('{0}-{1}', ${{ github.ref }}, 'Cluster (ers_prs_newfeatures_heavy)')
cancel-in-progress: true

permissions: read-all

env:
LAUNCHABLE_ORGANIZATION: "vitess"
LAUNCHABLE_WORKSPACE: "vitess-app"
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/cluster_endtoend_mysql80.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ concurrency:
group: format('{0}-{1}', ${{ github.ref }}, 'Cluster (mysql80)')
cancel-in-progress: true

permissions: read-all

env:
LAUNCHABLE_ORGANIZATION: "vitess"
LAUNCHABLE_WORKSPACE: "vitess-app"
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/cluster_endtoend_mysql_server_vault.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ concurrency:
group: format('{0}-{1}', ${{ github.ref }}, 'Cluster (mysql_server_vault)')
cancel-in-progress: true

permissions: read-all

env:
LAUNCHABLE_ORGANIZATION: "vitess"
LAUNCHABLE_WORKSPACE: "vitess-app"
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/cluster_endtoend_onlineddl_ghost.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ concurrency:
group: format('{0}-{1}', ${{ github.ref }}, 'Cluster (onlineddl_ghost)')
cancel-in-progress: true

permissions: read-all

env:
LAUNCHABLE_ORGANIZATION: "vitess"
LAUNCHABLE_WORKSPACE: "vitess-app"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ concurrency:
group: format('{0}-{1}', ${{ github.ref }}, 'Cluster (onlineddl_ghost) mysql57')
cancel-in-progress: true

permissions: read-all

env:
LAUNCHABLE_ORGANIZATION: "vitess"
LAUNCHABLE_WORKSPACE: "vitess-app"
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/cluster_endtoend_onlineddl_revert.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ concurrency:
group: format('{0}-{1}', ${{ github.ref }}, 'Cluster (onlineddl_revert)')
cancel-in-progress: true

permissions: read-all

env:
LAUNCHABLE_ORGANIZATION: "vitess"
LAUNCHABLE_WORKSPACE: "vitess-app"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ concurrency:
group: format('{0}-{1}', ${{ github.ref }}, 'Cluster (onlineddl_revert) mysql57')
cancel-in-progress: true

permissions: read-all

env:
LAUNCHABLE_ORGANIZATION: "vitess"
LAUNCHABLE_WORKSPACE: "vitess-app"
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/cluster_endtoend_onlineddl_scheduler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ concurrency:
group: format('{0}-{1}', ${{ github.ref }}, 'Cluster (onlineddl_scheduler)')
cancel-in-progress: true

permissions: read-all

env:
LAUNCHABLE_ORGANIZATION: "vitess"
LAUNCHABLE_WORKSPACE: "vitess-app"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ concurrency:
group: format('{0}-{1}', ${{ github.ref }}, 'Cluster (onlineddl_scheduler) mysql57')
cancel-in-progress: true

permissions: read-all

env:
LAUNCHABLE_ORGANIZATION: "vitess"
LAUNCHABLE_WORKSPACE: "vitess-app"
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/cluster_endtoend_onlineddl_vrepl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ concurrency:
group: format('{0}-{1}', ${{ github.ref }}, 'Cluster (onlineddl_vrepl)')
cancel-in-progress: true

permissions: read-all

env:
LAUNCHABLE_ORGANIZATION: "vitess"
LAUNCHABLE_WORKSPACE: "vitess-app"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ concurrency:
group: format('{0}-{1}', ${{ github.ref }}, 'Cluster (onlineddl_vrepl) mysql57')
cancel-in-progress: true

permissions: read-all

env:
LAUNCHABLE_ORGANIZATION: "vitess"
LAUNCHABLE_WORKSPACE: "vitess-app"
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/cluster_endtoend_onlineddl_vrepl_stress.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ concurrency:
group: format('{0}-{1}', ${{ github.ref }}, 'Cluster (onlineddl_vrepl_stress)')
cancel-in-progress: true

permissions: read-all

env:
LAUNCHABLE_ORGANIZATION: "vitess"
LAUNCHABLE_WORKSPACE: "vitess-app"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ concurrency:
group: format('{0}-{1}', ${{ github.ref }}, 'Cluster (onlineddl_vrepl_stress) mysql57')
cancel-in-progress: true

permissions: read-all

env:
LAUNCHABLE_ORGANIZATION: "vitess"
LAUNCHABLE_WORKSPACE: "vitess-app"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ concurrency:
group: format('{0}-{1}', ${{ github.ref }}, 'Cluster (onlineddl_vrepl_stress_suite)')
cancel-in-progress: true

permissions: read-all

env:
LAUNCHABLE_ORGANIZATION: "vitess"
LAUNCHABLE_WORKSPACE: "vitess-app"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ concurrency:
group: format('{0}-{1}', ${{ github.ref }}, 'Cluster (onlineddl_vrepl_stress_suite) mysql57')
cancel-in-progress: true

permissions: read-all

env:
LAUNCHABLE_ORGANIZATION: "vitess"
LAUNCHABLE_WORKSPACE: "vitess-app"
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/cluster_endtoend_onlineddl_vrepl_suite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ concurrency:
group: format('{0}-{1}', ${{ github.ref }}, 'Cluster (onlineddl_vrepl_suite)')
cancel-in-progress: true

permissions: read-all

env:
LAUNCHABLE_ORGANIZATION: "vitess"
LAUNCHABLE_WORKSPACE: "vitess-app"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ concurrency:
group: format('{0}-{1}', ${{ github.ref }}, 'Cluster (onlineddl_vrepl_suite) mysql57')
cancel-in-progress: true

permissions: read-all

env:
LAUNCHABLE_ORGANIZATION: "vitess"
LAUNCHABLE_WORKSPACE: "vitess-app"
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/cluster_endtoend_schemadiff_vrepl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ concurrency:
group: format('{0}-{1}', ${{ github.ref }}, 'Cluster (schemadiff_vrepl)')
cancel-in-progress: true

permissions: read-all

env:
LAUNCHABLE_ORGANIZATION: "vitess"
LAUNCHABLE_WORKSPACE: "vitess-app"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ concurrency:
group: format('{0}-{1}', ${{ github.ref }}, 'Cluster (schemadiff_vrepl) mysql57')
cancel-in-progress: true

permissions: read-all

env:
LAUNCHABLE_ORGANIZATION: "vitess"
LAUNCHABLE_WORKSPACE: "vitess-app"
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/cluster_endtoend_tabletmanager_consul.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ concurrency:
group: format('{0}-{1}', ${{ github.ref }}, 'Cluster (tabletmanager_consul)')
cancel-in-progress: true

permissions: read-all

env:
LAUNCHABLE_ORGANIZATION: "vitess"
LAUNCHABLE_WORKSPACE: "vitess-app"
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/cluster_endtoend_tabletmanager_tablegc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ concurrency:
group: format('{0}-{1}', ${{ github.ref }}, 'Cluster (tabletmanager_tablegc)')
cancel-in-progress: true

permissions: read-all

env:
LAUNCHABLE_ORGANIZATION: "vitess"
LAUNCHABLE_WORKSPACE: "vitess-app"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ concurrency:
group: format('{0}-{1}', ${{ github.ref }}, 'Cluster (tabletmanager_tablegc) mysql57')
cancel-in-progress: true

permissions: read-all

env:
LAUNCHABLE_ORGANIZATION: "vitess"
LAUNCHABLE_WORKSPACE: "vitess-app"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ concurrency:
group: format('{0}-{1}', ${{ github.ref }}, 'Cluster (tabletmanager_throttler)')
cancel-in-progress: true

permissions: read-all

env:
LAUNCHABLE_ORGANIZATION: "vitess"
LAUNCHABLE_WORKSPACE: "vitess-app"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ concurrency:
group: format('{0}-{1}', ${{ github.ref }}, 'Cluster (tabletmanager_throttler_custom_config)')
cancel-in-progress: true

permissions: read-all

env:
LAUNCHABLE_ORGANIZATION: "vitess"
LAUNCHABLE_WORKSPACE: "vitess-app"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ concurrency:
group: format('{0}-{1}', ${{ github.ref }}, 'Cluster (tabletmanager_throttler_topo)')
cancel-in-progress: true

permissions: read-all

env:
LAUNCHABLE_ORGANIZATION: "vitess"
LAUNCHABLE_WORKSPACE: "vitess-app"
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/cluster_endtoend_topo_connection_cache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ concurrency:
group: format('{0}-{1}', ${{ github.ref }}, 'Cluster (topo_connection_cache)')
cancel-in-progress: true

permissions: read-all

env:
LAUNCHABLE_ORGANIZATION: "vitess"
LAUNCHABLE_WORKSPACE: "vitess-app"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ concurrency:
group: format('{0}-{1}', ${{ github.ref }}, 'Cluster (vreplication_across_db_versions)')
cancel-in-progress: true

permissions: read-all

env:
LAUNCHABLE_ORGANIZATION: "vitess"
LAUNCHABLE_WORKSPACE: "vitess-app"
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/cluster_endtoend_vreplication_basic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ concurrency:
group: format('{0}-{1}', ${{ github.ref }}, 'Cluster (vreplication_basic)')
cancel-in-progress: true

permissions: read-all

env:
LAUNCHABLE_ORGANIZATION: "vitess"
LAUNCHABLE_WORKSPACE: "vitess-app"
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/cluster_endtoend_vreplication_cellalias.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ concurrency:
group: format('{0}-{1}', ${{ github.ref }}, 'Cluster (vreplication_cellalias)')
cancel-in-progress: true

permissions: read-all

env:
LAUNCHABLE_ORGANIZATION: "vitess"
LAUNCHABLE_WORKSPACE: "vitess-app"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ concurrency:
group: format('{0}-{1}', ${{ github.ref }}, 'Cluster (vreplication_migrate_vdiff2_convert_tz)')
cancel-in-progress: true

permissions: read-all

env:
LAUNCHABLE_ORGANIZATION: "vitess"
LAUNCHABLE_WORKSPACE: "vitess-app"
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/cluster_endtoend_vreplication_multicell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ concurrency:
group: format('{0}-{1}', ${{ github.ref }}, 'Cluster (vreplication_multicell)')
cancel-in-progress: true

permissions: read-all

env:
LAUNCHABLE_ORGANIZATION: "vitess"
LAUNCHABLE_WORKSPACE: "vitess-app"
Expand Down
Loading

0 comments on commit e1b79be

Please sign in to comment.