fix(garage): a comment in the ConfigMap tripped Trivy's KSV-0109
Validate Helm Charts / Detect changed charts (pull_request) Successful in 2s
Validate Helm Charts / Resource quantities (pull_request) Successful in 11s
Validate Helm Charts / Build garage (pull_request) Successful in 5s
Install-test / Install-test garage (pull_request) Successful in 1m20s
Validate Helm Charts / Install-test (pull_request) Successful in 1m20s
Validate Helm Charts / Trivy config garage (pull_request) Successful in 16s
Publish Helm Chart with patched Application Version / publish-helm-chart (push) Successful in 10s
Publish Garage Helm Chart / Publish Garage Helm Chart (push) Successful in 10s
SonarQube Analysis / SonarQube Analysis (push) Successful in 36s

Run 446 reported one HIGH finding, and it was prose, not data: the line
"metrics_require_token = true plus a token to close it" sits inside the
ConfigMap's data block, and KSV-0109 reads a <key> = <value> assignment with a
credential-ish key name as a stored secret - comments included. The ConfigMap
holds no credential at all; the RPC secret arrives as an environment variable
precisely so that it cannot.

Reworded rather than excepted: an entry in ci/trivy/trivyignore.yaml would
carry a permanent exception for one sentence, and the next reader of the report
would have to re-establish that the ConfigMap really is secret-free. The
replacement names the mechanism at the line, so the shape does not come back.
This commit was merged in pull request #82.
This commit is contained in:
jklein committed 2026-10-03 20:45:56 +00:00
1 parent 01336af953
commit b19da4e580
1 file changed
+10 -4
+10 -4
View File
@@ -153,10 +153,16 @@ data:
# WHAT IS AND IS NOT REACHABLE AS A RESULT, stated precisely because "no
# token" reads like "nothing is open":
# /health open, by design, and the probes depend on it
# /metrics OPEN TOO - metrics_require_token defaults to false, so with
# no metrics_token the endpoint needs no authentication. That
# is internal metrics on a ClusterIP port; set
# metrics_require_token = true plus a token to close it.
# /metrics OPEN TOO - the metrics_require_token switch defaults to
# false, so without a metrics credential the endpoint needs no
# authentication. That is internal metrics on a ClusterIP port;
# to close it, set that switch true and add a credential.
#
# (And a note for whoever edits these lines: do NOT write them
# as "<key> = <value>" with a credential-ish key name. Trivy's
# KSV-0109 reads an assignment inside this ConfigMap's DATA -
# comments included - as a stored secret and reports HIGH. It
# cost one run here, 2026-10-03.)
# everything else 401/403 until a token exists. Note that a config
# token is not the only way to get one: Garage 2.x also keeps
# admin tokens in the cluster ("garage admin-token create"),