Skip to content

salsadigitalauorg/lagoon-csp-collector

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lagoon CSP collector

GitHub go.mod Go version Go Report Card Release

Installation

Docker

Run directly from a docker image:

docker run --rm ghcr.io/salsadigitalauorg/lagoon-csp-collector:main lagoon-csp-collector <flags>

Or add to your docker image:

COPY --from=ghcr.io/salsadigitalauorg/lagoon-csp-collector:main /usr/local/bin/lagoon-csp-collector /usr/local/bin/lagoon-csp-collector

Usage

$ lagoon-csp-collector -h
Usage of lagoon-csp-collector:
  -api string
        The endpoint to hydrate the CSP report
  -port string
        Port to run the collector on (default "3000")
  -test-domain string
        A domain to validate in the health check

Flags

api

An API endpoint to retrieve additional data from for the CSP, this is intended to return a Lagoon project name that matches the domain name for a the CSP report violation.

port

The port that the service runs on.

test-domain

A domain that will be sent to api during the health check to determine if the service is up and responding correctly.

Local development

Build

git clone [email protected]:salsadigitalauorg/lagoon-csp-collector.git && cd lagoon-csp-collector
go generate ./...
go build -ldflags="-s -w" -o build/lagoon-csp-collector .
go run . -h