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

Adds Severity Field for Licenses Violations for Pull Request Scans #672

Merged
merged 3 commits into from
Apr 9, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Added modifications for tests
  • Loading branch information
imranzunzani committed Mar 31, 2024
commit 9f2b8d7282a568c45b6d9416eb5b23411b38b27b
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
## ⚖️ Violated Licenses

---
| LICENSE | DIRECT DEPENDENCIES | IMPACTED DEPENDENCY |
| :---------------------: | :-----------------------------------: | :-----------------------------------: |
| License1 | Comp1 1.0 | Dep1 2.0 |
| License2 | root 1.0.0, minimatch 1.2.3 | Dep2 3.0 |
| SEVERITY | LICENSE | DIRECT DEPENDENCIES | IMPACTED DEPENDENCY |
| :---------------------: | :-----------------------------------: | :-----------------------------------: | :-----------------------------------: |
| High | License1 | Comp1 1.0 | Dep1 2.0 |
| High | License2 | root 1.0.0, minimatch 1.2.3 | Dep2 3.0 |
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
## ⚖️ Violated Licenses
<div align='center'>

| LICENSE | DIRECT DEPENDENCIES | IMPACTED DEPENDENCY |
| :---------------------: | :-----------------------------------: | :-----------------------------------: |
| License1 | Comp1 1.0 | Dep1 2.0 |
| License2 | root 1.0.0<br>minimatch 1.2.3 | Dep2 3.0 |
| SEVERITY | LICENSE | DIRECT DEPENDENCIES | IMPACTED DEPENDENCY |
| :---------------------: | :-----------------------------------: | :-----------------------------------: | :-----------------------------------: |
| High | License1 | Comp1 1.0 | Dep1 2.0 |
| High | License2 | root 1.0.0<br>minimatch 1.2.3 | Dep2 3.0 |

</div>
7 changes: 7 additions & 0 deletions utils/outputwriter/outputcontent_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -435,9 +435,13 @@ func TestLicensesContent(t *testing.T) {
{
LicenseKey: "License1",
ImpactedDependencyDetails: formats.ImpactedDependencyDetails{

Components: []formats.ComponentRow{{Name: "Comp1", Version: "1.0"}},
ImpactedDependencyName: "Dep1",
ImpactedDependencyVersion: "2.0",
SeverityDetails: formats.SeverityDetails{
Severity: "High",
},
},
},
{
Expand All @@ -455,6 +459,9 @@ func TestLicensesContent(t *testing.T) {
},
ImpactedDependencyName: "Dep2",
ImpactedDependencyVersion: "3.0",
SeverityDetails: formats.SeverityDetails{
Severity: "High",
},
},
},
},
Expand Down