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

ci: enable strict mode by default in opa check #319

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

nikpivkin
Copy link
Contributor

@nikpivkin nikpivkin commented Jan 16, 2025

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.

@nikpivkin nikpivkin marked this pull request as ready for review January 16, 2025 12:53
@nikpivkin nikpivkin requested a review from simar7 as a code owner January 16, 2025 12:53
@@ -24,6 +24,13 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4

- uses: actions/setup-go@v5
Copy link
Contributor Author

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.

Comment on lines -64 to +63
"Egress" in input.spec.policyType
"Egress" in spec.policyType
Copy link
Member

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?

Copy link
Contributor Author

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.

Comment on lines +46 to +48
roleBindingKinds := {"RoleBinding", "ClusterRolebinding"}

is_role_binding_kind if kind in roleBindingKinds
Copy link
Member

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants