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/>.
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/>.
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/>.
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/>.
Index ¶
- func AddAssetRefFlags(cmd *cobra.Command)
- func AddDefaultFlags(cmd *cobra.Command)
- func AddDependencyVulnsScanFlags(cmd *cobra.Command)
- func AddFirstPartyVulnsScanFlags(cmd *cobra.Command)
- func AddGenerateTagFlags(cmd *cobra.Command)
- func BomFromBytes(bomStr []byte) (*cdx.BOM, error)
- func DiscoverAttestations(image string, predicateType string) ([]map[string]any, error)
- func EvaluatePolicyAgainstAttestations(image string, policyPath string, attestations []map[string]any) (*sarif.SarifSchema210Json, error)
- func Login(ctx context.Context, username, password, registryURL string) error
- func MaybeLoginIntoOciRegistry(ctx context.Context) error
- func ObfuscateSecretAndAddFingerprint(sarifScan *sarif.SarifSchema210Json)
- func ObfuscateString(str string) string
- func PrintFirstPartyScanResults(scanResponse dtos.FirstPartyScanResponse, assetName string, webUI string, ...) error
- func PrintSastScanResults(firstPartyVulns []dtos.FirstPartyVulnDTO, webUI, assetName string, ...)
- func PrintScaResults(scanResponse dtos.ScanResponse, ...) error
- func PrintSecretScanResults(firstPartyVulns []dtos.FirstPartyVulnDTO, webUI string, assetName string, ...)
- func TokenToKey(token string) (string, string, error)
- func UploadAttestation(ctx context.Context, predicate string) error
- func UploadBOM(bom io.Reader) (*http.Response, context.CancelFunc, error)
- func UploadPublicKey(ctx context.Context, token, apiURL, publicKeyPath, assetName string) error
- func UploadVEX(vex io.Reader) (*http.Response, error)
- func WarnIfUnauthenticated()
- type AttestationFileLine
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddAssetRefFlags ¶
func AddDefaultFlags ¶
func AddGenerateTagFlags ¶ added in v1.0.0
func DiscoverAttestations ¶
DiscoverAttestations fetches and decodes attestations for a container image without relying on the cosign CLI binary.
func EvaluatePolicyAgainstAttestations ¶ added in v1.0.0
func ObfuscateSecretAndAddFingerprint ¶
func ObfuscateSecretAndAddFingerprint(sarifScan *sarif.SarifSchema210Json)
add obfuscation function for snippet
func ObfuscateString ¶
func PrintSastScanResults ¶
func PrintScaResults ¶
func PrintScaResults(scanResponse dtos.ScanResponse, failOnRisk, failOnCVSS, assetName, webUI string) error
can be reused for container scanning as well.
func PrintSecretScanResults ¶
func UploadPublicKey ¶
func WarnIfUnauthenticated ¶ added in v1.0.1
func WarnIfUnauthenticated()
WarnIfUnauthenticated prints a warning to stderr when no token and no assetName are provided. It should be called after config has been parsed for commands that support unauthenticated scanning (results will not be saved to DevGuard).