Repository navigation
Releases: Codesteward/codesteward-audit-proxy
Releases · Codesteward/codesteward-audit-proxy
Release list
Release v1.0.2
Changed
- License changed from BSD-3-Clause to Apache-2.0 (copyright holder remains bitkaio LLC)
- Repository moved from
bitkaiotocodestewardGitHub organization; all links updated - Docker Compose image reference updated to
ghcr.io/codesteward/codesteward-audit-proxy
Fixed
- License badge in README now correctly shows Apache-2.0
Release v1.0.1
Security
- Upgraded
google.golang.org/grpcfrom v1.79.2 to v1.79.3 — fixes an authorization bypass via missing leading slash in the HTTP/2:pathpseudo-header (CVSS 9.1, Critical) - Upgraded
github.com/ClickHouse/clickhouse-go/v2from v2.26.0 to v2.44.0 andgithub.com/ClickHouse/ch-gofrom v0.61.5 to v0.71.0 — fixes a query smuggling vulnerability where large uncompressed malicious external data could be used to inject a query packet into the connection stream (CVE-2025-1386, CVSS 5.9, Moderate)
Fixed
- License badge in README now correctly shows BSD-3-Clause (was incorrectly showing MIT)
Release v1.0.0
Added
- Token usage extraction —
input_tokens,output_tokens,cache_read_tokens, andcache_write_tokenscaptured from every LLM response and stored in ClickHouse; supports Anthropic (including cache tokens), OpenAI, and SAP AI Core in both streaming and non-streaming modes - OTel metric counters —
gen_ai.usage.input_tokensandgen_ai.usage.output_tokensemitted as Int64Counter metrics withgen_ai.system,llm.agent,gen_ai.response.model, andaudit.projectdimensions; no-op whenOTEL_EXPORTER_OTLP_ENDPOINTis unset - OTel MeterProvider — OTLP/HTTP metric exporter set up alongside existing TracerProvider; both shut down cleanly on graceful stop
TokenUsageshared type inparser/types.go— used by all parser result types- Token usage span attributes —
gen_ai.usage.input_tokensandgen_ai.usage.output_tokensadded tollm.proxy.requestspans - Migration
007_add_token_usage.sql— addsinput_tokens,output_tokens,cache_read_tokens,cache_write_tokenscolumns to existing installations - Dashboard design documentation (
docs/dashboard/) — comprehensive design spec and implementation guide for a Nuxt 4 + Vue 3 web UI covering session browsing, event inspection, token usage analytics, and proxy health monitoring - Parser tests for token usage extraction (Anthropic full + streaming, OpenAI full + streaming)
- Handler test for end-to-end token usage flow
Changed
- Release pipeline now extracts release notes from
CHANGELOG.mdinstead of auto-generating from git log; falls back to git log if no entry exists for the tagged version
Release v0.4.0
What's changed
Added
- IDE plugin header support —
X-Audit-User,X-Audit-Team,X-Audit-Project,X-Audit-Branch,X-Audit-Session-ID, andX-Audit-Agentheaders allow IDE companion plugins to inject per-request identity and context; header values override env-var defaults (AUDIT_PROJECT,AUDIT_BRANCH) for centrally-hosted deployments - Unprocessed events table — responses the proxy cannot parse into structured audit records (non-chat endpoints like
/v1/modelsand/v1/count_tokens, unknown providers, parse errors) are routed toaudit.unprocessed_eventsinstead of being silently dropped; stores raw body, HTTP method, path, status code, content type, and parse error message - Health endpoint —
GET /healthzreturns{"status":"ok","version":"..."}for IDE plugin connectivity checks and load balancer probes; version set at build time via-ldflags "-X main.version=..." userandteamcolumns onaudit_events—LowCardinality(String), populated fromX-Audit-UserandX-Audit-TeamheadersUnprocessedAdderinterface andUnprocessedBatcher— mirrorsEventAdder/Batcherpattern for the unprocessed events write pathANTHROPIC_UPSTREAM_URL,OPENAI_UPSTREAM_URL,GEMINI_UPSTREAM_URLenv vars — override the default upstream target for each provider without changing detection logic; useful for routing through LiteLLM, Portkey, a regional endpoint, or any internal gatewayNewRouterWithConfig(RouterConfig)constructor onRouter— accepts upstream URL overrides alongside SAP AI Core config;NewRouterpreserved as backwards-compatible wrapper- Migration
005_add_user_team.sql— addsuserandteamcolumns to existing installations - Migration
006_unprocessed_events.sql— creates theunprocessed_eventstable - Cline agent detection —
detectAgentnow matchesclinein the User-Agent header - Claude Code VSCode extension detection —
detectAgentnow matchesclaude-cliUser-Agent sent by the VSCode extension (in addition toclaude-codefrom the CLI) - Session ID priority chain:
X-Audit-Session-ID>X-Session-ID> auto-generated UUID - IDE plugins design document (
docs/ide-plugins-design.md) — comprehensive design for VSCode and JetBrains companion plugins covering env var injection, config file schema, and header protocol - New handler tests:
X-Audit-*header overrides, session ID fallback, Cline detection, Claude VSCode extension detection, unprocessed event routing
Changed
extractEventsnow returns([]audit.AuditEvent, error)instead of[]audit.AuditEvent— parse errors are surfaced to the caller for routing to the unprocessed tableNewHandlersignature extended withunprocessed audit.UnprocessedAdderparameterrequestMetastruct extended withuser,team,method, andunprocessedfields
Release v0.3.0
What's changed
Added
migrations/migrate.sh— idempotent HTTP-based migration runner; usescurlagainst the ClickHouse HTTP interface (port 8123) so noclickhouse-clientbinary is required; tracks applied versions in<db>.schema_migrationsusing aReplacingMergeTreetable; splits multi-statement files on semicolons viaawkand executes each statement individuallymigrateservice indocker-compose.yml— runs on everydocker compose upusingalpine:3.21; applies only pending migrations; theproxyservice starts only after the migrate service completes successfully
Fixed
- Compressed response body in
rawfield — the Claude Code VSCode extension (and TypeScript SDK) explicitly setsAccept-Encoding: gzip, deflate, br; when forwarded verbatim, Go'shttp.Transporttreats compression as application-managed and does not decompress the response, causing the auditrawfield to contain binary data andthinking/assistant_textto be empty; fixed by addingAccept-Encodingto the stripped headers list sohttp.Transportnegotiates encoding itself and transparently decompresses before theTeeReadersees the body - Agent detection for VSCode extension —
detectAgentused a case-sensitivestrings.Containscheck; the Claude Code VSCode extension sendsClaude-Code(capitalised) which fell through to"unknown"; fixed by applyingstrings.ToLowerbefore comparison 003_request_capture.sql— bothALTER TABLEstatements used unqualified table nameaudit_events; the oldclickhouse-client --database=auditflag set an implicit database context that the HTTP-based migration runner does not; fixed by using fully qualifiedaudit.audit_events
Release v0.2.0
What's changed
Added
- SAP AI Core upstream support — routes requests to a configurable SAP AI Core base URL; resource group forwarded via
AI-Resource-Groupheader Routerstruct encapsulating upstream detection logic;NewRouter(sapBaseURL, sapAuthHost)constructor replaces the previous package-levelDetectUpstreamfunction- Request body capture with configurable scrubbing pipeline (
AUDIT_CAPTURE_REQUESTS,AUDIT_SCRUB_PATTERNS) PatternScrubber— compiles Go regexp patterns at startup, replaces matches with[REDACTED]before storageuser_messagesfield: structured, queryable extraction of user-role message content from request bodiesrequest_capturedfield: boolean flag per audit row indicating whether request body was stored- Migration
003_request_capture.sqladding the two new columns to existing installations - Dockerfile — multi-stage build (
golang:1.25-alpine→gcr.io/distroless/static:nonroot), fully static binary, non-root runtime docker-compose.yml— local development stack with ClickHouse; migrations auto-applied on first start- GitHub Actions CI workflow —
go vet,go test -race, build verification, multi-arch Docker build check on every push and PR - GitHub Actions release workflow — multi-arch Docker image pushed to GHCR, static binaries for
linux/amd64,linux/arm64,darwin/amd64,darwin/arm64, auto-generated changelog, GitHub Release with SHA-256 checksums
Fixed
handler_test.go— updated twoNewHandlercall sites to pass the required*Routerargument introduced by the SAP AI Core featurerouter_test.go— updated allDetectUpstreamcalls to usedefaultRouter.DetectUpstream()following the promotion ofDetectUpstreamfrom a package-level function to a*Routermethod