Skip to content

Commit

Permalink
adjust sarif for github (#27)
Browse files Browse the repository at this point in the history
  • Loading branch information
becojo authored Apr 15, 2024
1 parent dd8c68f commit 9cd49ec
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions formatters/sarif/sarif.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,16 +73,17 @@ func (f *Format) Format(ctx context.Context, report *opa.FindingsResult, package
line = 1
}
ruleDoc := docs[ruleId]
ruleUrl := fmt.Sprintf("https://github.com/boostsecurityio/poutine/tree/main/docs/content/en/rules/%s.md", ruleId)

run.AddRule(ruleId).
WithName(rule.Title).
WithDescription(rule.Title).
WithFullDescription(
sarif.NewMarkdownMultiformatMessageString(ruleDoc),
sarif.NewMultiformatMessageString(ruleDescription),
).
WithHelpURI(
fmt.Sprintf("https://github.com/boostsecurityio/poutine/tree/main/docs/content/en/rules/%s.md", ruleId),
)
WithHelpURI(ruleUrl).
WithTextHelp(ruleUrl).
WithMarkdownHelp(ruleDoc)

run.AddDistinctArtifact(path)

Expand Down

0 comments on commit 9cd49ec

Please sign in to comment.