Skip to content

cp: security: bump nltk >=3.10.0 and fix inisec import blocks (2290) into r0.5.0 - #2291

Merged
kajalj22 merged 1 commit into
r0.5.0from
cherry-pick-2290-r0.5.0
Aug 4, 2026
Merged

cp: security: bump nltk >=3.10.0 and fix inisec import blocks (2290) into r0.5.0#2291
kajalj22 merged 1 commit into
r0.5.0from
cherry-pick-2290-r0.5.0

Conversation

@svcnvidia-nemo-ci

Copy link
Copy Markdown

beep boop [🤖]: Hi @kajalj22 👋,

we've cherry picked #2290 into  for you! 🚀

Please review and approve this cherry pick by your convenience!

## Summary

Bump \`nltk>=3.10.0\` in \`iheval\` and \`rolemrc\` (CVE fix), and
pre-import \`regex\` and \`defusedxml.ElementTree\` in all servers whose
import chains reach nltk.

## Root cause

\`nltk>=3.9\` added \`NLTKSafeImportFinder\` (\`nltk/inisec.py\`) which
blocks any import triggered by nltk if the module's resolved path is
inside the process CWD. In CI, server venvs live at
\`resources_servers/<name>/.venv/\` — inside the repo root — so
legitimate site-packages get blocked. Pre-importing before the nltk
chain fires puts packages in \`sys.modules\`, bypassing the check.

\`ifbench\` also needs the pre-imports in \`conftest.py\` so
\`_ensure_nltk_data()\` can download punkt without being silently
blocked during \`pytest_configure\`.

## Changes

| File | Change |
|---|---|
| \`resources_servers/{iheval,rolemrc}/requirements.txt\` | bump
\`nltk>=3.10.0\` |
|
\`resources_servers/{iheval,rolemrc,ifbench,instruction_following,toolsandbox}/app.py\`
| pre-import \`regex\`, \`defusedxml.ElementTree\` |
| \`resources_servers/ifbench/tests/conftest.py\` | same pre-imports
before \`ensure_ifbench()\` |

## Local test results

| Server | Result |
|---|---|
| iheval | 88/88 ✓ |
| rolemrc | 55/55 ✓ |
| ifbench | 15/15 ✓ |
| instruction_following | 15/15 ✓ |
| toolsandbox | 19/19 ✓ |

## Full test suite run

https://github.com/NVIDIA-NeMo/Gym/actions/runs/30840804435

---------

Signed-off-by: Kajal Jain <kajalj@nvidia.com>
Co-authored-by: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: NeMo Bot <nemo-bot@nvidia.com>
@copy-pr-bot

copy-pr-bot Bot commented Aug 3, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@svcnvidia-nemo-ci

Copy link
Copy Markdown
Author

/ok to test 387d9da

@kajalj22
kajalj22 merged commit 7c152e8 into r0.5.0 Aug 4, 2026
28 of 31 checks passed
@kajalj22
kajalj22 deleted the cherry-pick-2290-r0.5.0 branch August 4, 2026 01:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants