Skip to content

Commit 35d5926

Browse files
Tranquility2Copilot
andcommitted
ci: add explicit contents:read permissions to workflows
Addresses 'Workflow does not contain permissions' security warning by declaring least-privilege GITHUB_TOKEN scopes for all CI workflows. Fixes #52 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 8c67b7f commit 35d5926

7 files changed

Lines changed: 21 additions & 0 deletions

File tree

.github/workflows/bandit.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
name: Bandit
22
on: [ pull_request, workflow_dispatch ]
33

4+
permissions:
5+
contents: read
6+
47
jobs:
58
build:
69
name: Bandit Validation

.github/workflows/black.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
name: Black
22
on: [ pull_request, workflow_dispatch ]
33

4+
permissions:
5+
contents: read
6+
47
jobs:
58
build:
69
name: Black Validation

.github/workflows/coverage.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
name: Coverage
22
on: [ pull_request, workflow_dispatch ]
33

4+
permissions:
5+
contents: read
6+
47
jobs:
58
build:
69
name: Coverage Validation

.github/workflows/isort.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
name: Isort
22
on: [ pull_request, workflow_dispatch ]
33

4+
permissions:
5+
contents: read
6+
47
jobs:
58
build:
69
name: Isort Validation

.github/workflows/mypy.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
name: Mypy
22
on: [ pull_request, workflow_dispatch ]
33

4+
permissions:
5+
contents: read
6+
47
jobs:
58
build:
69
name: Mypy Validation

.github/workflows/pylint.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
name: Pylint
22
on: [ pull_request, workflow_dispatch ]
33

4+
permissions:
5+
contents: read
6+
47
jobs:
58
build:
69
name: Pylint Validation

.github/workflows/pytest.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
name: Pytest
22
on: [ pull_request, workflow_dispatch ]
33

4+
permissions:
5+
contents: read
6+
47
jobs:
58
build:
69
name: Pytest Validation

0 commit comments

Comments
 (0)