DependencyTrack / DependencyTrack/dependency-track

It is possible to post analysis with only justification

Open
#5,015 0 comments 0 reactions 0 assignees View on GitHub
defect in triage
Dominant language
Java
Stars
4.2k
Forks
811
Avg merge
8h 39m
Merged PRs (30d)
237

Description

### Current Behavior

You can set only justification without any status.

If you export the VEX it will look like this:
```
"analysis" : {
"justification" : "code_not_reachable"
},
```

I'm not sure if it's valid per VEX spec, but it doesn't look useful for any real use case to set only justification,

### Steps to Reproduce

1.Send this json to /analysis
```
{
"project": "989807a4-bcdd-4cd8-82c7-3f3273c5385b",
"component": "1d966e47-721b-4660-b133-eb210072e321",
"vulnerability": "df8fb7b9-0a61-4f91-bcdc-f218de96e408",
"analysisState": "NOT_SET",
"analysisJustification": "CODE_NOT_REACHABLE",
"analysisResponse": "NOT_SET",
"analysisDetails": null,
"comment": null,
"isSuppressed": false
}
```

### Expected Behavior

You cannot set justification without status.
Unsetting the status unsets the justification.

### Dependency-Track Version

4.13.1

### Dependency-Track Distribution

Container Image

### Database Server

PostgreSQL

### Database Server Version

_No response_

### Browser

Google Chrome

### 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 defect was already reported

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.