Skip to content

Commit 47409da

Browse files
committed
security: add explicit permissions to workflows to address code scanning alerts
1 parent c3e07ef commit 47409da

4 files changed

Lines changed: 14 additions & 0 deletions

File tree

.github/workflows/copilot-setup-steps.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
name: Copilot Setup Steps
22
on:
33
workflow_dispatch:
4+
5+
permissions:
6+
contents: read
7+
48
jobs:
59
copilot-setup-steps:
610
runs-on: ubuntu-latest

.github/workflows/pages.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ on:
55
branches:
66
- main
77
workflow_dispatch:
8+
9+
permissions:
10+
contents: read
11+
812
concurrency:
913
group: ${{ github.workflow }}-${{ github.ref }}
1014
cancel-in-progress: true

.github/workflows/release.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ on:
44
push:
55
tags: "v*"
66

7+
permissions:
8+
contents: read
9+
710
jobs:
811
release_pypi:
912
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')

.github/workflows/test_code.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ on:
66
branches:
77
- main
88

9+
permissions:
10+
contents: read
11+
912
jobs:
1013
pre-commit:
1114
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)