# google/go-safeweb

Secure-by-default HTTP servers in Go.

Repository: https://github.com/google/go-safeweb
Canonical: https://ross.abutalabs.com/products/go-safeweb
Language: Go
License: Apache-2.0
License Family: permissive
Topics: security-hardening, security, golang, http-server, http
Archived: true
Last push: 2025-05-30T15:31:02+00:00

## Health v2 (maintenance only)
Score: 10/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 24, release rhythm 35, longevity 100
- inputs: {"age_days": 2297, "days_push": 460, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases, archived
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1494, forks 86 (observed 2026-08-28T04:04:53.120277+00:00)

## What it is
go-safeweb is a collection of Go libraries for building secure-by-default HTTP servers. It applies security mechanisms like XSS and CSRF protections automatically, with explicit opt-outs that are easy to review and restrict.

## Use cases
- build a Go HTTP server protected against XSS by default
- prevent CSRF attacks in Go web applications
- harden an existing net/http server with security middleware
- enforce secure HTTP headers like CSP automatically
- reduce security bugs in Go web services through safe APIs
- make unsafe HTTP usage explicit and reviewable in Go code

## When to choose
- you are writing a new HTTP server in Go and want security defaults applied automatically
- you want explicit, trackable opt-outs from security mechanisms
- you value high compatibility with Go's standard library net/http APIs
- you need protection against whole classes of web vulnerabilities like XSS and XSRF

## When to avoid
- you need full compatibility with every net/http feature or third-party framework scenario
- you need features beyond security-critical functionality
- you want a mature, feature-complete framework rather than an early-stage project
- you need a general-purpose web framework with routing, templating, and ORM features

## Facets
- artifact type: library
- maturity: active
- function: http-server, security, middleware
- domain: security, web-development, backend
- platform: go, windows
- tags: secure-by-default, xss-protection, csrf-protection, http-security, safe-coding, linux, macos

## Member repositories
- google/go-safeweb (main) score 10

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:53.120277+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T04:33:22.163415+00:00, confidence not recorded.
  - readme: https://github.com/google/go-safeweb (fetched 2026-08-28T04:04:53.120277+00:00, sha e61d40e7c27c)
- Data as of 2026-08-30T08:39:29.467469+00:00.
