DependencyTrack / DependencyTrack/dependency-track
Add CEL function to check if component is a direct dependency of project root
- Dominant language
- Java
- Stars
- 4.2k
- Forks
- 811
- Avg merge
- 8h 39m
- Merged PRs (30d)
- 237
Description
## Current Behavior
There is CEL support for component-to-component direct edge checks using component.is_direct_dependency_of(v1.Component{...}), but there is no CEL function to directly determine whether the currently evaluated component is a direct dependency of the project root.
## Proposed Behavior
Expose a CEL helper for project-root direct dependency checks, for example:
- component.is_project_direct_dependency()
or
- project.has_direct_dependency(component)
## Why
This enables policy authors to target first-level dependencies only, without requiring explicit parent component matching or brittle workarounds.
## Notes
- Existing helper project.depends_on(...) is not a direct-edge-only check.
- Existing helper component.is_direct_dependency_of(...) works when a specific parent component is known.
Contributor guide
Assessment
This issue has not been assessed yet.