Add framework references to controls for Prometheus metrics #694
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Controls in the exported
controls.jsonlacked framework membership information, preventing Kubescape from including framework labels in Prometheus metrics. This made it impossible to filter metrics by framework in Grafana and other observability tools.Changes
frameworksfield to each control during export, containing a sorted list of all frameworks that include the controltest_export_framework_references.pyto validate framework references are correctly populatedframeworksfieldExample
Before:
{ "controlID": "C-0056", "name": "Configured liveness probe", "baseScore": 4.0 }After:
{ "controlID": "C-0056", "name": "Configured liveness probe", "frameworks": ["AllControls", "DevOpsBest"], "baseScore": 4.0 }This enables metrics like:
The CSV mapping file (
FWName_CID_CName.csv) continues to be generated for backward compatibility.Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
https://api.github.com/repos/kubernetes/kubernetes/releases/usr/bin/python3 python3 scripts/validations.py -stringintconv -tests /tmp/go-build2199229742/b1091/vet.cfg kg_.a elemetry.io/cont-ifaceassert ux_amd64/vet OUTPUT /internal/future-atomic 168.63.129.16 ux_amd64/vet -o F_4oDsPWb .cfg ux_amd64/vet b.go g/grpc/credentia-atomic -lang=go1.21 ux_amd64/vet(http block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.