Skip to content

Commit

Permalink
fix(rego): Fix code highlighting for rego detections (#1668)
Browse files Browse the repository at this point in the history
Signed-off-by: Liam Galvin <[email protected]>
  • Loading branch information
liamg authored Apr 7, 2022
1 parent 0284098 commit cbc4a37
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ go 1.16
require (
github.com/AlecAivazis/survey/v2 v2.3.4
github.com/Masterminds/semver v1.5.0
github.com/aquasecurity/defsec v0.35.0
github.com/aquasecurity/defsec v0.36.0
github.com/hashicorp/go-version v1.4.0
github.com/inconshreveable/go-update v0.0.0-20160112193335-8152e7eb6ccf
github.com/liamg/clinch v1.5.6
Expand Down
6 changes: 4 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,10 @@ github.com/apparentlymart/go-textseg v1.0.0 h1:rRmlIsPEEhUTIKQb7T++Nz/A5Q6C9IuX2
github.com/apparentlymart/go-textseg v1.0.0/go.mod h1:z96Txxhf3xSFMPmb5X/1W05FF/Nj9VFpLOpjS5yuumk=
github.com/apparentlymart/go-textseg/v13 v13.0.0 h1:Y+KvPE1NYz0xl601PVImeQfFyEy6iT90AvPUL1NNfNw=
github.com/apparentlymart/go-textseg/v13 v13.0.0/go.mod h1:ZK2fH7c4NqDTLtiYLvIkEghdlcqw7yxLeM89kiTRPUo=
github.com/aquasecurity/defsec v0.35.0 h1:Fv/yTcmlesXQMytF4YThxZtUIxjG+Lqz/t0k+IUD+r0=
github.com/aquasecurity/defsec v0.35.0/go.mod h1:3CaD3jUYJlrdJtEbutxFDT4MXA9IBKAq6nfPvNDBJVk=
github.com/aquasecurity/defsec v0.35.1-0.20220407182017-9a4a74f3db8f h1:5yZqclqRdqR05Q81xYxcyM9foLg4t2DjJiZn3cItCOk=
github.com/aquasecurity/defsec v0.35.1-0.20220407182017-9a4a74f3db8f/go.mod h1:3CaD3jUYJlrdJtEbutxFDT4MXA9IBKAq6nfPvNDBJVk=
github.com/aquasecurity/defsec v0.36.0 h1:pynnPWTX1KUXZYNhkHyEIIjAZzXowH3Jfpdzh4AVBDg=
github.com/aquasecurity/defsec v0.36.0/go.mod h1:3CaD3jUYJlrdJtEbutxFDT4MXA9IBKAq6nfPvNDBJVk=
github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o=
github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8=
github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY=
Expand Down
7 changes: 5 additions & 2 deletions test/testdata/rego/policies/rego.rego
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
package custom.rego.rego.sauce

deny[msg] {
msg := "NO"
import data.lib.defsec

deny[res] {
count(input.aws.s3.buckets) > 0
res := defsec.result("NO BUCKETS", input.aws.s3.buckets[_])
}

0 comments on commit cbc4a37

Please sign in to comment.