Skip to content

Commit 7ae55ba

Browse files
bump opengrep 1.21
1 parent 9884af4 commit 7ae55ba

3 files changed

Lines changed: 8 additions & 4 deletions

File tree

.tool_version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.18.0
1+
1.21.0

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
ARG OPENGREP_VERSION=v1.18.0
1+
ARG OPENGREP_VERSION=v1.21.0
22

33
# Build codacy-opengrep wrapper
44
FROM golang:1.23-alpine3.21 AS builder

internal/docgen/parsing.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ func semgrepRules(destinationDir string) ([]PatternWithExplanation, *ParsedSemgr
9797
func getSemgrepRegistryRules() (*ParsedSemgrepRules, error) {
9898
return getRules(
9999
"https://github.com/semgrep/semgrep-rules",
100-
"4ccd3b9cce2321a5fe3793868e4c2d4cfa5e9c43",
100+
"4e3b8820d38983199db46cd8551bf51067b7fe16",
101101
isValidSemgrepRegistryRuleFile,
102102
prefixRuleIDWithPath)
103103
}
@@ -412,6 +412,8 @@ func toCodacyLevel(r SemgrepRule) Level {
412412
return Critical
413413
case "WARNING":
414414
return Medium
415+
case "MEDIUM":
416+
return Medium
415417
case "INFO":
416418
return Low
417419
default:
@@ -561,6 +563,7 @@ func toCodacyLanguages(r SemgrepRule) []string {
561563
"dockerfile": "Dockerfile",
562564
"elixir": "Elixir",
563565
"go": "Go",
566+
"generic": "Go",
564567
"java": "Java",
565568
"javascript": "Javascript",
566569
"js": "Javascript",
@@ -581,11 +584,12 @@ func toCodacyLanguages(r SemgrepRule) []string {
581584
"typescript": "TypeScript",
582585
"visualforce": "VisualForce",
583586
"yaml": "YAML",
587+
"xml": "XML",
584588
}
585589

586590
codacyLanguages := lo.Map(
587591
lo.Filter(r.Languages, func(s string, _ int) bool {
588-
return s != "generic" && s != "regex" && // internal rules?
592+
return s != "regex" && // internal rules?
589593
s != "lua" && s != "ocaml" && s != "html" && s != "solidity" // not supported by Codacy
590594
}),
591595
func(s string, _ int) string {

0 commit comments

Comments
 (0)