forked from Yelp/detect-secrets
-
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
Draft
nagalakshmisa
wants to merge
8
commits into
master
Choose a base branch
from
fix/vuln-dep-pins
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
120defa
fix: pin deps and base image to secure versions (CVE remediation)
nagalakshmisa eaee0ae
fix: correct tox-pip-extensions pin to latest published version (1.6.0)
nagalakshmisa 52dd051
fix: relax packaging floor, set tox constraints, and drop tox-pip-ext…
nagalakshmisa 5eb3249
feat(box): add support for boxsdk v10+
nagalakshmisa f38d308
fix: handle missing files with binaryornot 0.6
nagalakshmisa 791f834
revert: remove boxsdk v10 compatibility changes from vuln pin branch
nagalakshmisa e94b5e0
fix: restore chardet upper bound
nagalakshmisa 84eec81
fix: add --no-cache-dir to pip installs in 01.cli.Dockerfile
nagalakshmisa File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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', | ||
| 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': [ | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
are you sure all of the below dependency versions run on 3.8? If you look at the requests docs, it says: