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

add notification for new vulnerable dependency #217

Merged
merged 2 commits into from
Jul 4, 2023

Conversation

VithikaS
Copy link
Collaborator

@VithikaS VithikaS commented Jul 3, 2023

Description

Added Notification for New Vulnerable Dependency.
Removed the properties not being used anymore

Addressed Issue

Fixes issue #217

Additional Details

Checklist

  • I have read and understand the contributing guidelines
  • This PR fixes a defect, and I have provided tests to verify that the fix is effective
  • This PR implements an enhancement, and I have provided tests to verify that it works as intended
  • This PR introduces changes to the database model, and I have added corresponding update logic
  • This PR introduces new or alters existing behavior, and I have updated the documentation accordingly

Signed-off-by: vithikashukla <vithika.shukla@citi.com>
sahibamittal
sahibamittal previously approved these changes Jul 4, 2023
Copy link
Collaborator

@sahibamittal sahibamittal left a 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: vithikashukla <vithika.shukla@citi.com>
@VithikaS VithikaS merged commit 02ee9b4 into main Jul 4, 2023
6 checks passed
@VithikaS VithikaS deleted the issue-643-new-vulnerable-dependency-notification branch July 4, 2023 10:43
nscuro added a commit that referenced this pull request Jul 4, 2023
... via new transient field. Required for compatibility with #217

Signed-off-by: nscuro <nscuro@protonmail.com>
nscuro added a commit that referenced this pull request Jul 4, 2023
... via new transient field. Required for compatibility with #217

Signed-off-by: nscuro <nscuro@protonmail.com>
nscuro added a commit that referenced this pull request Jul 4, 2023
Signed-off-by: nscuro <nscuro@protonmail.com>
nscuro added a commit that referenced this pull request Jul 7, 2023
... via new transient field. Required for compatibility with #217

Signed-off-by: nscuro <nscuro@protonmail.com>
nscuro added a commit that referenced this pull request Jul 7, 2023
Signed-off-by: nscuro <nscuro@protonmail.com>
nscuro added a commit that referenced this pull request Jul 8, 2023
... via new transient field. Required for compatibility with #217

Signed-off-by: nscuro <nscuro@protonmail.com>
nscuro added a commit that referenced this pull request Jul 8, 2023
Signed-off-by: nscuro <nscuro@protonmail.com>
nscuro added a commit that referenced this pull request Jul 10, 2023
* Add bloated BOM for ingestion performance testing

Signed-off-by: nscuro <nscuro@protonmail.com>

* Prevent query compilation cache being bypassed for `matchSingleIdentity` queries

See DependencyTrack/dependency-track#2540

This also cleans the query from containing weird statements like `(cpe != null && cpe == null)` in case a component does not have a CPE.

Signed-off-by: nscuro <nscuro@protonmail.com>

* WIP: Improve BOM processing performance

Signed-off-by: nscuro <nscuro@protonmail.com>

* Handle dependency graph

Signed-off-by: nscuro <nscuro@protonmail.com>

* Improve dependency graph assembly

Instead of using individual bulk UPDATE queries, use setters on persistent components instead. This way we can again make use of batched flushing.

Signed-off-by: nscuro <nscuro@protonmail.com>

* Completely replace old processing logic

Also decompose large processing method into multiple smaller ones, and re-implement notifications.

Signed-off-by: nscuro <nscuro@protonmail.com>

* Fix not all BOM refs being updated with new component identities

Signed-off-by: nscuro <nscuro@protonmail.com>

* Be smarter about indexing component identities and BOM refs

Also add more documentation

Signed-off-by: nscuro <nscuro@protonmail.com>

* Reduce logging noise

Signed-off-by: nscuro <nscuro@protonmail.com>

* Mark new components as such

... via new transient field. Required for compatibility with #217

Signed-off-by: nscuro <nscuro@protonmail.com>

* Compatibility with #217

Signed-off-by: nscuro <nscuro@protonmail.com>

* Cleanup tests

Signed-off-by: nscuro <nscuro@protonmail.com>

* Reduce code duplication

Signed-off-by: nscuro <nscuro@protonmail.com>

* Cleanup; Process services

Signed-off-by: nscuro <nscuro@protonmail.com>

* Finishing touches 🪄

Signed-off-by: nscuro <nscuro@protonmail.com>

* Make flush threshold configurable

The optimal value could depend on how beefy the database server is, and how much memory is available to the API server.

Signed-off-by: nscuro <nscuro@protonmail.com>

* Clarify `warn` log when rolling back active transactions

Signed-off-by: nscuro <nscuro@protonmail.com>

* Log number of consumed components and services before and after de-dupe

Signed-off-by: nscuro <nscuro@protonmail.com>

* Extend BOM processing test with bloated BOM

Signed-off-by: nscuro <nscuro@protonmail.com>

* Make component identity matching strict

To address DependencyTrack/dependency-track#2519 (comment).

Also add regression test for this specific issue.

Signed-off-by: nscuro <nscuro@protonmail.com>

* Add regression test for DependencyTrack/dependency-track#1905

Signed-off-by: nscuro <nscuro@protonmail.com>

* Clarify why "reachability on commit" is disabled; Add assertion for persistent object state

Signed-off-by: nscuro <nscuro@protonmail.com>

* Add tests for `equals` and `hashCode` of `ComponentIdentity`

Signed-off-by: nscuro <nscuro@protonmail.com>

* Address review comments

Signed-off-by: nscuro <nscuro@protonmail.com>

---------

Signed-off-by: nscuro <nscuro@protonmail.com>
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 4, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants