Repository navigation
Description
Is your feature request related to a problem? Please describe.
Everywhere Plumber exports results, controls and the issues they raise are identified only by their technical name: plumber-report.json, the PBOM and CycloneDX outputs, and the score push all say branchMustBeProtected or containerImageMustComeFromAuthorizedSources, nothing more. The human-readable names exist, but only in the docs catalog.
Anyone building on top of the outputs (report tooling, dashboards, the Plumber Platform, any integration) ends up hand-writing a technicalName -> "Branches must be protected" map, and that map silently drifts on every release that adds or renames a control. Types missing from the map degrade to raw camelCase identifiers in user-facing views, which reads like a bug to anyone who is not a Plumber developer.
Describe the solution you'd like
Ship the display metadata with the results instead of making every consumer rebuild it:
- Each control entry in
plumber-report.json(and the PBOM/CycloneDX equivalents where controls are named) carries aname(human readable, the docs wording) and acategory(the docs grouping, e.g. "Branches & merge requests", "Variables & secrets") next to the existing technical id. The technical id stays the stable key, the new fields are display-only. - The same for the issue side of the vocabulary: findings already carry a human
messageper occurrence, but the issue TYPE a finding belongs to is only itscode(ISSUE-xxx). Each code gets a displaynametoo (the docs wording, e.g. the "Branch protection configuration not compliant" style titles), so a consumer grouping findings into issues can label the group without a hand-made code map. If the intended model is that a control's name IS the canonical issue-type name, saying so explicitly in the outputs/docs works just as well, the point is that one of the two is exported. - The Go module exports an accessor for the same metadata (control name/category, issue-code names), next to
configuration.ValidControlNames(), so embedders can reflect it programmatically instead of parsing docs. This is also the natural home for the per-control provider applicability that is currently unexported (controlsMeta), which embedders have asked about before.
Configuration in .plumber.yaml
Not applicable, this is output metadata only, no control behavior changes and no new configuration.
Implementation Hints
The names and categories already exist for the docs, so the work is mostly making one exported table the single source: the docs generation, the terminal output, the JSON/PBOM writers and the new accessor all read from it. No new data collection, no IR change, no Rego change.
Why It's Valuable
- Every surface downstream of the CLI shows the exact same names as the docs, with zero per-consumer mapping to maintain.
- Reports become readable for the people they are written for (auditors, leads, non-CI specialists), not just for people who know the control vocabulary.
- Integrators stop shipping stale maps: a new control shows up everywhere with its proper name on the day the release ships.
Activity
feat(catalog): export human-readable control names and categories (#440)
feat(catalog): export human-readable control names and categories (#440)
chore(release): 0.4.51 [skip ci]