Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(rego): Fix code highlighting for rego detections #1668

Merged
merged 2 commits into from
Apr 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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[_])
}