Skip to content

go-csp-collector

Self-hosted collector that logs browser CSP, NEL, COOP and COEP reports to stdout

Permissive (OSI) · MIT

Listed by , founder & editor

82

Health

Thriving

Overview

Stars

132

Last commit

12 days ago

Nov 2026

Repository age

9 years

since Feb 2017

Latest version

v0.0.27

Oct 2026

Contributors

–

4 active in 90 days

Releases

20

last 12 months

Docker pulls

44k

jacobbednarz/go-csp-collector

Language

Go

go-csp-collector is a small Go service that receives the security reports browsers send. It handles Content Security Policy violations, Network Error Logging, Cross-Origin-Opener-Policy and Cross-Origin-Embedder-Policy reports, and other Reporting API reports.

You point your report-uri, report-to or Reporting-Endpoints headers at it. Each report is written to stdout as a log line, which your log aggregation tool can pick up. Prometheus metrics are exported too, on 127.0.0.1:9090, while reports arrive on port 8080. It drops unactionable CSP reports, such as those caused by browser extensions, using a default ignore list.

You can run it from Docker Hub, download a binary, install it with go install, deploy it with a Helm chart on Kubernetes, or use the example systemd unit. Output can be switched to JSON with a flag. It is MIT licensed and offers a self-hosted route to collecting these reports instead of a hosted reporting service.

Who it's for

Security engineers rolling out a CSP

Report-only routes let you watch violations before enforcing a policy.

Skip if: You want a dashboard with search built in, since it only writes logs.

Platform teams with an existing log pipeline

Reports go to stdout, so your current aggregator ingests them.

Skip if: You have no log aggregation tool in place.

Kubernetes operators

A Helm chart and Docker image are available, with Prometheus metrics.

Skip if: You want a managed service with no hosting.

The problem it solves

Browsers send CSP and other security reports to an endpoint you must run yourself. Without one, you never see violations or network errors from real users. This collector accepts those reports and turns them into log lines.

Strengths

  • Handles CSP, NEL, COOP, COEP and generic Reporting API reports
  • Filters out noisy CSP reports from browser extensions by default
  • Exports Prometheus metrics alongside logs
  • Docker image, binaries, Helm chart and systemd unit available
  • Frequent releases: 20 in the last year

Trade-offs

  • No built-in UI or storage; you need a log tool to read reports
  • Still at version 0.0.x
  • Reports must be sent over HTTPS from a host you expose yourself

Self-host go-csp-collector

Self-hostable
Yes
Docker image
jacobbednarz/go-csp-collector

Quick start

docker run -p 8080:8080 jacobbednarz/go-csp-collector

From the project's own install instructions. Check the docs for production settings.

Frequently asked questions

Can I self-host it?

Yes. Run the Docker image with docker run -p 8080:8080 jacobbednarz/go-csp-collector, or use a binary.

Where do reports go?

Each report is written to stdout as a log line. A JSON output format is available through a flag.

Which ports does it use?

It listens on 8080 for reports and serves metrics on 127.0.0.1:9090.

How is it licensed?

MIT.

Similar tools in Log management tools

logdeck

Log management tools

Self-hosted log viewer and alerting tool for Docker and Podman containers

150 10 5 days ago Active GPL-3.0

superlog

Log management tools

Open-source observability workspace that groups OpenTelemetry data into incidents

1.5k 123 today Active Apache-2.0

LogFox

Log management tools

Android logcat reader with filters and crash alerts for developers and tinkerers

1.4k 82 40 days ago Active GPL-3.0

logchef

Log management tools

Self-hosted log search and dashboards on top of ClickHouse or VictoriaLogs

943 63 yesterday Thriving AGPL-3.0

telescope

Log management tools

Web log viewer for ClickHouse, StarRocks, Docker and Kubernetes logs with access control

715 31 7 months ago Dormant MIT

DLT Viewer

Log management tools

557 291 5 days ago Active MPL-2.0