Documentation
¶
Overview ¶
Package artifacts records every file the CLI writes in an artifact manifest, so a CI step can upload, attest or attach exactly those files without guessing at paths.
The manifest is named by --artifact-manifest or VULNETIX_ARTIFACT_MANIFEST; with neither, Record does nothing. It is JSON Lines, one entry per write, appended with O_APPEND so several CLI processes in one job (sca, then sast, then sbom) add to the same file without coordinating. A file written twice appears twice; readers keep the last entry for a path (Read does).
Index ¶
Constants ¶
const EnvVar = "VULNETIX_ARTIFACT_MANIFEST"
EnvVar names the manifest when the flag is not given.
Variables ¶
var FlagPath string
FlagPath is set by the root --artifact-manifest flag.
Functions ¶
Types ¶
type Entry ¶
type Entry struct {
// Path is as written, absolute when the manifest's directory differs.
Path string `json:"path"`
// Kind is what the file is: sarif, cyclonedx, openvex, report, signature,
// certificate, attestation, ...
Kind string `json:"kind"`
SHA256 string `json:"sha256,omitempty"`
Bytes int64 `json:"bytes"`
Command string `json:"command,omitempty"`
Written string `json:"written"`
}
Entry is one written file.