diff --git a/scan/base.go b/scan/base.go index 557b63ae..1fabdc84 100644 --- a/scan/base.go +++ b/scan/base.go @@ -888,6 +888,7 @@ func (l *base) parseGrepProcMap(stdout string) (soPaths []string) { scanner := bufio.NewScanner(strings.NewReader(stdout)) for scanner.Scan() { line := strings.TrimSpace(scanner.Text()) + line = strings.Split(line, ";")[0] soPaths = append(soPaths, line) } return soPaths diff --git a/scan/base_test.go b/scan/base_test.go index 20de3e81..82968c47 100644 --- a/scan/base_test.go +++ b/scan/base_test.go @@ -218,12 +218,14 @@ func Test_base_parseGrepProcMap(t *testing.T) { args: args{ `/etc/selinux/targeted/contexts/files/file_contexts.bin /etc/selinux/targeted/contexts/files/file_contexts.homedirs.bin -/usr/lib64/libdl-2.28.so`, +/usr/lib64/libdl-2.28.so + /usr/lib64/libnss_files-2.17.so;601ccbf3`, }, wantSoPaths: []string{ "/etc/selinux/targeted/contexts/files/file_contexts.bin", "/etc/selinux/targeted/contexts/files/file_contexts.homedirs.bin", "/usr/lib64/libdl-2.28.so", + `/usr/lib64/libnss_files-2.17.so`, }, }, }