summaryrefslogtreecommitdiff
path: root/plugins/security-guidance/tests/test_custom_headers.py
AgeCommit message (Collapse)Author
2026-10-14security-guidance: report gateway routing and inner CLI stderr in review ↵mhegazy/sg-review-telemetryMohamed Hegazy
telemetry Review rows gain two diagnostic keys, appended last so they never displace an existing key: - gateway_cfg: 1 when ANTHROPIC_BASE_URL names a host other than api.anthropic.com, 2 when ANTHROPIC_CUSTOM_HEADERS lines are sent, 3 for both. A number only: no host, header name or value. - child_stderr: lines the inner CLI wrote to stderr during a commit or push review.
2026-10-09security-guidance: send ANTHROPIC_CUSTOM_HEADERS on the plugin's own API callsmhegazy/sg-gateway-headersMohamed Hegazy
The plugin's own API calls (the /v1/models lookup and the review itself) never sent ANTHROPIC_CUSTOM_HEADERS, so a gateway that takes its key in a custom header answered 401 and reviews never ran (anthropics/claude-code#99857). The headers are now parsed the way Claude Code parses them (one `Name: Value` per line, split at the first colon) and sent on every call. A custom line replaces a header of the same name. anthropic-beta lines are not forwarded: the review needs none of the user's betas.