Skip to content

Commit ada456f

Browse files
committed
Set only necessary permissions for all workflows
* This will override the default permissions which would allow read-write permissions
1 parent cd31e21 commit ada456f

8 files changed

Lines changed: 16 additions & 0 deletions

.github/workflows/build-and-push-image.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ concurrency:
1414
env:
1515
PUSH_IMAGE_TO_PRODUCTION: ${{ github.ref_name == 'main' }}
1616

17+
permissions: {}
18+
1719
jobs:
1820
check-image-presence:
1921
name: Check if images already exist

.github/workflows/continuous-deployment.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ on:
55
push:
66
branches: [main]
77

8+
permissions: {}
9+
810
jobs:
911
test:
1012
uses: ./.github/workflows/test.yml

.github/workflows/deploy-application.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ on:
3838
required: true
3939
type: string
4040

41+
permissions: {}
42+
4143
concurrency:
4244
group: deploy-application-${{ inputs.environment }}
4345

.github/workflows/deploy-infrastructure.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ on:
3030
required: false
3131
type: string
3232

33+
permissions: {}
34+
3335
concurrency:
3436
group: deploy-infrastructure-${{ inputs.environment }}
3537

.github/workflows/deploy.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ run-name: Deploy ${{ inputs.git_ref_to_deploy || github.ref_name }} to ${{ input
44
concurrency:
55
group: deploy-${{ inputs.environment }}
66

7+
permissions: {}
8+
79
on:
810
workflow_call:
911
inputs:

.github/workflows/destroy-infrastructure.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ on:
1919
env:
2020
aws_role: arn:aws:iam::393416225559:role/GithubDeployMavisAndInfrastructure
2121

22+
permissions: {}
23+
2224
jobs:
2325
destroy-resources:
2426
name: Destroy resources

.github/workflows/lint.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ name: Lint
33
on:
44
pull_request:
55

6+
permissions: {}
7+
68
jobs:
79
prettier:
810
name: Prettier

.github/workflows/test.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ on:
44
pull_request:
55
workflow_call:
66

7+
permissions: {}
8+
79
jobs:
810
rails:
911
name: Rails

0 commit comments

Comments
 (0)