Skip to content

fix(cd): align Trivy gate + clear every remaining HIGH/CRITICAL - #167

Merged
alovladi007 merged 1 commit into
mainfrom
fix/cd-gate-round2
Jul 31, 2026
Merged

fix(cd): align Trivy gate + clear every remaining HIGH/CRITICAL#167
alovladi007 merged 1 commit into
mainfrom
fix/cd-gate-round2

Conversation

@alovladi007

Copy link
Copy Markdown
Owner

Why

The third v0.1.0 CD firing failed all four Trivy scans. Root causes and fixes:

  1. Gate misalignment: with format: sarif, trivy-action scans ALL severities and exit-code: 1 fires on ANY finding — lims failed on a MEDIUM despite the HIGH,CRITICAL setting. Fixed with limit-severities-for-sarif: true.
  2. analysis: transformers carried 2 HIGHs with no in-range fix. Only the offline RLHF scripts (app/ml/rlhf) import it and nothing in the serving paths does — removed from the image, kept in the dev environment (annotated).
  3. web: 28 findings from the base image + bundled npm + old stack. Fixed by apk upgrade + removing npm/corepack from the runner, upgrading to Next 15.5.21 + React 19 (peer bumps: fiber ^9, drei ^10, lucide-react), postcss ^8.5.18, and a sharp ^0.35.3 override (GHSA-f88m-g3jw-g9cj).
  4. python-dotenv>=1.1.1 across all four requirement sets (was the lims MEDIUM).
  5. React 19 typing fixes: dynamic icon components must be React.ComponentType<{ className?: string }> (4 files).

Proof

  • All four images rebuilt and rescanned locally with the gate's exact flags: analysis ZERO, lims ZERO, process-control ZERO, web ZERO
  • Suites: analysis 304 passed, lims 68 passed, shared 88 passed
  • Next 15 migration verified live: tsc --noEmit clean, 87 pages compile, smoke 4/4, 26-page sweep green (re-ran smoke after the sharp override: still 4/4)

After merge: re-point v0.1.0 for the fourth CD firing.

🤖 Generated with Claude Code

Third v0.1.0 firing failed on three fronts; this clears all of them:

- cd.yml: limit-severities-for-sarif: true — with sarif format the
  action otherwise scans ALL severities and exit-code fires on ANY
  finding (lims failed on a MEDIUM despite a HIGH,CRITICAL gate).
- analysis image: remove transformers (2 unfixable-in-range HIGHs);
  only the offline RLHF scripts used it and nothing imports them in
  serving paths. Stays in the root dev requirements, annotated.
- python-dotenv>=1.1.1 across all four requirement sets.
- web image: apk upgrade + remove npm/corepack from the runner
  (bundled tar/sigstore/glob CVEs), Next 15.5.21 + React 19 upgrade
  (peer bumps: @react-three/fiber ^9, drei ^10, lucide-react),
  postcss ^8.5.18 + override, sharp override ^0.35.3
  (GHSA-f88m-g3jw-g9cj via next's image optimizer).
- React 19 typing: dynamic icon props need
  React.ComponentType<{ className?: string }> (4 components).

Proof: all four images rescanned locally with the gate's exact flags
— analysis ZERO, lims ZERO, process-control ZERO, web ZERO.
Suites: analysis 304 passed, lims 68, shared 88. E2E on Next 15:
smoke 4/4, page sweep 26/26 (87 pages compile).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@alovladi007
alovladi007 merged commit 6bd1ebe into main Jul 31, 2026
17 checks passed
@alovladi007
alovladi007 deleted the fix/cd-gate-round2 branch July 31, 2026 00:52
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