Documentation ¶
Index ¶
- Constants
- Variables
- func BuildTestSummary(resultsSummary *snykclient.SBOMTestSummary) (data []byte, contentType string, err error)
- func IsSBOMJSON(b []byte) bool
- func ReadSBOMFile(filename string, errFactory *errors.ErrorFactory) ([]byte, error)
- func RegisterWorkflows(e workflow.Engine) error
- func RenderJSONResult(w io.Writer, res *snykclient.SBOMTestResult) error
- func RenderPrettyResult(w io.Writer, orgID, filepath string, res *snykclient.SBOMTestResult) error
- func TestWorkflow(ictx workflow.InvocationContext, _ []workflow.Data) ([]workflow.Data, error)
- type Identifier
- type JSONOutput
- type LicenseIssue
- type SemVer
- type Vulnerability
Constants ¶
View Source
const ( MIMETypeJSON = "application/json" MIMETypeText = "text/plain" )
Variables ¶
View Source
var WorkflowID = workflow.NewWorkflowIdentifier("sbom.test")
Functions ¶
func BuildTestSummary ¶
func BuildTestSummary(resultsSummary *snykclient.SBOMTestSummary) (data []byte, contentType string, err error)
func IsSBOMJSON ¶
func ReadSBOMFile ¶
func ReadSBOMFile(filename string, errFactory *errors.ErrorFactory) ([]byte, error)
func RegisterWorkflows ¶
func RenderJSONResult ¶
func RenderJSONResult(w io.Writer, res *snykclient.SBOMTestResult) error
func RenderPrettyResult ¶
func RenderPrettyResult(w io.Writer, orgID, filepath string, res *snykclient.SBOMTestResult) error
func TestWorkflow ¶
Types ¶
type Identifier ¶
type JSONOutput ¶
type JSONOutput struct { OK bool `json:"ok"` DependencyCount int `json:"dependencyCount"` Summary string `json:"summary"` Remediation interface{} `json:"remediation,omitempty"` Filtered interface{} `json:"filtered,omitempty"` Vulnerabilities []Vulnerability `json:"vulnerabilities"` LicenseIssues []LicenseIssue `json:"license_issues"` }
type LicenseIssue ¶
type Vulnerability ¶
type Vulnerability struct { CreationTime time.Time `json:"creationTime,omitempty"` DisclosureTime time.Time `json:"disclosureTime,omitempty"` Exploit string `json:"exploit,omitempty"` ID string `json:"id,omitempty"` Identifiers Identifier `json:"identifiers,omitempty"` ModificationTime time.Time `json:"modificationTime,omitempty"` PackageName string `json:"packageName,omitempty"` PublicationTime time.Time `json:"publicationTime,omitempty"` SemVer SemVer `json:"semver,omitempty"` Severity severities.Level `json:"severity,omitempty"` SeverityWithCritical severities.Level `json:"severityWithCritical,omitempty"` Title string `json:"title,omitempty"` Version string `json:"version,omitempty"` Name string `json:"name,omitempty"` CVSSv3 string `json:"CVSSv3,omitempty"` CVSSScore float64 `json:"cvssScore,omitempty"` }
Click to show internal directories.
Click to hide internal directories.