Skip to content

Commit 1b966ef

Browse files
authored
Merge pull request #20 from austenstone/autofixes
Fix 18 code scanning alerts
2 parents 23b8b82 + 6412c3a commit 1b966ef

8 files changed

+44
-0
lines changed

.github/workflows/angular.azure.web.app.deploy.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ on:
1111
required: true
1212
type: string
1313

14+
permissions:
15+
contents: read
16+
1417
jobs:
1518
azure-web-app:
1619
runs-on: ubuntu-latest

.github/workflows/angular.azure.web.static.deploy.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
permissions:
2+
contents: read
13
name: Azure Static Site Deploy
24

35
on:

.github/workflows/angular.build.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ on:
1212
required: false
1313
type: string
1414

15+
permissions:
16+
contents: read
17+
actions: write
18+
1519
jobs:
1620
build:
1721
runs-on: ${{ inputs.runs-on }}

.github/workflows/angular.docker.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
name: Docker Deploy
22

3+
permissions:
4+
contents: read
5+
packages: write
6+
actions: write
7+
38
on:
49
workflow_call:
510
inputs:
@@ -25,6 +30,9 @@ env:
2530
jobs:
2631

2732
docker:
33+
permissions:
34+
contents: read
35+
packages: write
2836
environment:
2937
name: DockerHub
3038
url: https://hub.docker.com/r/${{ inputs.dockerhub-username }}/${{ github.event.repository.name }}
@@ -50,6 +58,9 @@ jobs:
5058
images: ${{ inputs.dockerhub-username }}/${{ github.event.repository.name }}
5159

5260
docker-ghcr:
61+
permissions:
62+
contents: read
63+
packages: write
5364
environment:
5465
name: GitHub Container Registry
5566
url: https://github.com/${{ github.event.repository.owner.login }}/${{ github.event.repository.name }}/pkgs/container/${{ github.event.repository.name }}

.github/workflows/angular.lint.yml

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

6+
permissions:
7+
contents: read
8+
69
jobs:
710
lint:
811
runs-on: ubuntu-latest

.github/workflows/angular.terraform.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
name: "Terraform"
22

3+
permissions:
4+
contents: read
5+
pull-requests: write
6+
37
on:
48
workflow_call:
59
outputs:

.github/workflows/angular.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ name: Angular
33
on:
44
workflow_call:
55

6+
permissions:
7+
contents: read
8+
69
jobs:
710
build:
811
name: ⚒️
@@ -29,12 +32,17 @@ jobs:
2932
name: 🚀
3033
if: github.ref == 'refs/heads/main'
3134
needs: [build, test, lint]
35+
permissions:
36+
contents: read
37+
pages: write
3238
uses: ./.github/workflows/angular.pages.deploy.yml
3339

3440
docker:
3541
name: 🐳
3642
if: startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/main'
3743
needs: [build]
44+
permissions:
45+
contents: read
3846
uses: ./.github/workflows/angular.docker.yml
3947
secrets: inherit
4048

@@ -43,13 +51,18 @@ jobs:
4351
# skip until we get Azure working
4452
# if: 0
4553
needs: [docker, test, lint]
54+
permissions:
55+
contents: read
4656
uses: ./.github/workflows/angular.terraform.yml
4757
secrets: inherit
4858

4959
azure-deploy:
5060
name: ☁️
5161
if: needs.terraform.outputs.api_key && github.ref == 'refs/heads/main'
5262
needs: [terraform]
63+
permissions:
64+
contents: read
65+
deployments: write
5366
uses: ./.github/workflows/angular.azure.web.static.deploy.yml
5467
with:
5568
api_key: ${{ needs.terraform.outputs.api_key }}
@@ -69,4 +82,6 @@ jobs:
6982
name: 🚢
7083
if: startsWith(github.ref, 'refs/tags/')
7184
needs: [build, test, lint]
85+
permissions:
86+
contents: write
7287
uses: ./.github/workflows/angular.release.yml

.github/workflows/build-test-deploy.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
permissions:
2+
contents: read
13
name: CI/CD
24
on:
35
workflow_dispatch:

0 commit comments

Comments
 (0)