Skip to content

Commit 2fbb558

Browse files
committed
chore: enforce pinned dependencies with hashes in Python requirements
1 parent dccbb36 commit 2fbb558

2 files changed

Lines changed: 6 additions & 7 deletions

File tree

scripts/requirements.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
# Python dependencies for scripts in this directory
22
# Install with: pip install -r requirements.txt
33

4-
# Direct dependencies - all pinned and CVE-free
4+
# Direct dependencies - all pinned by version and hash
55

66
# Required by: scripts/ci/setup_release_automation
77
# Cryptography library for GitHub secret encryption
8-
PyNaCl==1.6.2
8+
PyNaCl==1.6.2 --hash=sha256:c949ea47e4206af7c8f604b8278093b674f7c79ed0d4719cc836902bf4517465
99

1010
# Required by: scripts/ci/render-notes.py
1111
# YAML parser for release notes
12-
PyYAML==6.0.1
12+
PyYAML==6.0.1 --hash=sha256:f003ed9ad21d6a4713f0a9b5a7a0a79e08dd0f221aff4525a2be4c346ee60aab
1313

1414
# Required by: scripts/ci/render-notes.py
1515
# Template engine for rendering changelog files
16-
Jinja2==3.1.6
16+
Jinja2==3.1.6 --hash=sha256:85ece4451f492d0c13c5dd7c13a64681a86afae63a5f347908daf103ce6d2f67
1717

1818
# Required by: scripts/ci/setup_release_automation, scripts/ci/render-notes.py
1919
# HTTP library for GitHub API interactions
20-
requests==2.32.4
20+
requests==2.32.4 --hash=sha256:27babd3cda2a6d50b30443204ee89830707d396671944c998b5975b031ac2b2c

scripts/test_python_scripts.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,7 @@ source "$VENV_DIR/bin/activate"
3636

3737
# Install dependencies
3838
echo "Installing dependencies..."
39-
pip install --quiet --upgrade pip
40-
pip install --quiet -r "$SCRIPT_DIR/requirements.txt"
39+
pip install --quiet --require-hashes --no-deps -r "$SCRIPT_DIR/requirements.txt"
4140
echo "✓ Dependencies installed"
4241
echo ""
4342

0 commit comments

Comments
 (0)