Skip to content

Resolve merge conflicts in collection projects PR#1

Merged
rkg-mm merged 182 commits intorkg-mm:2041-introduce-collection-projectsfrom
nscuro:issue-2041-resolve-merge-conflicts
Dec 7, 2024
Merged

Resolve merge conflicts in collection projects PR#1
rkg-mm merged 182 commits intorkg-mm:2041-introduce-collection-projectsfrom
nscuro:issue-2041-resolve-merge-conflicts

Conversation

@nscuro
Copy link
Copy Markdown

@nscuro nscuro commented Dec 7, 2024

Description

Resolves merge conflicts in collection projects PR.

Addressed Issue

Relates to DependencyTrack#2041

Additional Details

N/A

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

nscuro and others added 30 commits October 4, 2024 16:16
Introduces project-level locking for BOM upload processing, policy evaluation, and vulnerability analysis. This prevents duplicate records from being created during any of the mentioned activities. The locking happens in-memory.

Refactors policy violation reconciliation to be more deterministic and able to remove duplicates.

In a later release, a `UNIQUE` constraint should be added to the `POLICYVIOLATION` table to prevent duplicate records on the database-level (already done in Hyades).

Fixes DependencyTrack#4215

Signed-off-by: nscuro <[email protected]>
…ext` pooling

For BOM upload processing, we customize the `PersistenceManager` for better performance: https://github.com/DependencyTrack/dependency-track/blob/6f7c49c0f2f163895b95e5b80554a49a3ec500f8/src/main/java/org/dependencytrack/tasks/BomUploadProcessingTask.java#L231-L259

It turns out that the custom options are internally delegated to a DataNucleus `ExecutionContext`. Other than `PersistenceManager`s, `ExecutionContext`s are never really closed, but instead reused (https://github.com/datanucleus/datanucleus-core/blob/master/src/main/java/org/datanucleus/ExecutionContextPool.java). Per default, DN pools up to 20 ECs.

The issue with this behavior is that customizing a PM in code location A, can unintentionally impact code location B. An example of this is project cloning, where an EC can get picked that has `FlushMode=MANUAL`, whereas the cloning logic assumes the default `FlushMode=AUTO` (DependencyTrack#4220).

Disable EC pooling to prevent such unintended behavior changes.

Fixes DependencyTrack#4220

Signed-off-by: nscuro <[email protected]>
Signed-off-by: Thomas Schauer-Köckeis <[email protected]>
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 6.8.0 to 6.9.0.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](docker/build-push-action@32945a3...4f58ea7)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 3.6.1 to 3.7.1.
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](docker/setup-buildx-action@988b5a0...c47758b)

---
updated-dependencies:
- dependency-name: docker/setup-buildx-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Bumps [com.icegreen:greenmail-junit4](https://github.com/greenmail-mail-test/greenmail) from 2.0.1 to 2.1.0.
- [Release notes](https://github.com/greenmail-mail-test/greenmail/releases)
- [Commits](greenmail-mail-test/greenmail@release-2.0.1...release-2.1.0)

---
updated-dependencies:
- dependency-name: com.icegreen:greenmail-junit4
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
…ot/maven/com.icegreen-greenmail-junit4-2.1.0

Bump com.icegreen:greenmail-junit4 from 2.0.1 to 2.1.0
…ot/github_actions/github/codeql-action-3.26.11

Bump github/codeql-action from 3.26.9 to 3.26.11
…ot/github_actions/docker/build-push-action-6.9.0

Bump docker/build-push-action from 6.8.0 to 6.9.0
…ot/github_actions/docker/setup-buildx-action-3.7.1

Bump docker/setup-buildx-action from 3.6.1 to 3.7.1
Log contains now username when user gets deleted
Fix unintended manual flushing mode due to DataNucleus `ExecutionContext` pooling
Instead of just discarding *any* duplicate, compare them first, and only keep the most "useful" one.

DependencyTrack#4215 (comment)
Signed-off-by: nscuro <[email protected]>
Enhance policy violation de-duplication logic
It turns out that `Component#version` differs from the PURL's version, in that it contains the epoch (e.g. `1:`). Trivy does not expect the epoch as part of the version field, since it has its own dedicated field.

For example:

```json
{
  "type": "library",
  "name": "dbus-common",
  "version": "1:1.12.20-8.el9",
  "purl": "pkg:rpm/redhat/[email protected]?arch=noarch&distro=redhat-9.4&epoch=1"
},
```

