fix(debian): handle severity properly (#109)
* test(debian): add a failure case * fix(debian): handle severity
This commit is contained in:
parent
127afe7c71
commit
cccad02d55
6
debian/tracker/annotation.go
vendored
6
debian/tracker/annotation.go
vendored
@ -186,7 +186,11 @@ func parseInner(inner string) (string, int) {
|
|||||||
// e.g. (bug #1345; low)
|
// e.g. (bug #1345; low)
|
||||||
for _, ann := range strings.Split(inner, ";") {
|
for _, ann := range strings.Split(inner, ";") {
|
||||||
// Parse severity
|
// Parse severity
|
||||||
severity = severityRegexp.FindString(ann)
|
s := severityRegexp.FindString(ann)
|
||||||
|
if s != "" {
|
||||||
|
severity = s
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
// Parse bug number
|
// Parse bug number
|
||||||
match := bugNoRegexp.FindStringSubmatch(ann)
|
match := bugNoRegexp.FindStringSubmatch(ann)
|
||||||
|
3
debian/tracker/debian_test.go
vendored
3
debian/tracker/debian_test.go
vendored
@ -132,12 +132,13 @@ func TestClient_Update(t *testing.T) {
|
|||||||
},
|
},
|
||||||
Annotations: []*tracker.Annotation{
|
Annotations: []*tracker.Annotation{
|
||||||
{
|
{
|
||||||
Original: "- putty 0.75-3 (bug #990901)",
|
Original: "- putty 0.75-3 (low; bug #990901)",
|
||||||
Line: 11,
|
Line: 11,
|
||||||
Type: "package",
|
Type: "package",
|
||||||
Version: "0.75-3",
|
Version: "0.75-3",
|
||||||
Kind: "fixed",
|
Kind: "fixed",
|
||||||
Package: "putty",
|
Package: "putty",
|
||||||
|
Severity: "low",
|
||||||
BugNo: 990901,
|
BugNo: 990901,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
2
debian/tracker/testdata/happy/data/CVE/list
vendored
2
debian/tracker/testdata/happy/data/CVE/list
vendored
@ -8,6 +8,6 @@ CVE-2021-36373 (When reading a specially crafted TAR archive an Apache Ant build
|
|||||||
NOTE: Crash in CLI tool, no security impact
|
NOTE: Crash in CLI tool, no security impact
|
||||||
|
|
||||||
CVE-2021-36367 (PuTTY through 0.75 proceeds with establishing an SSH session even if i ...)
|
CVE-2021-36367 (PuTTY through 0.75 proceeds with establishing an SSH session even if i ...)
|
||||||
- putty 0.75-3 (bug #990901)
|
- putty 0.75-3 (low; bug #990901)
|
||||||
[bullseye] - putty <no-dsa> (Minor issue)
|
[bullseye] - putty <no-dsa> (Minor issue)
|
||||||
[buster] - putty <no-dsa> (Minor issue)
|
[buster] - putty <no-dsa> (Minor issue)
|
||||||
|
Loading…
Reference in New Issue
Block a user