DependencyTrack / DependencyTrack/dependency-track

Provide logging on importing SBOMs

Open
#5,049 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Java
Stars
4.2k
Forks
811
Avg merge
9h 4m
Merged PRs (30d)
229

Description

### Current Behavior

At the moment we are finding an increasing number of SBOMs not importing into DT and have no idea why as there is no logging as to the issue.

The first was when SMAIL-GPL (Valid SPDX License ID) was defined and DT rejected it as not on the list of valid IDs (Believe fixed in DT, but waiting on the release)

The next two are related to expressions

The first was where the expression ended in an AND e.g. ABC and DEF and

This correctly failed the validation but it took ourselves and Niklas a number of hours to understand where the error was.

The lates is this:

Our SBOM tool created an invalid license in that it was defined as an expression and not as it should have been as a name.

```
{
"expression": "Apache-2.0 WITH LLVM-exception"
},
```

```
"licenses": [
{
"expression": "Apache-2.0 WITH LLVM-exception"
}
],
```

This correctly did not import into DT as it is not a valid expression.

It took us several hours for us to identify the error.

The problem is the logs show none of this. If the logs give us information as to why things are failing it will take minutes to ID and not hours.

### Proposed Behavior

When an SBOM imports, add log entries as to what and where it is being imported and if successful or any errors relating to what has failed.

### Checklist

- [x] I have read and understand the [contributing guidelines](https://github.com/DependencyTrack/dependency-track/blob/master/CONTRIBUTING.md#filing-issues)
- [x] I have checked the [existing issues](https://github.com/DependencyTrack/dependency-track/issues) for whether this enhancement was already requested

Contributor guide

Open the contributing guide

Research direction

Start with CONTRIBUTING.md and the SBOM license examples in the issue, then locate the import and validation entry points; no implementation files or tests are named. Trace where validation failures reach logging and confirm the expected diagnostics with maintainers. Done means logs identify what and where an SBOM is imported, whether it succeeds, and why it fails.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend, observability
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
44/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.