boundary icon indicating copy to clipboard operation
boundary copied to clipboard

Add semgrep rules

Open johanbrandhorst opened this issue 1 year ago • 0 comments
trafficstars

Add semgrep rules

Instrument our security scanner with the ability to use custom semgrep rules. This is inspired by the HVS teams use of semgrep.

semgrep: add rule to detect string interpolation in WithInfoMsg

The event.WithInfoMsg function expects a set of key value tuples, but it can easily be misunderstood to accept string interpolation arguments. This check will error if any string interpolation verbs are used in calls to event.WithInfoMsg

View this rule in the playground here: https://semgrep.dev/playground/r/YGUpBXB/johan_brandhorst_personal_org.with-info-msg-string-interpolation

johanbrandhorst avatar Aug 24 '24 00:08 johanbrandhorst