Skip to content

Commit

Permalink
Update permissions for Deploy Reference Documentation and add permiss…
Browse files Browse the repository at this point in the history
…ions for _BuildALGoProject (#1016)

Deploy Reference Documentation is currently given `contents: write`
permission but it doesn't seem to need it. These workflows succeeded
with `contents: read` permission
https://github.com/aholstrup1/BCApps/actions/runs/8538607739
https://github.com/aholstrup1/BCApps/actions/runs/8535969767

This PR would lower that permission and explicitly add top-level
permissions for the _BuildALGoProject reusable workflow

See also results on
https://github.com/microsoft/BCApps/security/code-scanning for more info
on why we'd like to lower these permissions of possible :)
  • Loading branch information
aholstrup1 authored Apr 11, 2024
1 parent d1b8463 commit f6bfb8f
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Templates/AppSource App/.github/workflows/CICD.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ jobs:
runs-on: windows-latest
name: Deploy Reference Documentation
permissions:
contents: write
contents: read
actions: read
pages: write
id-token: write
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
workflow_dispatch:

permissions:
contents: write
contents: read
actions: read
pages: write
id-token: write
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,10 @@ on:
required: false
type: string

permissions:
contents: read
actions: read

env:
ALGoOrgSettings: ${{ vars.ALGoOrgSettings }}
ALGoRepoSettings: ${{ vars.ALGoRepoSettings }}
Expand Down
2 changes: 1 addition & 1 deletion Templates/Per Tenant Extension/.github/workflows/CICD.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ jobs:
runs-on: windows-latest
name: Deploy Reference Documentation
permissions:
contents: write
contents: read
actions: read
pages: write
id-token: write
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
workflow_dispatch:

permissions:
contents: write
contents: read
actions: read
pages: write
id-token: write
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,10 @@ on:
required: false
type: string

permissions:
contents: read
actions: read

env:
ALGoOrgSettings: ${{ vars.ALGoOrgSettings }}
ALGoRepoSettings: ${{ vars.ALGoRepoSettings }}
Expand Down

0 comments on commit f6bfb8f

Please sign in to comment.