Raxx · internal docs

internal · gated

Nightly security scan triage — 2026-05-31 through 2026-06-04

Triage produced: 2026-06-04T14:51Z UTC
Triaged by: security-agent
Scan PRs covered: #3170, #3184, #3194, #3197, #3214
Canonical finding set: PR #3214 (2026-06-04) — most recent; 73 grouped findings


Summary

Classification Count Notes
ALLOWLIST 57 Bandit pattern FP — allow-listed by policy
FIX-CODE 5 Requires feature-developer; blocks SRE merge
FIX-INFRA 0 No infra-only fixes needed
RECOMMEND-CLOSE 4 older PRs #3170, #3184, #3194, #3197 superseded by #3214
REAL-VULN 1 HIGH: tmp path-traversal (dev dep chain) — BLOCKS-MERGE on #3214

Total grouped findings across 5 reports: 82 / 82 / 72 / 72 / 73
Net new findings in #3214 vs #3170: +1 (B110 in backend_v2/api/services/mbt_fill_engine.py)
Open type:security issues (pre-existing): 20 open issues; see "Pre-existing security issue inventory" below.


Per-PR plan

PR #3170 (2026-05-31) — 82 groups


PR #3184 (2026-06-01) — 82 groups


PR #3194 (2026-06-02) — 72 groups


PR #3197 (2026-06-03) — 72 groups


PR #3214 (2026-06-04) — 73 groups — CANONICAL

This is the one to merge after fixes below are dispatched. Details per finding class:

ALLOWLIST findings (57 grouped findings — no action required)

These are all bandit pattern false-positives confirmed against source. Group them by rule for SRE's .bandit config PR (see Consolidated Patterns).

B110 (try-except-pass / try-except-continue) — 52 occurrences across 38 files

All production B110 hits are legitimate defensive-coding patterns in service layer code (vault client retries, flag poller fallbacks, customer-detail fetch with partial data). None swallow security-relevant exceptions (auth failures, permission checks). The one B112 (try-except-continue) at console/app/services/alerts_aggregator.py:393 is specifically skipping a malformed updated_at date parse inside a metrics aggregation loop — not a security concern.

B608 — backend_v2/alembic/versions/0026_raptor_app_grant_catchup.py

B608 — console/scripts/flag_reconciler_backfill.py

B608 — backend_v2/api/routes/auth.py (line 1832)

B608 — backend_v2/api/routes/strategies.py (7 occurrences)

B608 — console/app/blueprints/api_rbac_grants.py and console/app/services/rbac_grants.py

B105 — hardcoded password strings (6 occurrences)

Affected files: backend_v2/api/__init__.py, console/app/__init__.py, console/app/blueprints/auth.py, console/app/blueprints/deploy_freeze.py, console/app/blueprints/flags.py, console/app/blueprints/heroku_log_drain.py, console/app/services/deploy_kv.py, console/app/services/freescout_client.py, console/app/services/rotation_mode_a.py.

All confirmed as intentional dev-fallback strings, not production secrets:

B106 — hardcoded password function arguments (3 occurrences)

B101 — assert used in backend_v2/observability_checks.py:64

B404/B603/B607 — subprocess in backend_v2/conftest.py


FIX-CODE findings — dispatch to feature-developer (5 items)

FIX-CODE #1: npm audit HIGH — tmp path traversal (GHSA-ph9p-34f9-6g65)

FIX-CODE #2: npm audit MEDIUM — react-router-dom open redirect (GHSA-2j2x-hqr9-3h42)

FIX-CODE #3: npm audit MEDIUM — postcss (GHSA-qx2v-qp2m-jg93)

FIX-CODE #4: bandit B608 MEDIUM — dynamic SQL in backend_v2/api/routes/strategies.py (hardening opportunity)

FIX-CODE #5: bandit config — add .bandit project-wide skip-in-tests + known-FP suppressions


