Documentation
¶
Index ¶
- Variables
- func RiskCheck(dir string, platformUrl string, consoleUrl string, verbose bool, wait bool) error
- func Scan(dir string, rev string, platformUrl string, consoleUrl string, verbose bool, ...) error
- func Upload(filePath string, tenantEndpoint string, platformUrl string, alias string, ...) error
- type Document
- type DocumentType
- type DocumentWrapper
- type EncodingType
- type FormatType
- type IngestionStatusItem
- type SourceInformation
- type StatusMeta
Constants ¶
This section is empty.
Variables ¶
var EncodingExts = map[string]EncodingType{ ".bz2": EncodingBzip2, ".zst": EncodingZstd, }
Functions ¶
func Upload ¶ added in v0.15.0
func Upload( filePath string, tenantEndpoint string, platformUrl string, alias string, docType string, isOpenVex bool, tag string, softwareID string, sbomSubject string, componentName string, sbomSubjectNameOverride string, sbomSubjectVersionOverride string, checkBlockedPackages bool, ) error
Upload handles the upload of SBOM or OpenVEX files to the Kusari platform
Types ¶
type Document ¶ added in v0.15.0
type Document struct {
Blob []byte
Type DocumentType
Format FormatType
Encoding EncodingType
SourceInformation SourceInformation
}
Document describes the input for a processor to run. This input can come from a collector or from the processor itself (run recursively).
type DocumentType ¶ added in v0.15.0
type DocumentType string
DocumentType describes the type of the document contents for schema checks
const ( DocumentSBOM DocumentType = "SBOM" DocumentOpenVEX DocumentType = "OPEN_VEX" )
Document* is the enumerables of DocumentType
type DocumentWrapper ¶ added in v0.15.0
type DocumentWrapper struct {
*Document
UploadMetaData *map[string]string `json:"upload_metadata,omitempty"`
}
DocumentWrapper holds extra fields without modifying processor.Document
type EncodingType ¶ added in v0.15.0
type EncodingType string
const ( EncodingBzip2 EncodingType = "BZIP2" EncodingZstd EncodingType = "ZSTD" EncodingUnknown EncodingType = "UNKNOWN" )
type FormatType ¶ added in v0.15.0
type FormatType string
FormatType describes the document format for malform checks
const ( FormatJSON FormatType = "JSON" FormatJSONLines FormatType = "JSON_LINES" FormatXML FormatType = "XML" FormatUnknown FormatType = "UNKNOWN" )
Format* is the enumerables of FormatType
type IngestionStatusItem ¶ added in v0.15.0
type IngestionStatusItem struct {
Workspace string `json:"workspace"` // partition key
Sort string `json:"sort"` // sort key
DocumentType string `json:"document_type"` // SBOM, VEX, etc.
DocumentName string `json:"document_name"` // Name of the ingested document
TTL int64 `json:"ttl"` // TTL in Unix epoch seconds
StatusMeta StatusMeta `json:"statusMeta"`
}
IngestionStatusItem represents an item in the pico-ingestion-status DynamoDB table
type SourceInformation ¶ added in v0.15.0
type SourceInformation struct {
// Collector describes the name of the collector providing this information
Collector string
// Source describes the source which the collector got this information
Source string
// DocumentRef describes the location of the document in the blob store
DocumentRef string
}
SourceInformation provides additional information about where the document comes from
type StatusMeta ¶ added in v0.15.0
type StatusMeta struct {
Status string `json:"status"` // started, processing, success, failed
UserMessage string `json:"user_message"` // customer-facing message
InternalMeta string `json:"internal_meta"` // internal metadata/details
UpdatedAt string `json:"updated_at"` // timestamp in milliseconds
}