Skip to content

fix(ci): clear bandit B615 on model-card warning publisher - #8

Merged
Sahil170595 merged 4 commits into
mainfrom
fix-bandit-b615
Jun 15, 2026
Merged

fix(ci): clear bandit B615 on model-card warning publisher#8
Sahil170595 merged 4 commits into
mainfrom
fix-bandit-b615

Conversation

@Sahil170595

Copy link
Copy Markdown
Owner

Why CI went red after #7

scripts/publish_release_warnings.py was introduced on a local-only commit
(00f1a8d) that never ran CI
. PR #7's diff was computed against origin/main
(e02ac62), so the squash-merge swept that file onto main for the first time.
Bandit's B615 (unsafe HF download without revision pinning) then failed the
verify job's last step.

Fix

The script deliberately reads each model card's live default branch to
add/refresh a warning block and re-upload — pinning an immutable revision would
re-publish a stale card and clobber newer edits. This is the one intentionally
mutable download in the repo (every model-weight load pins an immutable SHA), so
it's marked with an explained # nosec B615.

Verified locally (exact CI commands)

Sahil170595 and others added 4 commits June 14, 2026 21:13
The static security scan flagged the README fetch in
scripts/publish_release_warnings.py as an unpinned Hugging Face download
(B615). This script intentionally reads each card's live default branch to
add/refresh a warning block before re-uploading, so pinning an immutable
revision would re-publish a stale card. Mark the single intentionally-mutable
download with an explained `# nosec B615`; every model-weight load elsewhere
still pins an immutable SHA.

This file reached main via the squash of PR #7 (it originated on a local-only
commit that never ran CI), which is why the scan first failed post-merge.

Co-authored-by: Claude <noreply@anthropic.com>
…sarial hardening

Adds independent external validation and closes findings from a multi-agent
adversarial re-audit.

- External-labeled judge benchmark (substrate/external_judge_eval.json,
  scripts/eval_external_judges.py): 3 vendors on BeaverTails N=400 third-party
  human labels - Qwen3Guard-0.6B 84.0% / Granite-8B 84.75% / Nemotron-8B 81.0%,
  unanimous 89.76%. Breaks the project-label circularity.
- Prospective transfer demo (substrate/prospective_validation.json,
  scripts/prospective_*.py): frozen weights, NF4, new families - Falcon3 LOW,
  SmolLM2 MODERATE/material-loss. MiniCPM4.1-8B excluded (transformers 5.12
  incompatibility, documented).
- Real debate band-gating: LOW/HIGH short-circuit, consensus_kind, errored stance.
- CI smoke-runtime job imports the full pinned runtime stack.
- UI: cross-vendor + prospective evidence panels + judges' TL;DR.
- Integrity: lead validation with 0.8403 family-held-out AUC + in-sample==LOOCV
  disclosure; routing figures to LOOCV; project-label qualifiers; demo 35.7s;
  fair-baseline disclosure; scrub Banterhearts/tr134 path + internal codename;
  extend exposure grep; exclude harmful-probe cache + research scripts from deploy.
- Sync README/SUBMISSION/FIELD_NOTES/AGENT_TRACE/SECURITY_AUDIT; 460 tests pass.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: OpenAI Codex <noreply@openai.com>
Co-authored-by: OpenAI Codex <noreply@openai.com>
@Sahil170595
Sahil170595 merged commit 70dbaf9 into main Jun 15, 2026
4 checks passed
@Sahil170595
Sahil170595 deleted the fix-bandit-b615 branch June 15, 2026 10:12
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.

1 participant