Consolidated patterns (apply across all 5 PRs)

  1. B110/B112 cluster (38 files, ~52 groups) — entire bandit B110/B112 block across console/ and backend_v2/ is non-exploitable try/except defensive coding. Apply .bandit skip config; close all related nightly-scan issues that match B110 or B112. Do NOT suppress in production auth/crypto paths — verify on any future new occurrence.

  2. B608 in constants-only SQL templates — four locations confirmed safe (migration 0026, flag_reconciler_backfill.py, auth.py CONTACT_KEYS, strategies.py _RULE_COLUMNS). Pattern: bandit fires on any f-string that contains SQL keywords; it does not verify whether the interpolated value is a constant or user-supplied. Add per-file noqa: S608 or .bandit path skips for each confirmed location.

  3. B105/B106 dev-fallback keys — all confirmed as intentional dev-env-only sentinel strings that raise in production. No action beyond .bandit config suppression.

  4. npm audit LOW cluster (jest/jsdom/react-scripts, present in #3170 and #3184)@jest/core, jest, jest-cli, jest-config, jest-environment-jsdom, jest-runner, jsdom, react-scripts, http-proxy-agent, @tootallnate/once advisory cluster. All are devDependencies in the CRA test harness. Not present in later scans (#3194+) suggesting an advisory retraction or version bump. No action needed; these do not affect the production bundle.

  5. Scan count drift (82 → 72 → 73): The 10-finding drop between #3184 and #3194 corresponds to the npm audit block changing (jest cluster advisories dropped, next/postcss cluster appeared). The +1 between #3197 and #3214 is a new B110 at backend_v2/api/services/mbt_fill_engine.py — confirmed as try/except: pass at line 475 inside a P&L decimal-conversion helper. ALLOWLIST.


Pre-existing security issue inventory

20 open type:security issues as of triage time. The SRE-agent should cross-reference after merging #3214:

Issue Title Status
#2285 SC-WAF-05b: WAF prod rollout blocked + defer:post-launch
#2283 SC-WAF-05: WAF staging block mode blocked + defer:post-launch
#2282 SC-WAF-04: WAF staging challenge mode blocked + needs:operator-decision
#2129 SC-12 prep: Infisical vault paths for Ed25519 keys blocked + operator-action
#1869 security(burr): audit + pentest Burr v1 blocked + defer:post-launch
#1742 SC-WAF-08/09: AWS WAF + Velvet Logpush blocked + defer:post-launch
#1736 SC-WAF-00: CF account WAF settings ready-for-dev + defer:post-launch
#1735 HIGH: No CF WAF rules configured blocked + needs:operator-decision
#1694 feat(console): break-glass nightly snapshot blocked + defer:post-launch
#1692 feat(console): break-glass session flow blocked + defer:post-launch
#1357 HIGH: bandit hardcoded_sql_expressions admin_customers.py recommend-close
#954 feat(velvet/ui): yaml-driven revocation auth gate defer:post-launch
#596 ops(vault): Phase 1 — audit per-secret env coverage defer:post-launch
#595 ops(vault): Phase 2 — vault_env_gap_fill.py blocked + defer:post-launch
#453 feat: sync Founders waitlist → CF Access policy blocked + defer:post-launch
#451 feat(console): FLAG_ENFORCE_CF_ORIGIN toggle blocked + needs:operator-decision
#253 Epic: Automated credential rotation pipelines blocked + defer:post-launch
#251 Security H3 — rotate HEROKU_API_KEY defer:post-launch + operator-action
#250 Epic: Passkey E2E encryption blocked + defer:post-launch

Note: #1357 (hardcoded_sql_expressions at admin_customers.py) already carries recommend-close label. This triage confirms the underlying B608 pattern is a false positive (allow-listed constants). SRE should close #1357 with a comment referencing this plan.


Handoff to SRE-agent

The SRE-agent should:

  1. Read this triage plan at docs/security/remediation/2026-06-04-nightly-scans-triage.md

  2. For each older PR, apply the close-out path: - PR #3170: close with comment "Superseded by #3214. Triage: docs/security/remediation/2026-06-04-nightly-scans-triage.md" - PR #3184: same comment - PR #3194: same comment - PR #3197: same comment

  3. For PR #3214DO NOT MERGE until FIX-CODE #1 (tmp path traversal) is resolved by feature-developer. After that fix lands: - Merge #3214 into main - Comment on merge: "Triage complete per docs/security/remediation/2026-06-04-nightly-scans-triage.md"

  4. Dispatch to feature-developer (in priority order): - P1 (blocks #3214 merge): FIX-CODE #1 — update selenium-webdriver or add overrides.tmp in frontend/trademaster_ui/package.json to resolve tmp@<0.2.6 HIGH finding - P2 (MEDIUM, do not block merge): FIX-CODE #2 — upgrade react-router-dom past open-redirect advisory - P3 (MEDIUM, build-time only): FIX-CODE #3 — upgrade postcss to patched version - P4 (hardening): FIX-CODE #4 — explicit allowlist assertion before set_clause construction in strategies.py and auth.py - P5 (tooling debt, tracks #2427): FIX-CODE #5 — .bandit project config to suppress confirmed FPs

  5. Close existing security issue #1357 (recommend-close already labeled) — B608 false positive confirmed by this triage.

  6. Run gh issue list --label type:security after merging #3214 and verify no new scan-generated issues remain open beyond the 19 pre-existing deferred issues catalogued above.

Estimated effort: 1–2 hours SRE coordination + 2–3 hours feature-developer for P1–P3.
Blocking handoffs: feature-developer must resolve FIX-CODE #1 before SRE merges #3214.
No new GH issues filed by this triage — findings either match pre-existing issues or are policy-allowlisted.