Skip to content

Main -> release 2026-07-10 (conflicts resolved) - #388

Merged
oriolpetithelical merged 3 commits into
releasefrom
sync/main-to-release-2026-07-10
Jul 10, 2026
Merged

Main -> release 2026-07-10 (conflicts resolved)#388
oriolpetithelical merged 3 commits into
releasefrom
sync/main-to-release-2026-07-10

Conversation

@oriolpetithelical

Copy link
Copy Markdown
Contributor

Supersedes #386, which was unmergeable due to a pyproject.toml conflict.

The conflict came from the squash-merge of #383: main's GH-Actions pinning commit landed on release as a new SHA, so re-merging main replayed overlapping edits from the common base. Both branches had also bumped the version independently (main: 2.1.4, release: 2.1.3).

Resolution: merged origin/release into a branch off main, kept version = "2.1.4" (higher, from main). Only conflict was the version line; everything else auto-merged. Net change into release is the #385 torch.load hardening + the version bump (the workflow/dependabot pinning is already on release via #383).

Checks were green on #386.

* build: pin GitHub Actions to full commit SHAs

Pin every `uses:` reference in the workflows to a full 40-char commit SHA
and add .github/dependabot.yml.

Mutable action tags (e.g. @v4, @release/v1) can be silently repointed by the
action owner, enabling supply-chain attacks (OWASP A08, CWE-1357 / CWE-353) --
as seen in the tj-actions / trivy-action compromises. Pinning to an immutable
SHA removes that risk; the trailing `# <version>` comment keeps it readable and
lets Dependabot open reviewable update PRs. Runners are confirmed on Node24, so
actions were bumped to their latest majors (checkout v5, ecr-login v2.1.6, etc.).

Refs helicalAI/dashboard#1154
…rep) (#385)

* fix(security): harden CWE-502 torch.load sites with weights_only + nosemgrep

Follow-up to the annotation-only PR #384. Mitigates the CWE-502 (unsafe
deserialization) scan findings from helicalAI/dashboard#1154 for the
torch.load sites, and suppresses the Trail of Bits scanner on the sites that
are now safe or unavoidably require full unpickling.

Groups A + B (torch.load) addressed here; group C (raw pickle.load of gene
dictionaries) is intentionally deferred to a follow-up.

- weights_only=True (real mitigation) added to the loads whose payloads are
  tensors / plain state dicts: scgpt best_model.pt, uce all_tokens.torch, uce
  gene-embedding dicts, and the uce model-weights load (the last was missed by
  the Bastion scan but hardened for consistency). Under the pinned torch 2.7.0
  this matches the existing default, so it is a no-op at runtime and only
  hardens intent.
- HyenaDNA keeps weights_only=False: its Lightning-style .ckpt carries
  non-tensor objects the safe loader rejects. Documented + suppressed with a
  "trusted sources" justification (a try-safe-first attempt was rejected in
  review: it fired a misleading CWE-502 warning and double-read the file on
  every legitimate load).
- base_models legacy fallback keeps weights_only=False (pre-v2.0.0 full-model
  pickles); documented + suppressed, reached only when the safe load fails.
- Every torch.load carries a `# nosemgrep:
  trailofbits.python.pickles-in-pytorch.pickles-in-pytorch` on the line
  immediately preceding the call (Semgrep only honors adjacent suppressions)
  plus a per-site CWE-502 justification.

Validated: scGPT and HyenaDNA load real downloaded checkpoints end-to-end;
py_compile passes on all touched files. CI exercises these load paths against
real (non-mocked) upstream artifacts.

Refs helicalAI/dashboard#1154
@oriolpetithelical
oriolpetithelical merged commit 0fb11fb into release Jul 10, 2026
9 checks passed
@oriolpetithelical
oriolpetithelical deleted the sync/main-to-release-2026-07-10 branch July 10, 2026 12:46
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.

2 participants