Repository navigation
v0.3.0
Added
SECURITY.mdwith the supported versions and private vulnerability reporting, issue forms and a pull request template.- A weekly workflow that fails when a newer version exists of a module written into generated projects (database drivers, gRPC, protobuf,
github.com/google/uuid), and Dependabot updates for the modules of the tool and the GitHub Actions. - Release archives come with an SPDX SBOM each,
checksums.txtis signed keyless with cosign (Sigstore bundlechecksums.txt.sigstore.json), and every archive gets a GitHub build provenance attestation.SECURITY.mdexplains how to verify them; CI builds a snapshot release with SBOMs on every push. - Fuzz tests for the spec parser, struct tags, schema snapshots, the contract registry,
codebuild.json,go.modandgo.work, naming and the text diff. Generated projects fuzz password hash verification, JWT parsing and, in workspaces, internal token verification. A weekly workflow runs each fuzz target of the tool for three minutes. - Optional observability in generated projects, with the standard library only: Prometheus metrics on
METRICS_ADDR(HTTP requests by route and status, latency histograms, gRPC calls, database pool and Go runtime), OpenTelemetry traces exported over OTLP/HTTP JSON whenOTEL_EXPORTER_OTLP_ENDPOINTis set, W3Ctraceparentpropagation through HTTP and gRPC, andtrace_idandspan_idin log lines. Seedocs/observability.md. - Configurable CORS through
CORS_ALLOWED_ORIGINS,CORS_ALLOW_CREDENTIALSandCORS_MAX_AGE, answered before routing and authentication. codebuild planwarns when a user-ownedmain.godoes not start telemetry yet, since codebuild never rewrites it.
Changed
codebuild mcpis built withgithub.com/modelcontextprotocol/go-sdkv1.8.0.- Microservice workspaces are documented as experimental: their layout and generated code may change between minor releases.
- Generated endpoints require
Content-Type: application/json(or another+jsontype) on request bodies and answer 415 otherwise. Clients that post JSON without that header, such ascurl -dorfetchwith a string body, must set it. - Linking and unlinking a many-to-many pair needs read and update access to both entities from either route, so
writeroles=on one side now also restricts the link routes that start from the other side. auth.NewVerifiertakes any number of public keys andauth.LoadPublicKeysreads every key of a PEM file; new servicemain.gofiles use them so the internal token key can rotate without downtime. Existingmain.gofiles keep compiling withLoadPublicKey.
Security
These fixes come from an internal review of the generated authentication code; it was not an independent audit.
- JWT: routes restricted by
roles=orwriteroles=, and API key creation, check the access token against the database, so a token whose session was revoked, whose account was deleted or whose role changed can no longer use them or mint a lasting API key. In workspaces the account service checks every JWT this way. - JWT: a refresh token presented again within
AUTH_REFRESH_REUSE_GRACEnow receives the successor it already produced instead of starting a second token chain, and concurrent rotations of one token can no longer both create successors, so reuse detection catches a stolen token. - The login rate limiter hashes its keys and keeps at most 100,000 of them, and over-long identities are rejected before it, so distinct identities cannot exhaust memory. IPv6 clients are limited per /64 network.
PUT /auth/passwordis rate limited per client and per session, so it cannot be used to guess the current password or to burn CPU on password hashing.AUTH_TRUST_FORWARDED_FORreads the lastX-Forwarded-Forheader line, so a client cannot choose its address behind proxies that add a separate line.- Requiring JSON bodies blocks login CSRF through
text/plainHTML forms. - In workspaces the account service accepts
AuthServicecalls and account writes only from the gateway's client certificate (TLS_GATEWAY_NAME), so a compromised service cannot replay forwarded user tokens to create API keys or accounts. devcerts -forceresets the permissions of the key files it rewrites.