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

feat(queries): implementation of regal for linting rego files #7342

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

Conversation

ArturRibeiro-CX
Copy link
Contributor

@ArturRibeiro-CX ArturRibeiro-CX commented Feb 23, 2025

Integrate Regal Linter for Rego Files in KICS

This PR introduces the Regal linter to enforce best practices, maintainability, and consistency in Rego files within KICS.
Since Rego is extensively used for queries, adding this linter helps ensure high-quality and standardized code.

Reason for Proposed Changes

  • Improve code quality, maintainability, and consistency by adding a structured linter;
  • Ensure best practices in Rego queries while allowing future refinements via configuration.

Proposed Changes

  • Add Regal Linter (v1.0.0) as part of the CI pipeline;
  • Include a configuration file (assets/.regal/config.yml) to define linter rules;
  • Run the linter on Rego files in the assets/ directory during PRs.

Note: This PR only integrates the linter, separate PRs will address individual linting issues.

Continuation of #7295

References

I submit this contribution under the Apache-2.0 license.

@ArturRibeiro-CX ArturRibeiro-CX added feature request Community: new feature request query New query feature CI PR related with GitHub Actions CI process community Community contribution github_actions Pull requests that update Github_actions code labels Feb 23, 2025
@ArturRibeiro-CX ArturRibeiro-CX self-assigned this Feb 23, 2025
@github-actions github-actions bot added the feature New feature label Feb 23, 2025
Copy link
Contributor

kics-logo

KICS version: v2.1.4

Category Results
CRITICAL CRITICAL 0
HIGH HIGH 0
MEDIUM MEDIUM 0
LOW LOW 0
INFO INFO 0
TRACE TRACE 0
TOTAL TOTAL 0
Metric Values
Files scanned placeholder 1
Files parsed placeholder 1
Files failed to scan placeholder 0
Total executed queries placeholder 47
Queries failed to execute placeholder 0
Execution time placeholder 0

@ArturRibeiro-CX ArturRibeiro-CX marked this pull request as ready for review February 23, 2025 22:44
@ArturRibeiro-CX ArturRibeiro-CX requested a review from a team as a code owner February 23, 2025 22:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI PR related with GitHub Actions CI process community Community contribution feature request Community: new feature request feature New feature github_actions Pull requests that update Github_actions code query New query feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant