Skip to content

Commit 93a730b

Browse files
authored
V3 - Support No issues - severity (#1290)
1 parent ba74aef commit 93a730b

6 files changed

Lines changed: 27 additions & 12 deletions

File tree

go.mod

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ require (
1010
github.com/jfrog/build-info-go v1.13.1-0.20260331040230-c3b53d1a24ac
1111
github.com/jfrog/froggit-go v1.21.1
1212
github.com/jfrog/gofrog v1.7.6
13-
github.com/jfrog/jfrog-cli-core/v2 v2.60.1-0.20260420010255-65b7a8d432af
14-
github.com/jfrog/jfrog-cli-security v1.27.1
15-
github.com/jfrog/jfrog-client-go v1.55.1-0.20260416101832-c47c1246283b
13+
github.com/jfrog/jfrog-cli-core/v2 v2.60.1-0.20260427010241-873f53d940b3
14+
github.com/jfrog/jfrog-cli-security v1.28.0
15+
github.com/jfrog/jfrog-client-go v1.55.1-0.20260428070955-750b933dc5c7
1616
github.com/owenrumney/go-sarif/v3 v3.2.3
1717
github.com/stretchr/testify v1.11.1
1818
github.com/tidwall/gjson v1.18.0
@@ -63,7 +63,7 @@ require (
6363
github.com/jedib0t/go-pretty/v6 v6.7.8 // indirect
6464
github.com/jfrog/archiver/v3 v3.6.3 // indirect
6565
github.com/jfrog/jfrog-apps-config v1.0.1 // indirect
66-
github.com/jfrog/jfrog-cli-artifactory v0.8.1-0.20260416104146-471c3f71ce61 // indirect
66+
github.com/jfrog/jfrog-cli-artifactory v0.8.1-0.20260423195010-d7aa2c437305 // indirect
6767
github.com/kevinburke/ssh_config v1.6.0 // indirect
6868
github.com/klauspost/compress v1.18.5 // indirect
6969
github.com/klauspost/cpuid/v2 v2.3.0 // indirect

go.sum

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -146,14 +146,14 @@ github.com/jfrog/gofrog v1.7.6 h1:QmfAiRzVyaI7JYGsB7cxfAJePAZTzFz0gRWZSE27c6s=
146146
github.com/jfrog/gofrog v1.7.6/go.mod h1:ntr1txqNOZtHplmaNd7rS4f8jpA5Apx8em70oYEe7+4=
147147
github.com/jfrog/jfrog-apps-config v1.0.1 h1:mtv6k7g8A8BVhlHGlSveapqf4mJfonwvXYLipdsOFMY=
148148
github.com/jfrog/jfrog-apps-config v1.0.1/go.mod h1:8AIIr1oY9JuH5dylz2S6f8Ym2MaadPLR6noCBO4C22w=
149-
github.com/jfrog/jfrog-cli-artifactory v0.8.1-0.20260416104146-471c3f71ce61 h1:cES0xZ9ABOY/f3nq+3ETiVPgzjs7tEpHFzstc8h3W2U=
150-
github.com/jfrog/jfrog-cli-artifactory v0.8.1-0.20260416104146-471c3f71ce61/go.mod h1:6QJFQvde/CLnFeIIFOvm/6QuQr8OT1QWiTJAkQ+1Mnc=
151-
github.com/jfrog/jfrog-cli-core/v2 v2.60.1-0.20260420010255-65b7a8d432af h1:TGYTFW5egYMD1MhLtuLbYwB2vn+KRlVZLk+9uLVjKyM=
152-
github.com/jfrog/jfrog-cli-core/v2 v2.60.1-0.20260420010255-65b7a8d432af/go.mod h1:qpD7einonjqskDTEyqeG3NzAbZO6se0s0Pet0ObBQ3I=
153-
github.com/jfrog/jfrog-cli-security v1.27.1 h1:cQyzqdcEyu5qhEce5dBpDtVke1mSuSNZ07rubSTmo34=
154-
github.com/jfrog/jfrog-cli-security v1.27.1/go.mod h1:z4JWnjJo28H3MVHXNrTFp5fNwYds9vl9f9dyuELJsUc=
155-
github.com/jfrog/jfrog-client-go v1.55.1-0.20260416101832-c47c1246283b h1:45UJJVG/jAA7/q2c/I6wOvKx8wu7EqTD2tEUtktgyug=
156-
github.com/jfrog/jfrog-client-go v1.55.1-0.20260416101832-c47c1246283b/go.mod h1:sCE06+GngPoyrGO0c+vmhgMoVSP83UMNiZnIuNPzU8U=
149+
github.com/jfrog/jfrog-cli-artifactory v0.8.1-0.20260423195010-d7aa2c437305 h1:wSoVNwbZ2Scm/q2MEfcf+vCUuq41wejk3+rlgnF56jE=
150+
github.com/jfrog/jfrog-cli-artifactory v0.8.1-0.20260423195010-d7aa2c437305/go.mod h1:6QJFQvde/CLnFeIIFOvm/6QuQr8OT1QWiTJAkQ+1Mnc=
151+
github.com/jfrog/jfrog-cli-core/v2 v2.60.1-0.20260427010241-873f53d940b3 h1:LdLQQmhOMUfU+3x7wbtB7kY/Dd2LXKHz7CCUpHWn7uM=
152+
github.com/jfrog/jfrog-cli-core/v2 v2.60.1-0.20260427010241-873f53d940b3/go.mod h1:qpD7einonjqskDTEyqeG3NzAbZO6se0s0Pet0ObBQ3I=
153+
github.com/jfrog/jfrog-cli-security v1.28.0 h1:A/xxwbnjCfQOGT8LqtjYsPXmGg2kpcjlABw2DMFgId8=
154+
github.com/jfrog/jfrog-cli-security v1.28.0/go.mod h1:+eO5IgCkfiz0/8fCf6UwBg1KWXoDbOQ/E2V8DR9Ziq8=
155+
github.com/jfrog/jfrog-client-go v1.55.1-0.20260428070955-750b933dc5c7 h1:MvHnFczVntYB/USj7/RRANvdWbTUcwEvXcIGr7lOyTc=
156+
github.com/jfrog/jfrog-client-go v1.55.1-0.20260428070955-750b933dc5c7/go.mod h1:sCE06+GngPoyrGO0c+vmhgMoVSP83UMNiZnIuNPzU8U=
157157
github.com/jhump/protoreflect v1.15.1 h1:HUMERORf3I3ZdX05WaQ6MIpd/NJ434hTp5YiKgfCL6c=
158158
github.com/jhump/protoreflect v1.15.1/go.mod h1:jD/2GMKKE6OqX8qTjhADU1e6DShO+gavG9e0Q693nKo=
159159
github.com/kevinburke/ssh_config v1.6.0 h1:J1FBfmuVosPHf5GRdltRLhPJtJpTlMdKTBjRgTaQBFY=

resources/v2/noIssues.png

435 Bytes
Loading

resources/v2/smallNoIssues.svg

Lines changed: 4 additions & 0 deletions
Loading

utils/outputwriter/icons.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,14 @@ const (
2727
notApplicableLowSeveritySource ImageSource = "v2/notApplicableLow.png"
2828
unknownSeveritySource ImageSource = "v2/applicableUnknownSeverity.png"
2929
notApplicableUnknownSeveritySource ImageSource = "v2/notApplicableUnknown.png"
30+
noIssuesSource ImageSource = "v2/noIssues.png"
3031

3132
smallCriticalSeveritySource ImageSource = "v2/smallCritical.svg"
3233
smallHighSeveritySource ImageSource = "v2/smallHigh.svg"
3334
smallMediumSeveritySource ImageSource = "v2/smallMedium.svg"
3435
smallLowSeveritySource ImageSource = "v2/smallLow.svg"
3536
smallUnknownSeveritySource ImageSource = "v2/smallUnknown.svg"
37+
smallNoIssuesSource ImageSource = "v2/smallNoIssues.svg"
3638
)
3739

3840
func getSeverityTag(iconName IconName, applicability string) string {
@@ -56,6 +58,8 @@ func getNotApplicableIconTags(iconName IconName) string {
5658
return GetIconTag(notApplicableMediumSeveritySource, "medium (not applicable)") + "<br>"
5759
case "low":
5860
return GetIconTag(notApplicableLowSeveritySource, "low (not applicable)") + "<br>"
61+
case "scanned - no issues":
62+
return GetIconTag(noIssuesSource, "scanned - no issues found") + "<br>"
5963
}
6064
return GetIconTag(notApplicableUnknownSeveritySource, "unknown (not applicable)") + "<br>"
6165
}
@@ -70,6 +74,8 @@ func getApplicableIconTags(iconName IconName) string {
7074
return GetIconTag(mediumSeveritySource, "medium") + "<br>"
7175
case "low":
7276
return GetIconTag(lowSeveritySource, "low") + "<br>"
77+
case "scanned - no issues":
78+
return GetIconTag(noIssuesSource, "scanned - no issues found") + "<br>"
7379
}
7480
return GetIconTag(unknownSeveritySource, "unknown") + "<br>"
7581
}
@@ -84,6 +90,8 @@ func getSmallApplicableIconTags(iconName IconName) string {
8490
return GetImgTag(smallMediumSeveritySource, "")
8591
case "low":
8692
return GetImgTag(smallLowSeveritySource, "")
93+
case "scanned - no issues":
94+
return GetImgTag(smallNoIssuesSource, "")
8795
}
8896
return GetImgTag(smallUnknownSeveritySource, "")
8997
}

utils/outputwriter/icons_test.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ func TestGetSmallSeverityTag(t *testing.T) {
1212
assert.Equal(t, "<img src=\"https://raw.githubusercontent.com/jfrog/frogbot/master/resources/v2/smallMedium.svg\" alt=\"\"/>", getSmallSeverityTag("meDium"))
1313
assert.Equal(t, "<img src=\"https://raw.githubusercontent.com/jfrog/frogbot/master/resources/v2/smallLow.svg\" alt=\"\"/>", getSmallSeverityTag("low"))
1414
assert.Equal(t, "<img src=\"https://raw.githubusercontent.com/jfrog/frogbot/master/resources/v2/smallUnknown.svg\" alt=\"\"/>", getSmallSeverityTag("none"))
15+
assert.Equal(t, "<img src=\"https://raw.githubusercontent.com/jfrog/frogbot/master/resources/v2/smallNoIssues.svg\" alt=\"\"/>", getSmallSeverityTag("scanned - no issues"))
1516
}
1617

1718
func TestGetSeverityTag(t *testing.T) {
@@ -20,6 +21,7 @@ func TestGetSeverityTag(t *testing.T) {
2021
assert.Equal(t, "![medium](https://raw.githubusercontent.com/jfrog/frogbot/master/resources/v2/applicableMediumSeverity.png)<br>", getSeverityTag("meDium", "Undetermined"))
2122
assert.Equal(t, "![low](https://raw.githubusercontent.com/jfrog/frogbot/master/resources/v2/applicableLowSeverity.png)<br>", getSeverityTag("low", "Applicable"))
2223
assert.Equal(t, "![unknown](https://raw.githubusercontent.com/jfrog/frogbot/master/resources/v2/applicableUnknownSeverity.png)<br>", getSeverityTag("none", "Applicable"))
24+
assert.Equal(t, "![scanned - no issues found](https://raw.githubusercontent.com/jfrog/frogbot/master/resources/v2/noIssues.png)<br>", getSeverityTag("scanned - no issues", "Applicable"))
2325
}
2426

2527
func TestGetSeverityTagNotApplicable(t *testing.T) {
@@ -28,6 +30,7 @@ func TestGetSeverityTagNotApplicable(t *testing.T) {
2830
assert.Equal(t, "![medium (not applicable)](https://raw.githubusercontent.com/jfrog/frogbot/master/resources/v2/notApplicableMedium.png)<br>", getSeverityTag("meDium", "Not Applicable"))
2931
assert.Equal(t, "![low (not applicable)](https://raw.githubusercontent.com/jfrog/frogbot/master/resources/v2/notApplicableLow.png)<br>", getSeverityTag("low", "Not Applicable"))
3032
assert.Equal(t, "![unknown (not applicable)](https://raw.githubusercontent.com/jfrog/frogbot/master/resources/v2/notApplicableUnknown.png)<br>", getSeverityTag("none", "Not Applicable"))
33+
assert.Equal(t, "![scanned - no issues found](https://raw.githubusercontent.com/jfrog/frogbot/master/resources/v2/noIssues.png)<br>", getSeverityTag("scanned - no issues", "Not Applicable"))
3134
}
3235

3336
func TestGetVulnerabilitiesBanners(t *testing.T) {

0 commit comments

Comments
 (0)