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(misconf): register builtin Rego funcs from trivy-checks #6616

Merged
merged 3 commits into from
May 14, 2024

Conversation

nikpivkin
Copy link
Contributor

Description

Related issues

Related PRs

Checklist

  • I've read the guidelines for contributing to this repository.
  • I've followed the conventions in the PR title.
  • I've added tests that prove my fix is effective or that my feature works.
  • I've updated the documentation with the relevant information (if needed).
  • I've added usage information (if the PR introduces new options)
  • I've included a "before" and "after" example to the description (if the PR is a user interface change).

@nikpivkin
Copy link
Contributor Author

nikpivkin commented May 3, 2024

@simar7 I have my doubts about the choice of repository to host the additional Rego funcs. On the one hand they are only related to checks, so it makes sense to put them there, but on the other hand we already register some Rego functions in trivy. Now I'm leaning towards the second option, because with the first option we will have to move these functions sooner or later when we migrate checks from Go to Rego.

@simar7
Copy link
Member

simar7 commented May 4, 2024

@simar7 I have my doubts about the choice of repository to host the additional Rego funcs. On the one hand they are only related to checks, so it makes sense to put them there, but on the other hand we already register some Rego functions in trivy. Now I'm leaning towards the second option, because with the first option we will have to move these functions sooner or later when we migrate checks from Go to Rego.

Personally I see the rego functions as a library for the rego checks so to me keeping them with the checks repo makes more sense TBH. We could reconsider this in the future when the transition of Go checks to Rego actually takes place.

On that note, we could make the custom functions into a library and have them all be imported into Trivy from the trivy-checks repo. What do you think about that?

@nikpivkin
Copy link
Contributor Author

@simar7 I agree. I think we can move custom functions from trivy to trivy-checks.

@nikpivkin nikpivkin marked this pull request as ready for review May 14, 2024 08:05
@nikpivkin nikpivkin requested review from simar7 and knqyf263 as code owners May 14, 2024 08:05
@simar7 simar7 added this pull request to the merge queue May 14, 2024
Merged via the queue into aquasecurity:main with commit 7c22ee3 May 14, 2024
12 checks passed
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.

fix(misconf): split docker commands by semicolon
2 participants