Ross ROSS = Recommend OSS · open-source software intelligence for agents

justinas/nosurf

CSRF protection middleware for Go. observed · 2026-10-19

github.com/justinas/nosurf · homepage · Go · MIT (permissive) observed · 2026-10-19

Health v2 · maintenance only

29/100

  • Activity 13
  • Release rhythm 8
  • Longevity 100
How is this computed?

round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-10-21. Adoption (stars, forks) is never an input.

  • gap_med: n/a
  • age_days: 4807
  • days_rel: 525
  • days_push: 525
  • n_releases_24m: 1

Full methodology

Adoption not part of the score

1754 stars · 131 forks observed · 2026-10-19

What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-30, confidence not recorded

nosurf is a Go HTTP package that provides CSRF protection via a CSRFHandler middleware wrapping any http.Handler. It validates tokens on unsafe HTTP methods, supports endpoint exemptions, custom failure handlers, and masked tokens to mitigate BREACH attacks.

Use cases

  • add csrf protection to a go http server
  • protect go web forms from cross-site request forgery
  • csrf middleware for any go framework handler
  • exempt specific api endpoints from csrf checks
  • mitigate breach attacks with masked csrf tokens
  • custom error response for failed csrf validation

When to choose

  • you need framework-agnostic CSRF protection for any Go http.Handler
  • you want zero dependencies outside the Go standard library
  • you need fine-grained endpoint exemptions via paths, globs, or regexes
  • you want BREACH-resistant masked tokens

When to avoid

  • your framework already ships built-in CSRF protection
  • you need CSRF protection outside Go
  • you need session-backed token storage with advanced rotation policies

Facets

library · maturity stable

middleware security http-server security web-development backend go csrf csrf-protection http-middleware breach-mitigation zero-dependency web-server

5 sources

Member repositories

RepositoryRoleHealth v2
justinas/nosurfmain29

For agents

markdown · JSON · MCP: product_card(name="justinas/nosurf")

Data as of 2026-10-19T08:05:51.212177+00:00 · Report a problem