-
-
Notifications
You must be signed in to change notification settings - Fork 14
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
Dynamic loading of fields for policy evaluation #465
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
nscuro
force-pushed
the
cel-dynamic-field-loading
branch
2 times, most recently
from
December 6, 2023 22:46
a67dc8a
to
a7692b5
Compare
Signed-off-by: nscuro <nscuro@protonmail.com>
Signed-off-by: nscuro <nscuro@protonmail.com>
Signed-off-by: nscuro <nscuro@protonmail.com>
Signed-off-by: nscuro <nscuro@protonmail.com>
nscuro
force-pushed
the
cel-dynamic-field-loading
branch
from
December 7, 2023 15:18
632d520
to
15c3ffb
Compare
Signed-off-by: nscuro <nscuro@protonmail.com>
nscuro
force-pushed
the
cel-dynamic-field-loading
branch
from
December 7, 2023 23:52
ce58d83
to
fe55d1e
Compare
Signed-off-by: nscuro <nscuro@protonmail.com>
Signed-off-by: nscuro <nscuro@protonmail.com>
nscuro
changed the title
WIP: Dynamic loading of fields for policy evaluation
Dynamic loading of fields for policy evaluation
Dec 10, 2023
2 tasks
Signed-off-by: nscuro <nscuro@protonmail.com>
mehab
reviewed
Dec 11, 2023
src/main/java/org/dependencytrack/policy/cel/definition/CelPolicyTypes.java
Show resolved
Hide resolved
Signed-off-by: nscuro <nscuro@protonmail.com>
mehab
previously approved these changes
Dec 12, 2023
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.
lgtm
Signed-off-by: meha <meha.bhargava2@gmail.com>
mehab
approved these changes
Dec 12, 2023
nscuro
added a commit
that referenced
this pull request
Dec 13, 2023
The query template (https://jdbi.org/#query-templating) engine was changed from the default (which uses `<>` for interpolation) to Freemarker (which uses `${}`) in #465. The `is_dependency_of` query uses templating for dynamic filter conditions. Signed-off-by: nscuro <nscuro@protonmail.com>
2 tasks
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Uses JDBI to load fields required for policy evaluation that are not already present in the evaluation context.
Warning
component.resolved_license
andcomponent.resolved_license.groups
is not fetched currently. It will be added in a later PR. The assumption for now is that those fields are less relevant for vulnerability analysis decisions.Decoupled from #459
Addressed Issue
Partly addresses DependencyTrack/hyades#940
Additional Details
N/A
Checklist
This PR fixes a defect, and I have provided tests to verify that the fix is effectiveThis PR introduces changes to the database model, and I have added corresponding update logicThis PR introduces new or alters existing behavior, and I have updated the documentation accordingly