Skip to content

chore: harden supply chain β€” hashes, SHA pins, weekly audit#63

Merged
datasciencemonkey merged 4 commits intomainfrom
chore/supply-chain-hardening
Mar 12, 2026
Merged

chore: harden supply chain β€” hashes, SHA pins, weekly audit#63
datasciencemonkey merged 4 commits intomainfrom
chore/supply-chain-hardening

Conversation

@datasciencemonkey
Copy link
Copy Markdown
Owner

@datasciencemonkey datasciencemonkey commented Mar 12, 2026

Summary

Addresses the two HIGH and three MEDIUM supply chain findings from the CoDA security report (supply chain score: 52/100).

Changes

Fix Severity Detail
Python lockfile hashes HIGH 3,057 SHA-256 hashes added via --generate-hashes
GitHub Actions SHA pinning HIGH All 3 actions pinned to immutable commit SHAs
CI tool version pinning MEDIUM pip-audit==2.9.0, uv==0.7.12 pinned in workflow
npm audit in CI MEDIUM Version check step for all 4 npm packages
Gemini @nightly fallback MEDIUM Changed to @latest (more stable, more audited)
Weekly cron audit NEW dependency-audit.yml runs Monday 6am UTC
Dependabot NEW Auto-PRs for GitHub Actions + pip dependency updates
Audit trigger expanded NEW pyproject.toml changes now trigger audit

Files

  • requirements.lock β€” regenerated with --generate-hashes
  • .github/workflows/dependency-audit.yml β€” SHA pins, tool pins, npm audit, cron
  • .github/workflows/release.yml β€” SHA pins
  • setup_gemini.py β€” @nightly β†’ @latest
  • .github/dependabot.yml β€” new

Test plan

  • 76 tests pass locally (uv run pytest tests/ -v)
  • Lockfile contains 3,057 hash entries
  • All GitHub Actions pinned to full SHAs with # vX comments
  • CI workflow runs successfully with pinned actions
  • Dependabot creates first update PR within a week

πŸ€– Generated with Claude Code

- Regenerate requirements.lock with --generate-hashes (3,057 SHA-256 entries)
- Pin all GitHub Actions to immutable commit SHAs (checkout, setup-python, action-gh-release)
- Pin pip-audit and uv to exact versions in CI
- Add weekly cron schedule to dependency-audit workflow
- Add npm package version check step to CI
- Add pyproject.toml to audit trigger paths
- Update lockfile freshness check to use --generate-hashes
- Change Gemini CLI fallback from @nightly to @latest
- Add dependabot.yml for automated weekly dependency updates

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@datasciencemonkey datasciencemonkey self-assigned this Mar 12, 2026
datasciencemonkey and others added 3 commits March 12, 2026 12:27
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
pip-audit auto-enables --require-hashes when it detects hashes in the
lockfile, but sqlalchemy's conditional dependency (greenlet) isn't in
the lockfile (platform-conditional). --no-deps tells pip-audit to audit
only the explicitly listed packages, which is correct since the lockfile
already contains all transitive deps.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
pip-audit's pip backend auto-enables --require-hashes when it sees hash
entries, then fails on sqlalchemy's platform-conditional greenlet dep
(present on x86_64 CI runners but absent from lockfile compiled on
aarch64). Fix: strip --hash lines before auditing. The hashes are
verified at install time via pip --require-hashes, not at audit time.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@datasciencemonkey datasciencemonkey merged commit f39ba1f into main Mar 12, 2026
1 check passed
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