Signed-off-by: nscuro <[email protected]>
Signed-off-by: nscuro <[email protected]>

# Conflicts:
#	src/main/java/org/dependencytrack/tasks/scanners/TrivyAnalysisTask.java
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4.4.0 to 4.4.3.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](actions/upload-artifact@5076954...b4b15b8)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Bumps [aquasecurity/trivy-action](https://github.com/aquasecurity/trivy-action) from 0.24.0 to 0.27.0.
- [Release notes](https://github.com/aquasecurity/trivy-action/releases)
- [Commits](aquasecurity/trivy-action@6e7b7d1...5681af8)

---
updated-dependencies:
- dependency-name: aquasecurity/trivy-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
…ot/github_actions/github/codeql-action-3.26.12

Bump github/codeql-action from 3.26.11 to 3.26.12
…ot/github_actions/aquasecurity/trivy-action-0.27.0

Bump aquasecurity/trivy-action from 0.24.0 to 0.27.0
…ot/github_actions/actions/checkout-4.2.1

Bump actions/checkout from 4.2.0 to 4.2.1
…ot/github_actions/actions/upload-artifact-4.4.3

Bump actions/upload-artifact from 4.4.0 to 4.4.3
dependabot bot and others added 27 commits November 28, 2024 08:57
Bumps `lib.protobuf-java.version` from 4.28.3 to 4.29.0.

Updates `com.google.protobuf:protobuf-java` from 4.28.3 to 4.29.0
- [Release notes](https://github.com/protocolbuffers/protobuf/releases)
- [Changelog](https://github.com/protocolbuffers/protobuf/blob/main/protobuf_release.bzl)
- [Commits](https://github.com/protocolbuffers/protobuf/commits)

Updates `com.google.protobuf:protobuf-java-util` from 4.28.3 to 4.29.0

---
updated-dependencies:
- dependency-name: com.google.protobuf:protobuf-java
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: com.google.protobuf:protobuf-java-util
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
…ot/maven/lib.protobuf-java.version-4.29.0
Signed-off-by: Edouard Shaar <[email protected]>
Bumps [io.github.jeremylong:open-vulnerability-clients](https://github.com/jeremylong/vuln-tools) from 7.0.1 to 7.0.2.
- [Release notes](https://github.com/jeremylong/vuln-tools/releases)
- [Commits](jeremylong/open-vulnerability-cli@v7.0.1...v7.0.2)

---
updated-dependencies:
- dependency-name: io.github.jeremylong:open-vulnerability-clients
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Bumps [net.javacrumbs.json-unit:json-unit-assertj](https://github.com/lukas-krecan/JsonUnit) from 4.0.0 to 4.1.0.
- [Changelog](https://github.com/lukas-krecan/JsonUnit/blob/master/RELEASES.md)
- [Commits](lukas-krecan/JsonUnit@json-unit-parent-4.0.0...json-unit-parent-4.1.0)

---
updated-dependencies:
- dependency-name: net.javacrumbs.json-unit:json-unit-assertj
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Bumps [com.icegreen:greenmail-junit4](https://github.com/greenmail-mail-test/greenmail) from 2.1.1 to 2.1.2.
- [Release notes](https://github.com/greenmail-mail-test/greenmail/releases)
- [Commits](greenmail-mail-test/greenmail@release-2.1.1...release-2.1.2)

---
updated-dependencies:
- dependency-name: com.icegreen:greenmail-junit4
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 6.9.0 to 6.10.0.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](docker/build-push-action@4f58ea7...48aba3b)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Bumps debian from `32f6d6f` to `4d63ef5`.

---
updated-dependencies:
- dependency-name: debian
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
…ot/docker/src/main/docker/debian-4d63ef5
Signed-off-by: nscuro <[email protected]>
…ot/maven/com.icegreen-greenmail-junit4-2.1.2
…ot/github_actions/docker/build-push-action-6.10.0
…ot/maven/io.github.jeremylong-open-vulnerability-clients-7.0.2
…ot/maven/software.amazon.jdbc-aws-advanced-jdbc-wrapper-2.5.3
…ot/maven/net.javacrumbs.json-unit-json-unit-assertj-4.1.0
@nscuro
Copy link
Copy Markdown
Author

nscuro commented Dec 7, 2024

Relevant commit is 380107d (#1). Resolves merge conflicts in the following files:
image

@rkg-mm rkg-mm merged commit f9769d5 into rkg-mm:2041-introduce-collection-projects Dec 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.