Skip to content

Add isDirect flag in COMPONENT for efficient direct/transitive dependency filtering #6183

@sahibamittal

Description

@sahibamittal

Current Behavior

Currently, at large scale, determining whether a component is direct or transitive dependency requires evaluating JSONB containment check against project.direct_dependencies. It becomes expensive for cross-project reporting and bulk analytics.

Proposed Behavior

Add IS_DIRECT to COMPONENT. This will require setting it during BOM import, can be a bulk-update for all components in a project.

All read paths can be updated by replacing JSONB containment checks with boolean filter.

New field will be nullable to avoid heavy migration for existing components and can be populated upon next bom upload/publish.

Optional: Expose the same in UI.

Checklist

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requestp2Non-critical bugs, and features that help organizations to identify and reduce risksize/SSmall effort
No fields configured for Enhancement.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions