Repository navigation
Allow newer NLTK versions - #3464
Conversation
Signed-off-by: Fred Heinecke <fheinecke@nvidia.com>
|
/te-ci jax L2 |
Greptile SummaryThe PR relaxes the temporary NLTK upper bound while continuing to exclude version 3.10.1.
Confidence Score: 4/5The PR appears safe to merge, but the NLTK range should preferably start at 3.10.3 to avoid admitting a release with known security defects. The compatibility change works for normal dependency resolution, while a lagging or constrained package index could select newly allowed NLTK 3.10.2 and retain downloader-related security exposure. Files Needing Attention: examples/jax/encoder/requirements.txt, qa/L0_jax_unittest/test.sh, qa/L2_jax_unittest/test.sh
|
| Filename | Overview |
|---|---|
| examples/jax/encoder/requirements.txt | Relaxes the NLTK range but newly admits version 3.10.2, which predates several relevant security fixes. |
| qa/L0_jax_unittest/test.sh | Applies the relaxed NLTK constraint to the L0 JAX test environment. |
| qa/L2_jax_unittest/test.sh | Applies the relaxed NLTK constraint to the L2 JAX test environment. |
Reviews (1): Last reviewed commit: "Allow newer NLTK versions" | Re-trigger Greptile
| datasets<4.0.0 | ||
| flax>=0.7.1 | ||
| nltk>=3.8.2,<3.10.1 | ||
| nltk>=3.8.2,!=3.10.1 |
There was a problem hiding this comment.
Constraint admits vulnerable NLTK release
If the package index resolves NLTK 3.10.2, the encoder's nltk.download("punkt_tab") path retains downloader-related security defects fixed in 3.10.3, including exposure to denial of service from a malicious XML index. Exclude 3.10.2 or require 3.10.3 and newer. How this was verified: The relaxed constraint admits 3.10.2, both JAX QA suites run the encoder downloader, and the relevant fixes land in 3.10.3.
| nltk>=3.8.2,!=3.10.1 | |
| nltk>=3.8.2,!=3.10.1,!=3.10.2 |
Knowledge Base Used: Verification and CI matrix
There was a problem hiding this comment.
Strictly speaking this is wrong. The security advisory lists vulnerable versions as anything older than 3.10.3, including 3.8.2 to 3.10.0. If the goal is to address this vulnerability, then this should be nltk>=3.10.3.
However, there's a couple of reasons to not do this:
- It raises the minimum nltk version two minor patches
- Package managers installing the example deps in a clean environment will pick the latest nltk version (
>=3.10.3) anyway - The example does not exercise the vulnerable code path
I'm happy to increase this if a human reviewer wants it raised, but I don't see a reason to do so right now.
There was a problem hiding this comment.
You're right. My comment was incorrect and incomplete: excluding only 3.10.2 would still allow 3.8.2 through 3.10.0, which the advisory also identifies as vulnerable, so it is not a valid security remediation. If this constraint were intended to address GHSA-m4rf-3fr8-xwx3, the correct change would be nltk>=3.10.3. Given that this example does not exercise the vulnerable downloader path, raising the minimum is a policy choice rather than a necessary fix for this PR. I'll withdraw the finding.
Description
nltk>=3.10.1was blocked via #3306 due to an upstream bug. Versions3.10.2onward have fixed this, so I'm relaxing the constraint again.Type of change
Changes
Please list the changes introduced in this PR:
nltk>3.10.1in tests and exampleChecklist: