Skip to content

Commit 12dd622

Browse files
committed
scripts: pip: minimal security upgrades
gitpython 3.1.50->3.1.59, pillow 12.2.0->12.3.0, pyasn1 0.6.3->0.6.4, sh 2.2.2->2.3.0; pip-audit whitelist CVEs. Signed-off-by: Thomas Stilwell <thomas.stilwell@nordicsemi.no>
1 parent 2bf9fc7 commit 12dd622

6 files changed

Lines changed: 30 additions & 11 deletions

File tree

.github/workflows/validate-pip-requirements-fixed-file.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ on:
88
- 'v*-branch'
99
paths:
1010
- 'scripts/requirements*.txt'
11+
- 'scripts/requirements-fixed.in'
1112
- '.github/workflows/validate-pip-requirements-fixed-file.yml'
1213

1314
permissions:
@@ -70,12 +71,9 @@ jobs:
7071
pip3 install \
7172
--index-url https://files.nordicsemi.com/artifactory/api/pypi/nordic-pypi/simple \
7273
pip-compile-cross-platform==1.4.2+nordic.3 --upgrade
74+
# Expand requirements-fixed.in to CLI args (paths are west-topdir-relative).
7375
pip-compile-cross-platform \
74-
bootloader/mcuboot/scripts/requirements.txt \
75-
zephyr/scripts/requirements.txt \
76-
nrf/scripts/requirements-ci.txt \
77-
nrf/scripts/requirements-extra.txt \
78-
nrf/scripts/requirements.txt \
76+
$(grep -Ev '^\s*(#|$)' nrf/scripts/requirements-fixed.in | xargs) \
7977
--output-file nrf/scripts/requirements-fixed.txt \
8078
--min-python-version 3.12 \
8179
--index-url https://files.nordicsemi.com/artifactory/api/pypi/nordic-pypi/simple

scripts/pip-audit-whitelist.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,11 @@ py:
66
- CVE-2026-3219
77
- PYSEC-2024-311
88
- PYSEC-2026-151
9+
- PYSEC-2026-1325
10+
- PYSEC-2026-3447
11+
- PYSEC-2026-3544
12+
- PYSEC-2026-3552
13+
- PYSEC-2026-3553
14+
- PYSEC-2026-3554
15+
- PYSEC-2026-3721
16+
- GHSA-537c-gmf6-5ccf

scripts/requirements-ci.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ python-stdnum
1111
pytz
1212
pyusb
1313
qrcode
14-
stringcase==1.2.0
14+
stringcase>=1.2.0
1515
toml
1616
wget
1717
python-dotenv

scripts/requirements-extra.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,4 @@ idna>=3.7 # https://github.com/advisories/GHSA-jjg7-2v4v-x38h
1212
libusb>=1.0.26
1313
matter_idl
1414
python-path>=0.1.3
15+
sh>=2.2.4 # https://github.com/advisories/GHSA-q38v-wp89-2w55

scripts/requirements-fixed.in

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Compile input for nrf/scripts/requirements-fixed.txt
2+
#
3+
# Paths are west-topdir-relative. Used by ncs-tool-pip-compile (read-requirements-fixed-in.sh).
4+
# Later entries win on conflicting constraints; keep nrf/scripts/requirements-extra.txt last.
5+
#
6+
# https://github.com/nrfconnect/ncs-tool-pip-compile
7+
8+
bootloader/mcuboot/scripts/requirements.txt
9+
zephyr/scripts/requirements.txt
10+
nrf/scripts/requirements-ci.txt
11+
nrf/scripts/requirements.txt
12+
nrf/scripts/requirements-extra.txt

