Repository navigation
fix(repo): harden gateway, admin, dashboard and CI after audit - #5
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Full-repository audit follow-up: 62 findings across gateway, admin/db, dashboard and tooling, plus four small features. Every item is implemented, unit-tested and covered end to end.
Gateway (
src/gateway/**,src/util/**)5xxis retryable (docs and code now agree)x-opencode-router-*headerstype->api_erroractiveRequestscounted once per request for every/v1/*route (models path included)JSON.stringifyof a 128 MB body)upstream_response_max_bytescap (502 upstream_response_too_large)\r\n\n,\n\r\n,\r\r) and multi-linedata:x_opencodestrippingbaseUrlquery preserved; identity/attribution headers allowlisted502 invalid_provider_credentialsinstead of leaking the key413 payload_too_large,405+Allow,reply.status()no-op fixedAdmin / db (
src/admin/**,src/db/**)apiKeyvalidation (printable ASCII, length), extended SSRF ranges (CGNAT, benchmarking, IPv6 specials), scheduler/probe path now guardeddispose()infinally, cooldown probe guardPRAGMA busy_timeout; transactional prune/clear;modelfilter is a contains match;/audit+/activityvalidatelimitGET /admin/api/diagnostics(new), resilient on a partially initialized databaseDashboard (
web/**)--fg-subtlecontrast raised above WCAG minimums, field errors/switches exposed to assistive tech, modal scroll-lock refcount, live relative timestampsweb/src/lib/*)Tooling / CI / docs
pnpm verifylocal gate; negative--self-testfor both enforcement scripts wired into CIcheck-docsnow scans all ofsrc/**, all quote styles and explicitmethod:options; new.env.exampleparity checker--single <sha>(fails on merge commits) used by the all-zero CI fallback; CI smoke test passesDATA_DIR; screenshot Chrome guard hardeneddocs/SPEC.md/docs/API.mdupdated for every contract change above; stale ownership table removedVerification
pnpm verifygreen locally: typecheck, 436 unit tests, no doc drift, build, 108/108 e2e checks. Enforcement self-tests verified to fail when inverted.