Skip to content

v0.3.0

Choose a tag to compare

@github-actions github-actions released this 23 Oct 02:08
· 53 commits to main since this release

Added

  • SECURITY.md with 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.txt is signed keyless with cosign (Sigstore bundle checksums.txt.sigstore.json), and every archive gets a GitHub build provenance attestation. SECURITY.md explains 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.mod and go.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 when OTEL_EXPORTER_OTLP_ENDPOINT is set, W3C traceparent propagation through HTTP and gRPC, and trace_id and span_id in log lines. See docs/observability.md.
  • Configurable CORS through CORS_ALLOWED_ORIGINS, CORS_ALLOW_CREDENTIALS and CORS_MAX_AGE, answered before routing and authentication.
  • codebuild plan warns when a user-owned main.go does not start telemetry yet, since codebuild never rewrites it.

Changed

  • codebuild mcp is built with github.com/modelcontextprotocol/go-sdk v1.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 +json type) on request bodies and answer 415 otherwise. Clients that post JSON without that header, such as curl -d or fetch with 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.NewVerifier takes any number of public keys and auth.LoadPublicKeys reads every key of a PEM file; new service main.go files use them so the internal token key can rotate without downtime. Existing main.go files keep compiling with LoadPublicKey.

Security

These fixes come from an internal review of the generated authentication code; it was not an independent audit.

  • JWT: routes restricted by roles= or writeroles=, 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_GRACE now 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/password is 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_FOR reads the last X-Forwarded-For header line, so a client cannot choose its address behind proxies that add a separate line.
  • Requiring JSON bodies blocks login CSRF through text/plain HTML forms.
  • In workspaces the account service accepts AuthService calls 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 -force resets the permissions of the key files it rewrites.