scripts/requirements-fixed.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# This file is autogenerated by pip-compile-cross-platform
33
# To update, run:
44
#
5-
# pip-compile-cross-platform bootloader/mcuboot/scripts/requirements.txt zephyr/scripts/requirements.txt nrf/scripts/requirements-ci.txt nrf/scripts/requirements-extra.txt nrf/scripts/requirements.txt --output-file nrf/scripts/requirements-fixed.txt --min-python-version 3.12 --index_url https://files.nordicsemi.com/artifactory/api/pypi/nordic-pypi/simple
5+
# pip-compile-cross-platform bootloader/mcuboot/scripts/requirements.txt zephyr/scripts/requirements.txt nrf/scripts/requirements-ci.txt nrf/scripts/requirements.txt nrf/scripts/requirements-extra.txt --output-file nrf/scripts/requirements-fixed.txt --min-python-version 3.12 --index_url https://files.nordicsemi.com/artifactory/api/pypi/nordic-pypi/simple
66
#
77
--index-url https://files.nordicsemi.com/artifactory/api/pypi/nordic-pypi/simple
88

@@ -53,7 +53,7 @@ future==1.0.0 ; python_version >= "3.12" and python_version < "4.0"
5353
gcovr==8.6 ; python_version >= "3.12" and python_version < "4.0"
5454
gitdb==4.0.12 ; python_version >= "3.12" and python_version < "4.0"
5555
gitlint-core==0.19.1 ; python_version >= "3.12" and python_version < "4.0"
56-
gitpython==3.1.50 ; python_version >= "3.12" and python_version < "4.0"
56+
gitpython==3.1.59 ; python_version >= "3.12" and python_version < "4.0"
5757
graphviz==0.21 ; python_version >= "3.12" and python_version < "4.0"
5858
grpcio-tools==1.76.0 ; python_version >= "3.12" and python_version < "4.0"
5959
grpcio==1.76.0 ; python_version >= "3.12" and python_version < "4.0"
@@ -101,7 +101,7 @@ oscrypto==1.3.0 ; python_version >= "3.12" and python_version < "4.0"
101101
packaging==25.0 ; python_version >= "3.12" and python_version < "4.0"
102102
pathspec==1.0.3 ; python_version >= "3.12" and python_version < "4.0"
103103
patool==4.0.3 ; python_version >= "3.12" and python_version < "4.0"
104-
pillow==12.2.0 ; python_version >= "3.12" and python_version < "4.0"
104+
pillow==12.3.0 ; python_version >= "3.12" and python_version < "4.0"
105105
pkg-about==2.0.9 ; python_version >= "3.12" and python_version < "4.0"
106106
platformdirs==4.5.1 ; python_version >= "3.12" and python_version < "4.0"
107107
plotly==6.5.1 ; python_version >= "3.12" and python_version < "4.0"
@@ -113,7 +113,7 @@ protobuf==6.33.4 ; python_version >= "3.12" and python_version < "4.0"
113113
psutil==7.2.1 ; python_version >= "3.12" and python_version < "4.0"
114114
py-utlx==2.0.2 ; python_version >= "3.12" and python_version < "4.0"
115115
py==1.11.0 ; python_version >= "3.12" and python_version < "4.0"
116-
pyasn1==0.6.3 ; python_version >= "3.12" and python_version < "4.0"
116+
pyasn1==0.6.4 ; python_version >= "3.12" and python_version < "4.0"
117117
pycparser==2.23 ; python_version >= "3.12" and python_version < "4.0" and implementation_name != "PyPy"
118118
pycryptodome==3.21.0 ; python_version >= "3.12" and python_version < "4.0"
119119
pyelftools==0.32 ; python_version >= "3.12" and python_version < "4.0"
@@ -159,7 +159,7 @@ semantic-version==2.10.0 ; python_version >= "3.12" and python_version < "4.0"
159159
semver==3.0.4 ; python_version >= "3.12" and python_version < "4.0"
160160
setuptools-scm==9.2.2 ; python_version >= "3.12" and python_version < "4.0"
161161
setuptools==80.10.1 ; python_version >= "3.12" and python_version < "4.0"
162-
sh==2.2.2 ; python_version >= "3.12" and python_version < "4.0" and sys_platform != "win32"
162+
sh==2.3.0 ; python_version >= "3.12" and python_version < "4.0"
163163
six==1.17.0 ; python_version >= "3.12" and python_version < "4.0"
164164
sly==0.5 ; python_version >= "3.12" and python_version < "4.0"
165165
smmap==5.0.2 ; python_version >= "3.12" and python_version < "4.0"

0 commit comments

Comments
 (0)