← Back to Pull requests

feat(secrets)!: require explicit header templates #2540

Closed
unknown closed this pull request without merging on Nov 12, 2026 11:36 UTC
View on GitHub
unknown unknown commented on Nov 11, 2026 03:24 UTC
Author

TL;DR

Require explicit secret header templates.

How it works

{"Authorization":"Bot {value}"} replaces existing headers on matching hosts. Creation, new-VM initialization and import validate headers; runner recovery validates before destroying the old box. Reattachment and stopping do not validate headers.

Design: https://github.com/boxlite-ai/boxlite/issues/2467

Documentation: https://github.com/mileeeesW/boxlite/blob/feat/secret-headers-required/docs/reference/configuration.md#secrets

Breaking change

Local SDK/serve boxes containing secrets must be recreated with explicit headers. Metadata stays readable; running legacy boxes keep running until stopped. A subsequent start rejects missing headers with a recreate hint, leaving stored data intact.

Import rejects invalid headers before installation. The cloud database contained no affected boxes; local SQLite stores were not checked. The required-headers OpenAPI breaking change was explicitly confirmed.

Review order

options.rs validation → mitm.go injection → per-layer plumbing → lifecycle guards.

Verification

This push skipped the local push audit with explicit authorization, using --no-verify --force-with-lease. The independent auditor timed out without producing a valid dossier; local command results are not an independent audit verdict.

Latest fix: with production unchanged, the legacy-box regression failed because the verified stand-in shim process remained alive after stop. After the fix, both stop cases returned success and terminated their processes; the legacy case also rejected its subsequent start. This is a process-backed unit test, not real-VM E2E.

Local make commands returned success for the stop regressions, six required-headers tests, twelve C options tests, Rust lint and formatting. The C header was regenerated through make dev:c; both unsafe functions and the declaration document pointer safety requirements.

Earlier verification included 349 CLI tests and targeted Rust, C FFI, gvproxy, Go, Python, Node, OpenAPI, API and runner checks. Those other layer tests were not rerun for this latest fix. Earlier apps lint/format retained baseline failures.

Earlier transient failures: Node “secret headers survive the REST request” hit a 5000ms timeout; unchanged retry passed. One CLI SSH test timed out; unchanged retry passed. Python dependency setup hit PyPI TLS errors; offline retry passed.

Unrun: full runner suite, real-VM multi-header E2E, parallel C event_queue flake (file unchanged). Optional OpenAPI discovery cleanup was not included.

Diff: 322 lines (+241 / -81) across 4 files Reviewer: DorianZheng Review duration: 1932m
All Vouch review confidence checks passed
Residual risk 0.28 = Change Risk (0.65) × (1 − Review Confidence (0.57)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.65 · 322 lines diff across 4 files
0.65
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
0.17
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
56%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size diff_size
0.346
Shallow Review Depth shallow_review_depth
0.289
Sensitive Paths sensitive_paths
0.065
Real PR Conversation Timeline
1 comments
"Review active on #2540"
general weight: 0.35
Reviewers
Assignees
Unassigned
Labels
risk: low confidence: 56.8% reviewed sensitive_module
Vouch Risk Breakdown
AI-powered review risk analysis
Change Risk
Change Risk · Model 1 (XGBoost)
Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
Score: 65.1% (HIGH) · Higher = larger blast radius
65.1%
Review Confidence
Review Confidence · Models 2 & 3
Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
Score: 56.8% · Lower = rushed or shallow review
56.8%
Residual Risk
Residual Risk · Core Equation
Residual = Change × (1 − Confidence)
Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
Score: 28.2% · Safe to merge
28.2%