Skip to content

Commit cd5eec3

Browse files
author
Oumou
committed
fix(security): add permissions to workflow files
Add top-level permissions with contents: read to publish_pypi and omero_plugin workflows to restrict the default GITHUB_TOKEN scope and satisfy CodeQL security alerts.
1 parent 5c321aa commit cd5eec3

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

.github/workflows/omero_plugin.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,17 @@ on:
1616
schedule:
1717
- cron: '0 0 * * 0'
1818

19+
permissions:
20+
contents: read
21+
1922
jobs:
2023
test:
2124
name: Run integration tests against OMERO
2225
runs-on: ubuntu-22.04
2326
env:
2427
STAGE: app
2528
steps:
26-
- uses: actions/checkout@v4
29+
- uses: actions/checkout@v6
2730
- name: Checkout omero-test-infra
2831
uses: actions/checkout@master
2932
with:

.github/workflows/publish_pypi.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,16 @@ on:
55
tags:
66
- 'v*'
77

8+
permissions:
9+
contents: read
10+
811
jobs:
912
build-n-publish:
1013
name: Build and publish Python distribution to PyPI
1114
runs-on: ubuntu-22.04
1215
steps:
13-
- uses: actions/checkout@v4
14-
- uses: actions/setup-python@v4
16+
- uses: actions/checkout@v6
17+
- uses: actions/setup-python@v6
1518
with:
1619
python-version: '3.9'
1720
- name: Build a binary wheel and a source tarball

0 commit comments

Comments
 (0)