Skip to content

Commit d02afc2

Browse files
Copilotlippytm
andcommitted
Add explicit permissions to workflows for security
Co-authored-by: lippytm <65956507+lippytm@users.noreply.github.com>
1 parent c563b08 commit d02afc2

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

.github/workflows/blank.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ jobs:
3131
build:
3232
# The type of runner that the job will run on
3333
runs-on: ubuntu-latest
34+
permissions:
35+
contents: read
3436

3537
# Steps represent a sequence of tasks that will be executed as part of the job
3638
steps:
@@ -63,6 +65,8 @@ jobs:
6365
# Job to check status of connected repositories
6466
check-connected-repos:
6567
runs-on: ubuntu-latest
68+
permissions:
69+
contents: read
6670
strategy:
6771
matrix:
6872
repo:

.github/workflows/cross-repo-sync.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ on:
1616
jobs:
1717
notify-connected-repos:
1818
runs-on: ubuntu-latest
19+
permissions:
20+
contents: read
1921
if: github.event_name == 'workflow_dispatch' && github.event.inputs.notify_all == 'true'
2022
strategy:
2123
matrix:
@@ -44,6 +46,8 @@ jobs:
4446

4547
display-repo-connections:
4648
runs-on: ubuntu-latest
49+
permissions:
50+
contents: read
4751
steps:
4852
- name: Display Connected Repository Network
4953
run: |

0 commit comments

Comments
 (0)