Skip to content

Commit ab07fb9

Browse files
authored
feat: New checker: gnome librsvg (fixes #1494) (#1533)
1 parent 19ebb0d commit ab07fb9

File tree

8 files changed

+69
-20
lines changed

8 files changed

+69
-20
lines changed

.github/actions/spelling/allow.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,7 @@ liblas
180180
libnss
181181
libpng
182182
libraryname
183+
librsvg
183184
libsndfile
184185
libsoup
185186
libsqlite

README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -194,23 +194,23 @@ The following checkers are available for finding components in binary files:
194194

195195
<!--CHECKERS TABLE BEGIN-->
196196
| | | | Available checkers | | | |
197-
|--------------- |--------- |------------- |---------- |------------- |---------- |------------ |
197+
|--------------- |--------------- |--------- |------------- |------------- |---------- |---------- |
198198
| accountsservice |avahi |bash |bind |binutils |bolt |bubblewrap |
199199
| busybox |bzip2 |cronie |cryptsetup |cups |curl |dbus |
200200
| dnsmasq |dovecot |dpkg |enscript |expat |ffmpeg |freeradius |
201201
| ftp |gcc |gimp |glibc |gnomeshell |gnupg |gnutls |
202202
| gpgme |gstreamer |gupnp |haproxy |hdf5 |hostapd |hunspell |
203203
| icecast |icu |irssi |kbd |kerberos |kexectools |libarchive |
204204
| libbpg |libdb |libgcrypt |libical |libjpeg_turbo |liblas |libnss |
205-
| libsndfile |libsoup |libsrtp |libssh2 |libtiff |libvirt |libvncserver |
206-
| libxslt |lighttpd |logrotate |lua |mariadb |mdadm |memcached |
207-
| mtr |mysql |nano |ncurses |nessus |netpbm |nginx |
208-
| node |ntp |open_vm_tools |openafs |openjpeg |openldap |openssh |
209-
| openssl |openswan |openvpn |p7zip |pcsc_lite |pigz |png |
210-
| polarssl_fedora |poppler |postgresql |pspp |python |qt |radare2 |
211-
| rsyslog |samba |sane_backends |sqlite |strongswan |subversion |sudo |
212-
| syslogng |systemd |tcpdump |trousers |varnish |webkitgtk |wireshark |
213-
| wpa_supplicant |xerces |xml2 |zlib |zsh | | |
205+
| librsvg |libsndfile |libsoup |libsrtp |libssh2 |libtiff |libvirt |
206+
| libvncserver |libxslt |lighttpd |logrotate |lua |mariadb |mdadm |
207+
| memcached |mtr |mysql |nano |ncurses |nessus |netpbm |
208+
| nginx |node |ntp |open_vm_tools |openafs |openjpeg |openldap |
209+
| openssh |openssl |openswan |openvpn |p7zip |pcsc_lite |pigz |
210+
| png |polarssl_fedora |poppler |postgresql |pspp |python |qt |
211+
| radare2 |rsyslog |samba |sane_backends |sqlite |strongswan |subversion |
212+
| sudo |syslogng |systemd |tcpdump |trousers |varnish |webkitgtk |
213+
| wireshark |wpa_supplicant |xerces |xml2 |zlib |zsh | |
214214
<!--CHECKERS TABLE END-->
215215

216216
All the checkers can be found in the checkers directory, as can the

cve_bin_tool/checkers/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@
6060
"libjpeg_turbo",
6161
"liblas",
6262
"libnss",
63+
"librsvg",
6364
"libsndfile",
6465
"libsoup",
6566
"libsrtp",

cve_bin_tool/checkers/librsvg.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Copyright (C) 2022 Intel Corporation
2+
# SPDX-License-Identifier: GPL-3.0-or-later
3+
4+
"""
5+
CVE checker for librsvg
6+
7+
https://www.cvedetails.com/vulnerability-list/vendor_id-283/product_id-23082/Gnome-Librsvg.html
8+
9+
"""
10+
11+
from cve_bin_tool.checkers import Checker
12+
13+
14+
class LibrsvgChecker(Checker):
15+
CONTAINS_PATTERNS = []
16+
FILENAME_PATTERNS = [r"librsvg"]
17+
VERSION_PATTERNS = [r"librsvg[0-9]?-([0-9]+\.[0-9]+\.[0-9]+)"]
18+
VENDOR_PRODUCT = [("gnome", "librsvg")]

doc/MANUAL.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -118,23 +118,23 @@ which is useful if you're trying the latest code from
118118

119119
<!--CHECKERS TABLE BEGIN-->
120120
| | | | Available checkers | | | |
121-
|--------------- |--------- |------------- |---------- |------------- |---------- |------------ |
121+
|--------------- |--------------- |--------- |------------- |------------- |---------- |---------- |
122122
| accountsservice |avahi |bash |bind |binutils |bolt |bubblewrap |
123123
| busybox |bzip2 |cronie |cryptsetup |cups |curl |dbus |
124124
| dnsmasq |dovecot |dpkg |enscript |expat |ffmpeg |freeradius |
125125
| ftp |gcc |gimp |glibc |gnomeshell |gnupg |gnutls |
126126
| gpgme |gstreamer |gupnp |haproxy |hdf5 |hostapd |hunspell |
127127
| icecast |icu |irssi |kbd |kerberos |kexectools |libarchive |
128128
| libbpg |libdb |libgcrypt |libical |libjpeg_turbo |liblas |libnss |
129-
| libsndfile |libsoup |libsrtp |libssh2 |libtiff |libvirt |libvncserver |
130-
| libxslt |lighttpd |logrotate |lua |mariadb |mdadm |memcached |
131-
| mtr |mysql |nano |ncurses |nessus |netpbm |nginx |
132-
| node |ntp |open_vm_tools |openafs |openjpeg |openldap |openssh |
133-
| openssl |openswan |openvpn |p7zip |pcsc_lite |pigz |png |
134-
| polarssl_fedora |poppler |postgresql |pspp |python |qt |radare2 |
135-
| rsyslog |samba |sane_backends |sqlite |strongswan |subversion |sudo |
136-
| syslogng |systemd |tcpdump |trousers |varnish |webkitgtk |wireshark |
137-
| wpa_supplicant |xerces |xml2 |zlib |zsh | | |
129+
| librsvg |libsndfile |libsoup |libsrtp |libssh2 |libtiff |libvirt |
130+
| libvncserver |libxslt |lighttpd |logrotate |lua |mariadb |mdadm |
131+
| memcached |mtr |mysql |nano |ncurses |nessus |netpbm |
132+
| nginx |node |ntp |open_vm_tools |openafs |openjpeg |openldap |
133+
| openssh |openssl |openswan |openvpn |p7zip |pcsc_lite |pigz |
134+
| png |polarssl_fedora |poppler |postgresql |pspp |python |qt |
135+
| radare2 |rsyslog |samba |sane_backends |sqlite |strongswan |subversion |
136+
| sudo |syslogng |systemd |tcpdump |trousers |varnish |webkitgtk |
137+
| wireshark |wpa_supplicant |xerces |xml2 |zlib |zsh | |
138138
<!--CHECKERS TABLE END-->
139139

140140
For a quick overview of usage and how it works, you can also see [the readme file](README.md).
Binary file not shown.
Binary file not shown.

test/test_data/librsvg.py

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Copyright (C) 2022 Intel Corporation
2+
# SPDX-License-Identifier: GPL-3.0-or-later
3+
4+
mapping_test_data = [
5+
{
6+
"product": "librsvg",
7+
"version": "2.46.5",
8+
"version_strings": ["librsvg-2.46.5"],
9+
},
10+
{
11+
"product": "librsvg",
12+
"version": "2.50.7",
13+
"version_strings": ["librsvg2-2.50.7"],
14+
},
15+
]
16+
package_test_data = [
17+
{
18+
"url": "https://ftp.lysator.liu.se/pub/opensuse/distribution/leap/15.3/repo/oss/aarch64/",
19+
"package_name": "librsvg-2-2-2.46.5-3.3.1.aarch64.rpm",
20+
"product": "librsvg",
21+
"version": "2.46.5",
22+
},
23+
{
24+
"url": "https://download-ib01.fedoraproject.org/pub/fedora/linux/releases/35/Everything/aarch64/os/Packages/l/",
25+
"package_name": "librsvg2-2.50.7-2.fc35.aarch64.rpm",
26+
"product": "librsvg",
27+
"version": "2.50.7",
28+
},
29+
]

0 commit comments

Comments
 (0)