-
Notifications
You must be signed in to change notification settings - Fork 31
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
ci: enable strict mode by default in opa check #319
base: main
Are you sure you want to change the base?
Conversation
0d39c73
to
86696cc
Compare
@@ -24,6 +24,13 @@ jobs: | |||
- name: Checkout code | |||
uses: actions/checkout@v4 | |||
|
|||
- uses: actions/setup-go@v5 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
regal recommends running opa check
before linting.
"Egress" in input.spec.policyType | ||
"Egress" in spec.policyType |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this a bug that was fixed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just used the spec
argument which is equal to input.spec
.
roleBindingKinds := {"RoleBinding", "ClusterRolebinding"} | ||
|
||
is_role_binding_kind if kind in roleBindingKinds |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was this moved from elsewhere?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it was in a few places and I thought it might be reused:
- https://github.com/aquasecurity/trivy-checks/blob/main/checks/kubernetes/general/masters_group_bind.rego#L31
- https://github.com/aquasecurity/trivy-checks/blob/main/checks/kubernetes/gke/authenticate_group_bind.rego#L31
- https://github.com/aquasecurity/trivy-checks/blob/main/checks/kubernetes/general/anonymous_user_bind.rego#L30
Signed-off-by: Nikita Pivkin <[email protected]>
Signed-off-by: Nikita Pivkin <[email protected]>
Signed-off-by: Nikita Pivkin <[email protected]>
Signed-off-by: Nikita Pivkin <[email protected]>
Signed-off-by: Nikita Pivkin <[email protected]>
86696cc
to
18d910a
Compare
In OPA 1.0, some strict mode checks will be enabled by default. See https://www.openpolicyagent.org/docs/latest/v0-upgrade/ and open-policy-agent/opa#6271 . This PR includes a strict mode now.