-
Notifications
You must be signed in to change notification settings - Fork 58
Fix vulnerable dependencies and pin versions #193
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from 7 commits
120defa
eaee0ae
52dd051
5eb3249
f38d308
791f834
e94b5e0
84eec81
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,14 @@ | ||
| FROM python:3 | ||
| # Pinned to 3.11-slim-bookworm to match CI/CD container and address CVEs in | ||
| # OpenSSL, systemd, Kerberos and other packages present in older base images. | ||
| # Update this tag intentionally — do not use a floating `python:3` tag. | ||
| FROM python:3.11-slim-bookworm | ||
|
|
||
| LABEL maintainer="squad:git-defenders" url="https://github.com/IBM/detect-secrets" | ||
|
|
||
| RUN \ | ||
| apt-get update && \ | ||
| apt-get -y remove --purge mysql* && \ | ||
| apt-get upgrade -y && \ | ||
| apt-get install -y --no-install-recommends git && \ | ||
| rm -rf /var/lib/apt/lists/* && \ | ||
| pip install --upgrade pip |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,20 +1,30 @@ | ||
| pip>=21.1 | ||
| urllib3>2.4.0 | ||
| coverage>=6.0b1 | ||
| certifi>=2024.7.4 | ||
| flake8 | ||
| mock | ||
| monotonic | ||
| pre-commit | ||
| pytest | ||
| pyyaml | ||
| responses | ||
| tox-pip-extensions | ||
| tox>=3.8 | ||
| unidiff | ||
| ibm_db | ||
| boxsdk[jwt]<4.0.0 | ||
| pyahocorasick | ||
| tabulate | ||
| binaryornot | ||
| chardet>=3.0.2,<7.0.0 | ||
| # Development Dependencies - Pinned Versions | ||
| # Updated: 2026-05-28 | ||
| # These versions are pinned for reproducible development environments | ||
|
|
||
| # Core tools (matching production image) | ||
| pip==26.1.1 | ||
| urllib3==2.7.0 | ||
| certifi==2026.5.20 | ||
| pyyaml==6.0.3 | ||
|
|
||
| # Production dependencies (matching setup.py) | ||
| boxsdk[jwt]==3.14.0 | ||
| pyahocorasick==2.3.1 | ||
| tabulate==0.10.0 | ||
| binaryornot==0.6.0 | ||
| chardet==6.0.0.post1 | ||
|
|
||
| # Development-only tools (pinned to latest stable) | ||
| coverage==7.6.10 | ||
| flake8==7.1.1 | ||
| mock==5.1.0 | ||
| monotonic==1.6 | ||
| pre-commit==4.0.1 | ||
| pytest==8.3.4 | ||
| responses==0.25.3 | ||
| tox>=3.8,<4 | ||
| unidiff==0.7.5 | ||
|
|
||
| # Database driver (for testing) | ||
| ibm-db==3.2.3 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -22,15 +22,18 @@ | |
| ), | ||
| url='hhttps://github.com/IBM/detect-secrets', | ||
| keywords=['secret-management', 'pre-commit', 'security', 'entropy-checks'], | ||
| python_requires='>=3.8', | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. are you sure all of the below dependency versions run on 3.8? If you look at the requests docs, it says:
|
||
| install_requires=[ | ||
| 'pyyaml', | ||
| 'requests', | ||
| 'urllib3>2.4.0', | ||
| 'boxsdk[jwt]<4.0.0', | ||
| 'packaging', | ||
| 'tabulate', | ||
| 'binaryornot', | ||
| 'chardet>=3.0.2,<7.0.0', | ||
| # Minimum versions set to the secure versions validated during CVE remediation. | ||
| # Exact pins live in requirements-dev.txt for reproducible dev/CI environments. | ||
| 'pyyaml>=6.0.3', | ||
| 'requests>=2.34.2', | ||
| 'urllib3>=2.7.0', | ||
| 'boxsdk[jwt]>=3.14.0,<4.0.0', | ||
| 'packaging>=20.0', | ||
| 'tabulate>=0.10.0', | ||
| 'binaryornot>=0.6.0', | ||
| 'chardet>=6.0.0,<7.0.0', | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In the past major version updates of dependencies have severely impacted IBM detect secrets and required consumers to add workarounds. Should you consider adding an upper range to all of these, the same way you have with |
||
| ], | ||
| extras_require={ | ||
| 'word_list': [ | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
consider using
--no-cache-dirsince this is an imageThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review comment accepted and will be addressed. Thank you!