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

refactor: migrate REGO functions to Go #1527

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nikpivkin
Copy link
Collaborator

@nikpivkin nikpivkin commented Jan 22, 2024

The rules declared in trivy-policy should not depend on this repository, so the functions result.new and isManaged should be moved.
Due to REGO language limitations, the result.new function cannot be fully implemented in REGO. Therefore, the basic logic of this function will be ported from REGO to Go code, providing the necessary functionality.

Now result.new returns the following structure and does not modify the data in any way:

{
  "msg": "message",
  "metadata": {...}
}

Backward compatibility with the previous flat structure returned by the result.new function has been preserved.

Related PRs:

Copy link

This PR is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 10 days.

@github-actions github-actions bot added the stale Stale issues will be closed within 7 days of this label being assigned label Feb 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale Stale issues will be closed within 7 days of this label being assigned
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant