Skip to content

Commit 6560a41

Browse files
authored
Security/relock dependencies for tornado and setuptools (#579)
* Update to exasol-toolbox 1.3.0 * Remove dependencies which are used in the toolbox itself * Update pre-commit hook to correct nox tasks * Get rid of version check as duplicate to PTB * Reduce mypy scope to areas with specific issues * Update workflows to exasol-toolbox to 1.3.0 * Update locked dependencies to resolve CVE-2025-47287 & CVE-2025-47273
1 parent 2156fd5 commit 6560a41

20 files changed

+950
-840
lines changed

.github/workflows/build-and-publish.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,14 @@ jobs:
1111
cd-job:
1212
name: Continuous Delivery
1313
runs-on: ubuntu-24.04
14+
permissions:
15+
contents: write
1416
steps:
15-
1617
- name: SCM Checkout
1718
uses: actions/checkout@v4
1819

1920
- name: Setup Python & Poetry Environment
20-
uses: exasol/python-toolbox/.github/actions/python-environment@1.0.1
21+
uses: exasol/python-toolbox/.github/actions/python-environment@1.3.0
2122

2223
- name: Build Artifacts
2324
run: poetry build

.github/workflows/cd.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,23 @@ jobs:
1010
check-tag-version-job:
1111
name: Check Release Tag
1212
uses: ./.github/workflows/check-release-tag.yml
13+
permissions:
14+
contents: read
1315

1416
cd-job:
1517
name: Continuous Delivery
1618
uses: ./.github/workflows/build-and-publish.yml
19+
permissions:
20+
contents: write
1721
secrets:
1822
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
1923

2024
publish-docs:
2125
needs: [ cd-job ]
2226
name: Publish Documentation
2327
uses: ./.github/workflows/gh-pages.yml
28+
permissions:
29+
contents: read
30+
pages: write
31+
id-token: write
2432

.github/workflows/check-release-tag.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,21 @@
11
name: Check Release Tag
22

3-
on: workflow_call
3+
on:
4+
workflow_call:
45

56
jobs:
67

78
check-tag-version-job:
8-
99
name: Check Tag Version
1010
runs-on: ubuntu-24.04
11-
11+
permissions:
12+
contents: read
1213
steps:
1314
- name: SCM Checkout
1415
uses: actions/checkout@v4
1516

1617
- name: Setup Python & Poetry Environment
17-
uses: exasol/python-toolbox/.github/actions/python-environment@1.0.1
18+
uses: exasol/python-toolbox/.github/actions/python-environment@1.3.0
1819

1920
- name: Check Tag Version
2021
# make sure the pushed/created tag matched the project version

.github/workflows/checks.yml

Lines changed: 31 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -4,35 +4,35 @@ on:
44
workflow_call:
55

66
jobs:
7-
87
Version-Check:
98
name: Version
109
runs-on: ubuntu-24.04
11-
10+
permissions:
11+
contents: read
1212
steps:
1313
- name: SCM Checkout
1414
uses: actions/checkout@v4
1515
with:
1616
fetch-depth: 0
1717

1818
- name: Setup Python & Poetry Environment
19-
uses: exasol/python-toolbox/.github/actions/python-environment@1.0.1
19+
uses: exasol/python-toolbox/.github/actions/python-environment@1.3.0
2020

2121
- name: Check Version(s)
22-
run: |
23-
poetry run version-check `poetry run -- python -c "from noxconfig import PROJECT_CONFIG; print(PROJECT_CONFIG.version_file)"`
22+
run: poetry run -- nox -s version:check
2423

2524
Documentation:
2625
name: Docs
2726
needs: [ Version-Check ]
2827
runs-on: ubuntu-24.04
29-
28+
permissions:
29+
contents: read
3030
steps:
3131
- name: SCM Checkout
3232
uses: actions/checkout@v4
3333

3434
- name: Setup Python & Poetry Environment
35-
uses: exasol/python-toolbox/.github/actions/python-environment@1.0.1
35+
uses: exasol/python-toolbox/.github/actions/python-environment@1.3.0
3636

3737
- name: Build Documentation
3838
run: |
@@ -41,18 +41,21 @@ jobs:
4141
build-matrix:
4242
name: Generate Build Matrix
4343
uses: ./.github/workflows/matrix-python.yml
44+
permissions:
45+
contents: read
4446

4547
Changelog:
4648
name: Changelog Update Check
4749
runs-on: ubuntu-24.04
50+
permissions:
51+
contents: read
4852
if: ${{ github.ref != 'refs/heads/main' && github.ref != 'refs/heads/master' }}
49-
5053
steps:
5154
- name: SCM Checkout
5255
uses: actions/checkout@v4
5356

5457
- name: Setup Python & Poetry Environment
55-
uses: exasol/python-toolbox/.github/actions/python-environment@1.0.1
58+
uses: exasol/python-toolbox/.github/actions/python-environment@1.3.0
5659

5760
- name: Run changelog update check
5861
run: poetry run -- nox -s changelog:updated
@@ -61,24 +64,25 @@ jobs:
6164
name: Linting (Python-${{ matrix.python-version }})
6265
needs: [ Version-Check, build-matrix ]
6366
runs-on: ubuntu-24.04
67+
permissions:
68+
contents: read
6469
strategy:
6570
fail-fast: false
6671
matrix: ${{ fromJson(needs.build-matrix.outputs.matrix) }}
67-
6872
steps:
6973
- name: SCM Checkout
7074
uses: actions/checkout@v4
7175

7276
- name: Setup Python & Poetry Environment
73-
uses: exasol/python-toolbox/.github/actions/python-environment@1.0.1
77+
uses: exasol/python-toolbox/.github/actions/python-environment@1.3.0
7478
with:
7579
python-version: ${{ matrix.python-version }}
7680

7781
- name: Run lint
7882
run: poetry run -- nox -s lint:code
7983

8084
- name: Upload Artifacts
81-
uses: actions/[email protected].0
85+
uses: actions/[email protected].2
8286
with:
8387
name: lint-python${{ matrix.python-version }}
8488
path: |
@@ -90,6 +94,8 @@ jobs:
9094
name: Type Checking (Python-${{ matrix.python-version }})
9195
needs: [ Version-Check, build-matrix ]
9296
runs-on: ubuntu-24.04
97+
permissions:
98+
contents: read
9399
strategy:
94100
fail-fast: false
95101
matrix: ${{ fromJson(needs.build-matrix.outputs.matrix) }}
@@ -99,7 +105,7 @@ jobs:
99105
uses: actions/checkout@v4
100106

101107
- name: Setup Python & Poetry Environment
102-
uses: exasol/python-toolbox/.github/actions/python-environment@1.0.1
108+
uses: exasol/python-toolbox/.github/actions/python-environment@1.3.0
103109
with:
104110
python-version: ${{ matrix.python-version }}
105111

@@ -110,6 +116,8 @@ jobs:
110116
name: Security Checks (Python-${{ matrix.python-version }})
111117
needs: [ Version-Check, build-matrix ]
112118
runs-on: ubuntu-24.04
119+
permissions:
120+
contents: read
113121
strategy:
114122
fail-fast: false
115123
matrix: ${{ fromJson(needs.build-matrix.outputs.matrix) }}
@@ -119,15 +127,15 @@ jobs:
119127
uses: actions/checkout@v4
120128

121129
- name: Setup Python & Poetry Environment
122-
uses: exasol/python-toolbox/.github/actions/python-environment@1.0.1
130+
uses: exasol/python-toolbox/.github/actions/python-environment@1.3.0
123131
with:
124132
python-version: ${{ matrix.python-version }}
125133

126134
- name: Run security linter
127135
run: poetry run -- nox -s lint:security
128136

129137
- name: Upload Artifacts
130-
uses: actions/[email protected].0
138+
uses: actions/[email protected].2
131139
with:
132140
name: security-python${{ matrix.python-version }}
133141
path: .security.json
@@ -136,21 +144,24 @@ jobs:
136144
Format:
137145
name: Format Check
138146
runs-on: ubuntu-24.04
139-
147+
permissions:
148+
contents: read
140149
steps:
141150
- name: SCM Checkout
142151
uses: actions/checkout@v4
143152

144153
- name: Setup Python & Poetry Environment
145-
uses: exasol/python-toolbox/.github/actions/python-environment@1.0.1
154+
uses: exasol/python-toolbox/.github/actions/python-environment@1.3.0
146155

147156
- name: Run format check
148157
run: poetry run -- nox -s project:format
149158

150159
Tests:
151-
name: Unit-Tests (Python-${{ matrix.python-version }}, Exasol-${{ matrix.exasol-version}})
160+
name: Unit-Tests (Python-${{ matrix.python-version }})
152161
needs: [ Documentation, Lint, Type-Check, Security, Format, build-matrix ]
153162
runs-on: ubuntu-24.04
163+
permissions:
164+
contents: read
154165
env:
155166
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
156167
strategy:
@@ -162,15 +173,15 @@ jobs:
162173
uses: actions/checkout@v4
163174

164175
- name: Setup Python & Poetry Environment
165-
uses: exasol/python-toolbox/.github/actions/python-environment@1.0.1
176+
uses: exasol/python-toolbox/.github/actions/python-environment@1.3.0
166177
with:
167178
python-version: ${{ matrix.python-version }}
168179

169180
- name: Run Tests and Collect Coverage
170181
run: poetry run -- nox -s test:unit -- --coverage
171182

172183
- name: Upload Artifacts
173-
uses: actions/[email protected].0
184+
uses: actions/[email protected].2
174185
with:
175186
name: coverage-python${{ matrix.python-version }}-fast
176187
path: .coverage

.github/workflows/ci.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,19 @@ on:
88
- "main"
99
- "master"
1010
schedule:
11-
# At 00:00 on every 7th day-of-month from 1 through 31. (https://crontab.guru)
11+
# "At 00:00 on every 7th day-of-month from 1 through 31." (https://crontab.guru)
1212
- cron: "0 0 1/7 * *"
1313

1414
jobs:
1515

1616
CI:
1717
uses: ./.github/workflows/merge-gate.yml
1818
secrets: inherit
19+
permissions:
20+
contents: read
1921

2022
Metrics:
2123
needs: [ CI ]
2224
uses: ./.github/workflows/report.yml
25+
permissions:
26+
contents: read

.github/workflows/gh-pages.yml

Lines changed: 23 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,26 +6,40 @@ on:
66

77
jobs:
88

9-
documentation-job:
9+
build-documentation:
1010
runs-on: ubuntu-24.04
11-
11+
permissions:
12+
contents: read
1213
steps:
1314
- name: SCM Checkout
1415
uses: actions/checkout@v4
1516
with:
1617
fetch-depth: 0
1718

1819
- name: Setup Python & Poetry Environment
19-
uses: exasol/python-toolbox/.github/actions/python-environment@1.0.1
20+
uses: exasol/python-toolbox/.github/actions/python-environment@1.3.0
2021

2122
- name: Build Documentation
2223
run: |
2324
poetry run -- nox -s docs:multiversion
25+
rm -r .html-documentation/*/.doctrees
2426
25-
- name: Deploy
26-
uses: JamesIves/github-pages-[email protected]
27+
- name: Upload artifact
28+
uses: actions/upload-pages-artifact@v3
2729
with:
28-
branch: gh-pages
29-
folder: .html-documentation
30-
git-config-name: Github Action
31-
git-config-email: [email protected]
30+
path: .html-documentation
31+
32+
deploy-documentation:
33+
needs: [ build-documentation ]
34+
permissions:
35+
contents: read
36+
pages: write
37+
id-token: write
38+
environment:
39+
name: github-pages
40+
url: ${{ steps.deployment.outputs.page_url }}
41+
runs-on: ubuntu-24.04
42+
steps:
43+
- name: Deploy to GitHub Pages
44+
id: deployment
45+
uses: actions/deploy-pages@v4

.github/workflows/matrix-all.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@ on:
99

1010
jobs:
1111
all_versions:
12-
1312
runs-on: ubuntu-24.04
14-
13+
permissions:
14+
contents: read
1515
steps:
1616
- name: SCM Checkout
1717
uses: actions/checkout@v4
1818

1919
- name: Setup Python & Poetry Environment
20-
uses: exasol/python-toolbox/.github/actions/python-environment@1.0.1
20+
uses: exasol/python-toolbox/.github/actions/python-environment@1.3.0
2121

2222
- name: Generate matrix
2323
run: poetry run -- nox -s matrix:all

.github/workflows/matrix-exasol.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@ on:
99

1010
jobs:
1111
exasol_versions:
12-
1312
runs-on: ubuntu-24.04
14-
13+
permissions:
14+
contents: read
1515
steps:
1616
- name: SCM Checkout
1717
uses: actions/checkout@v4
1818

1919
- name: Setup Python & Poetry Environment
20-
uses: exasol/python-toolbox/.github/actions/python-environment@1.0.1
20+
uses: exasol/python-toolbox/.github/actions/python-environment@1.3.0
2121

2222
- name: Generate matrix
2323
run: poetry run -- nox -s matrix:exasol

.github/workflows/matrix-python.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@ on:
99

1010
jobs:
1111
python_versions:
12-
1312
runs-on: ubuntu-24.04
14-
13+
permissions:
14+
contents: read
1515
steps:
1616
- name: SCM Checkout
1717
uses: actions/checkout@v4
1818

1919
- name: Setup Python & Poetry Environment
20-
uses: exasol/python-toolbox/.github/actions/python-environment@1.0.1
20+
uses: exasol/python-toolbox/.github/actions/python-environment@1.3.0
2121

2222
- name: Generate matrix
2323
run: poetry run -- nox -s matrix:python

0 commit comments

Comments
 (0)