File tree Expand file tree Collapse file tree
cmd/devguard-scanner/commands Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2121 "mode" : " auto" ,
2222 "program" : " ${workspaceRoot}/cmd/devguard-scanner/main.go" ,
2323 "args" : [
24- " sca" ,
25- " --path=../devguard-test" ,
26- " --assetName=l3montree/projects/devguard/assets/devguard-api" ,
24+ " secret-scanning" ,
25+ " --assetName=wetteronline/projects/devguard/assets/sbom4" ,
2726 " --apiUrl=http://localhost:8080" ,
28- " --token=5ea4f27ae4385fdcc67628a5d2360880de1b70c768bd6715568edf63c5692981 "
27+ " --token=c5077f7d008d9980814d0345fdfaddcd02774d4577ed87c5b7e8cc3108447a1b "
2928 ],
3029 },
3130 {
Original file line number Diff line number Diff line change @@ -243,6 +243,13 @@ func obfuscateSecretAndAddFingerprint(sarifScan *common.SarifResult) {
243243 // obfuscate the snippet
244244 for ru , run := range sarifScan .Runs {
245245 for re , result := range run .Results {
246+ if len (result .Locations ) == 0 {
247+ continue
248+ }
249+ // make sure to set the result.Fingerprints
250+ if result .Fingerprints == nil {
251+ result .Fingerprints = & common.Fingerprints {}
252+ }
246253 // obfuscate the snippet
247254 for lo , location := range result .Locations {
248255 snippet := location .PhysicalLocation .Region .Snippet .Text
You can’t perform that action at this time.
0 commit comments