scanner

package
v0.19.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 4, 2025 License: AGPL-3.0 Imports: 38 Imported by: 0

Documentation

Overview

Copyright (C) 2025 l3montree GmbH

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddAssetRefFlags

func AddAssetRefFlags(cmd *cobra.Command)

func AddDefaultFlags

func AddDefaultFlags(cmd *cobra.Command)

func AddDependencyVulnsScanFlags

func AddDependencyVulnsScanFlags(cmd *cobra.Command)

func AddFirstPartyVulnsScanFlags

func AddFirstPartyVulnsScanFlags(cmd *cobra.Command)

func BomFromBytes

func BomFromBytes(bomStr []byte) (*cdx.BOM, error)

func DiscoverAttestations

func DiscoverAttestations(image string, predicateType string) ([]map[string]any, error)

func Login

func Login(ctx context.Context, username, password, registryURL string) error

func MaybeLoginIntoOciRegistry

func MaybeLoginIntoOciRegistry(ctx context.Context) error

func ObfuscateSecretAndAddFingerprint

func ObfuscateSecretAndAddFingerprint(sarifScan *common.SarifResult)

add obfuscation function for snippet

func ObfuscateString

func ObfuscateString(str string) string

func PrintFirstPartyScanResults

func PrintFirstPartyScanResults(scanResponse scan.FirstPartyScanResponse, assetName string, webUI string, assetVersionName string, scannerID string) error

func PrintSastScanResults

func PrintSastScanResults(firstPartyVulns []vuln.FirstPartyVulnDTO, webUI, assetName string, assetVersionName string)

func PrintScaResults

func PrintScaResults(scanResponse scan.ScanResponse, failOnRisk, failOnCVSS, assetName, webUI string) error

can be reused for container scanning as well.

func PrintSecretScanResults

func PrintSecretScanResults(firstPartyVulns []vuln.FirstPartyVulnDTO, webUI string, assetName string, assetVersionName string)

func TokenToKey

func TokenToKey(token string) (string, string, error)

func UploadAttestation

func UploadAttestation(ctx context.Context, predicate string) error

func UploadBOM

func UploadBOM(bom io.Reader) (*http.Response, context.CancelFunc, error)

func UploadPublicKey

func UploadPublicKey(ctx context.Context, token, apiURL, publicKeyPath, assetName string) error

func UploadVEX

func UploadVEX(vex io.Reader) (*http.Response, error)

Types

type AttestationFileLine

type AttestationFileLine struct {
	PayloadType string `json:"payloadType"`
	Payload     string `json:"payload"` // base64 encoded AttestationPayload
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL