Skip to content

security: remove unpatched NLTK dependency chain - #100

Merged
kmadan merged 5 commits into
mainfrom
security/dependabot-199-nltk-pathsec
Sep 12, 2026
Merged

security: remove unpatched NLTK dependency chain#100
kmadan merged 5 commits into
mainfrom
security/dependabot-199-nltk-pathsec

Conversation

@kmadan

@kmadan kmadan commented Sep 12, 2026

Copy link
Copy Markdown
Contributor

Summary

Fix Dependabot alert #199 (NLTK: Model-artifact APIs bypass pathsec and touch files outside allowed roots).

GitHub's advisory affects released NLTK versions through 3.10.3. NLTK upstream has merged the remediation for the model-artifact save APIs, but as of this PR there is no patched release available to depend on.

AICertify does not import NLTK directly. The vulnerable package is present in the default dependency graph through LangFair (langfair -> nltk and langfair -> rouge-score -> nltk).

Changes

  • remove langfair from AICertify's default dependencies
  • remove the explicit nltk>=3.10.3 floor, which still selects an affected release
  • remove the existing poetry.lock, because it records NLTK 3.10.3 and would continue to ship/scan the vulnerable graph; CI now resolves the safe dependency set from pyproject.toml
  • add a CI assertion that fails if NLTK re-enters the default install before a patched upstream release is available

Why not bump NLTK?

There is currently no released version newer than 3.10.3 containing the upstream fix. Raising the lower bound to 3.10.3 does not remediate this advisory.

Upstream remediation commit: nltk/nltk@2a92b71827d754ae8920261e7ed0c4bb283ab2d7.

Functional impact

The OPA/compliance core, reports, DeepEval integration, CLI, and other AICertify functionality remain in the default install. LangFair-backed fairness evaluation is temporarily no longer installed automatically. Its existing runtime fallback already treats LangFair as optional when unavailable.

Once NLTK publishes a fixed release, LangFair can be restored to the default dependency set with a safe NLTK floor and the temporary CI exclusion can be removed.

Verification

CI now verifies that a fresh default Poetry environment contains no NLTK package, then runs the existing pre-commit checks, package import check, OPA setup, and full test suite.

Closes/addresses Dependabot alert #199.

@github-actions github-actions Bot added 🐞 bug Something isn't working 🚀 enhancement New feature or request 🛡️ security Security vulnerabilities labels Sep 12, 2026
@kmadan
kmadan force-pushed the security/dependabot-199-nltk-pathsec branch from 37ba69b to 00b300c Compare September 12, 2026 07:01
@kmadan
kmadan merged commit 6670878 into main Sep 12, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🐞 bug Something isn't working 🚀 enhancement New feature or request 🛡️ security Security vulnerabilities

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant