Skip to content

security(deps): 🛡️ pin urllib3>=2.7.0 - #43

Merged
pacificcode merged 4 commits into
mainfrom
security/urllib3-2.7
Sep 25, 2026
Merged

pacificcode merged 4 commits into
mainfrom
security/urllib3-2.7

Conversation

@pacificcode

Copy link
Copy Markdown
Contributor

Closes the one ArmorCode/Snyk ticket on this repo (761394, urllib3, 4 HIGH findings; the highest fix version is 2.7.0).

Change

requirements.txt: add urllib3>=2.7.0. It isn't a direct dependency (it comes in via requests==2.32.4), but Snyk's GitHub integration resolves the unpinned transitive dependency to 2.0.7. This pins it the same way zipp already is.

Scope, deliberately minimal

  • urllib3 ≥ 2.7 requires Python ≥ 3.10. The package still advertises 3.7–3.11, but 3.7–3.9 are EOL and there's no fixed urllib3 for them at all.
  • Published metadata is unchanged (requires = ["requests >= 2.22.0"]), so this is the repo's dev/scan dependency file only. Consumers on 3.10+ already resolve current urllib3 through requests. No PyPI release is needed for the fix.
  • Dropping 3.7–3.9 (requires-python, classifiers, tox, CI matrix) and releasing is a customer-facing support decision, so I've left it out of this PR.

Testing

  • Live against a dev tenant, the repo's own pytest suite (5 tests: token URL, get secret, nonexistent secret, path normalisation, access-token authorizer):
    • main on Python 3.11: 5/5
    • this branch on Python 3.11 and 3.13: 5/5, urllib3 resolves to 2.8.0
  • The temporary tenant fixtures I used (secret, policy, client) are deleted.

⚠️ CI note

The test workflow can't run on any PR right now. Its matrix includes Python 3.7, which isn't available on GitHub's Ubuntu 24.04 runners, so the 3.7 job fails immediately and fail-fast cancels 3.8–3.11. It's pre-existing (every recent Renovate PR shows it) and unrelated to this change.

🤖 Generated with Claude Code

Snyk (via the GitHub integration) resolves the transitive urllib3 from
requests==2.32.4 to 2.0.7 and reports 4 HIGH findings; the highest fix
version is 2.7.0. Pin it in requirements.txt, as zipp already is.

urllib3 >= 2.7 requires Python >= 3.10. The published package metadata
(requests >= 2.22.0) is unchanged, so this affects the repo's dev/scan
dependencies only; consumers on 3.10+ already resolve current urllib3.

Tested live against a dev tenant: pytest 5/5 on Python 3.11 and 3.13
(urllib3 2.8.0), same as main.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@snyk-io

snyk-io Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

✅ Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
✅ Open Source Security 0 0 0 0 0 issues
✅ Licenses 0 0 0 0 0 issues
✅ Code Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ changie entry was found

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ changie entry was found

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ changie entry was found

@pacificcode
pacificcode merged commit ffb4947 into main Sep 25, 2026
11 checks passed
@pacificcode
pacificcode deleted the security/urllib3-2.7 branch September 25, 2026 17:11
pacificcode added a commit that referenced this pull request Sep 30, 2026
Snyk's scan of `main` reports **0 C / 4 H / 10 M**, but against versions
this repo doesn't use:

| Snyk reports | `requirements.txt` pins |
|---|---|
| `urllib3@2.0.7` (4 H / 2 M) | `urllib3>=2.7.0` (#43) |
| `requests@2.31.0` (3 M) | `requests==2.33.0` |
| `zipp@3.15.0` (1 M) | `zipp==3.19.2` |

Those are the last releases that support **Python 3.7**, and Snyk's SCM
import **tests pip projects with Python 3.7 by default**
([docs](https://docs.snyk.io/supported-languages/supported-languages-list/python/scm-integrations-and-python)).
It can't install our pins on 3.7, so it reports older versions we don't
use. That's why the urllib3 findings stayed "open" after #43.

## Change
- `.snyk` (next to `requirements.txt`, where Snyk looks for it):
`language-settings: python: '3.11'`, the top of the CI matrix.
`requirements.txt` already needs 3.10+ (urllib3 2.7).
- changie entry.

This only changes how **Snyk resolves `requirements.txt`**. It doesn't
change `requires-python` or the published package (dropping 3.7–3.9
support is a separate question).

## Verification
After merge, re-test the Snyk project
`DelineaXPM/python-dsv-sdk(main):requirements.txt`
(devops-secrets-vault); expect urllib3/requests/zipp to resolve to the
pinned versions and the 4 H to clear.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

This branch was successfully deployed

1 active deployment
testing — c924a959 Deployed Sep 25, 2026 by pacificcode via build (3.10) #68
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants