Skip to content

Commit

Permalink
feature: Add 'Scan Type' field to patterns information [TAROT-2626]
Browse files Browse the repository at this point in the history
  • Loading branch information
afsmeira committed Apr 18, 2024
1 parent 1792f0f commit f389c25
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
version: 2.1

orbs:
codacy: codacy/base@10.11.1
codacy_plugins_test: codacy/[email protected].6
codacy: codacy/base@12.0.0
codacy_plugins_test: codacy/[email protected].11

commands:
attach_run_command_and_persist:
Expand Down
2 changes: 2 additions & 0 deletions docs/patterns.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,15 @@
"patternId": "secret",
"category": "Security",
"subcategory": "Cryptography",
"scanType": "ExposedSecrets",
"level": "Error",
"enabled": true
},
{
"patternId": "vulnerability",
"category": "Security",
"subcategory": "InsecureModulesLibraries",
"scanType": "Open-SourceDependencies",
"level": "Error",
"enabled": true
}
Expand Down
6 changes: 3 additions & 3 deletions internal/tool/tool.go
Original file line number Diff line number Diff line change
Expand Up @@ -191,9 +191,9 @@ func filterIssuesFromKnownFiles(issues []codacy.Issue, knownFiles []string) []co
})
}

func pkgID(ID, name, version string) string {
if ID != "" {
return ID
func pkgID(id, name, version string) string {
if id != "" {
return id
}
return fmt.Sprintf("%s@%s", name, version)
}
Expand Down

0 comments on commit f389c25

Please sign in to comment.