Documentation
¶
Overview ¶
Package postprocess applies a scan's bill-of-materials rules to its results: what the user says about the components the scan found, once the scan has found them.
It is deliberately apart from the scan SDK. Nothing here talks to the API, holds a client or takes a context — these are local transformations over a result the caller already has, which is also why a result parsed from a file can go through them just as one straight off a scan can.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Apply ¶ added in v0.5.0
func Apply(result *scanossapi.ScanResult, bom *settings.BOM)
Apply runs the BOM rules over a scan result in place.
The order is the point of this function, and the reason the individual rules are not exported: bom.remove runs first, then bom.replace over what survived it. Reversed, a replacement rewrites the PURL a remove rule was written against, the remove rule then matches nothing, and a component the user dismissed is reported under its new name — silently, since neither rule has failed. Making the order the caller's problem would be handing them that trap.
A nil result or nil BOM is a no-op.
Types ¶
This section is empty.