fix(release-gate): enable DTrack in test-full and wire API key into security-tests (closes #200)#202
fix(release-gate): enable DTrack in test-full and wire API key into security-tests (closes #200)#202brandonrc wants to merge 1 commit into
Conversation
…ck API key into security-tests
The security-tests DTrack subsuite asserts on real BOM upload + findings
sync. values-test-full.yaml previously omitted DTrack with a comment
"requires complex bootstrapping, handled separately", which left the
subsuite hard-failing under RELEASE_GATE=1 (the gate exists precisely
to catch silent-success skips on integrations).
Two changes:
1. helm/values-test-full.yaml: enable dependencyTrack with sizing from
helm/values-smoke-with-deps.yaml (250m / 1Gi requests, 2 CPU / 4Gi
limits). The chart's bootstrap init container handles the admin
force-password-change + team API key provisioning and writes the
key to /shared/dtrack-api-key on the backend pod.
2. .github/workflows/release-gate.yml security-tests job: add a step
between the runner-pod-IP resolution and "Run security tests" that:
- Waits for the DTrack deployment to become Available (5 min budget)
- Polls the backend pod for /shared/dtrack-api-key via kubectl exec
- Exports DEPENDENCY_TRACK_URL + DEPENDENCY_TRACK_API_KEY into the
job env, masking the key
On bootstrap failure the step warns and exits 0 so the rest of the
security suite still runs; the DTrack subsuite will then skip-fail
as before, surfacing the bootstrap-side issue rather than masking it.
The 3,190 LoC DTrack integration in the backend now gets real release-
gate coverage, not just chart-wiring coverage from
clean-install-smoke-with-deps.
Closes #200
|
Investigation update from a focused triage on the self-test failures: The DTrack standup is NOT the cause of the self-test failuresThe agent that dug into this confirmed DTrack does not write The actual scanners that produce findings are hardcoded at
For fixture A (Trivy scaled to zero): For fixture B (clean lodash 4.17.21): same scanners fire. The gate polls So the self-test contract was broken BEFORE my DTrack changes. The failures here surface because of background scanner behavior, not DTrack. The right fix (separate from this PR)The self-tests need to either:
This is independent from this PR's scope. Proposed path for THIS PRTwo options: Option A (recommended): split DTrack out of Option B: keep this PR as-is, file a separate issue for the self-test contract. Self-tests stay red until that lands, but the gate-side benefit of this PR (real DTrack release-gate coverage) materializes immediately. I'd vote A for cleaner separation. Will rework if you concur. |
Summary
The security-tests DTrack subsuite was hard-failing under
RELEASE_GATE=1becauseDEPENDENCY_TRACK_API_KEYandDEPENDENCY_TRACK_URLwere never set in the test cluster. The fail-on-skip behavior is correct (it catches silent-success regressions); the actual gap was that DTrack was deliberately omitted fromvalues-test-full.yamlwith the comment "requires complex bootstrapping, handled separately".This PR closes that gap. DTrack is a 3,190 LoC backend integration (
services/dependency_track_service.rs+ handler + chart subchart); leaving it without release-gate coverage means SBOM upload + findings sync regressions ship undetected.Changes
helm/values-test-full.yamlEnable DependencyTrack with the same sizing as
values-smoke-with-deps.yaml(250m/1Gi requests, 2 CPU/4Gi limits). The chart's bootstrap init container inartifact-keeper-iacalready handles the admin force-password-change + team API key provisioning and writes the key to/shared/dtrack-api-keyon the backend pod. Just need a non-emptyadminPasswordto unblock the flow..github/workflows/release-gate.ymlsecurity-tests jobNew step
Wait for Dependency-Track bootstrap and extract API keyruns between the existing runner-pod-IP resolution andRun security tests:/shared/dtrack-api-keyviakubectl exec(up to 3 min).DEPENDENCY_TRACK_URLandDEPENDENCY_TRACK_API_KEYinto the job env. The key is::add-mask::'d so it stays out of logs.On bootstrap failure the step warns and exits 0 (the rest of the security suite still runs). The DTrack subsuite then surfaces the bootstrap issue as a clear skip-fail rather than masking it.
Resource impact
Adds ~2 CPU / 4 Gi memory to the test-full deploy (limits). Combined stack ~7 CPU / 10 Gi. The ARC namespace has no enforced ResourceQuota (verified:
create-test-namespace.shdoes not create one, and no chart template defines one). Cluster headroom on Rocky is adequate; if this ever changes, the right answer is to route security-tests to theak-beefy-runnerspool already configured inartifact-keeper-iac/argocd/arc-beefy-runners-values.yaml.Why not just remove the DTrack subsuite
It would leave a 3,190 LoC backend integration with zero gate coverage.
clean-install-smoke-with-depscovers chart-wiring (does DTrack reach Ready), not actual SBOM upload + findings sync. The latter is what regresses silently when DTrack integration code drifts.Test plan
Pendingdue to insufficient resources)Closes #200