Skip to content

fix(security): move nosemgrep annotation onto np.load call in tahoe blocks - #406

Merged
oriolpetithelical merged 1 commit into
mainfrom
fix/tahoe-nosemgrep-annotation-placement
Jul 20, 2026
Merged

fix(security): move nosemgrep annotation onto np.load call in tahoe blocks#406
oriolpetithelical merged 1 commit into
mainfrom
fix/tahoe-nosemgrep-annotation-placement

Conversation

@oriolpetithelical

Copy link
Copy Markdown
Contributor

Summary

Moves the trailofbits numpy-in-pytorch-modules nosemgrep suppression comment directly onto the np.load(...) line in ChemEncoder so it annotates the actual flagged call rather than the torch.as_tensor(...) wrapper.

Details

Semgrep's line-level suppression must sit on the line containing the flagged expression. Previously the # nosemgrep comment preceded the torch.as_tensor( call, which is not the numpy operation being flagged. This change places it immediately above np.load(drug_fps_path), keeping the existing explanatory comment (helicalAI/dashboard#1154) intact.

No functional change.

🤖 Generated with Claude Code

…locks

Place the trailofbits numpy-in-pytorch nosemgrep suppression directly on the
np.load(...) line so it targets the actual flagged call rather than the
torch.as_tensor wrapper.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GURmbFqmKj4P4BoGEtFcm2
@oriolpetithelical
oriolpetithelical merged commit fa28bb8 into main Jul 20, 2026
12 of 15 checks passed
@oriolpetithelical
oriolpetithelical deleted the fix/tahoe-nosemgrep-annotation-placement branch July 20, 2026 07:36
oriolpetithelical added a commit that referenced this pull request Jul 20, 2026
Release: nosemgrep fix (#406) + bump to 3.0.3 (#407)
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