feat(scan): Display listen port of affected procs for each vulnerable pkgs (#859)

* refactor(redhat): move rpmQa and rpmQf to redhatbase.go

* feat(scan): Display listen port of affected procs
This commit is contained in:
Kota Kanbe
2019-07-03 23:01:59 +09:00
committed by GitHub
parent 3e5390309c
commit 836e4704f8
12 changed files with 141 additions and 46 deletions

View File

@@ -733,7 +733,8 @@ func setChangelogLayout(g *gocui.Gui) error {
if len(pack.AffectedProcs) != 0 {
for _, p := range pack.AffectedProcs {
lines = append(lines, fmt.Sprintf(" * PID: %s %s", p.PID, p.Name))
lines = append(lines, fmt.Sprintf(" * PID: %s %s Port: %s",
p.PID, p.Name, p.ListenPorts))
}
} else {
// lines = append(lines, fmt.Sprintf(" * No affected process"))

View File

@@ -262,7 +262,7 @@ No CVE-IDs are found in updatable packages.
if len(pack.AffectedProcs) != 0 {
for _, p := range pack.AffectedProcs {
data = append(data, []string{"",
fmt.Sprintf(" - PID: %s %s", p.PID, p.Name)})
fmt.Sprintf(" - PID: %s %s, Port: %s", p.PID, p.Name, p.ListenPorts)})
}
}
}