aquasecurity/trivy

Configurable log format using trivy server

Open

#3.300 geöffnet am 14. Dez. 2022

Auf GitHub ansehen
 (1 Kommentar) (0 Reaktionen) (0 zugewiesene Personen)Go (371 Forks)batch import
help wantedkind/featurepriority/backlog

Repository-Metriken

Stars
 (35.000 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 5T 2h) (53 gemergte PRs in 30 T)

Beschreibung

We use trivy server to scan images from both CI pipelines and a Kubernetes operator. Our log infrastructure (Splunk) is much more fond of logs in machine-readable format (JSON), so it would be nice if it were possible to configure the log format when bootstrapping trivy server.

It seems like trivy uses https://github.com/uber-go/zap as the logging backend, supporting configuration, and JSON logging. A potential challenge could be that it seems hard to integrate Zap configuration with Viper/Cobra, ref. https://github.com/uber-go/zap/issues/542.

Related https://github.com/aquasecurity/trivy/issues/1526.

Contributor Guide