Skip to content

Add checker librsvg #1530

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/actions/spelling/allow.txt
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ liblas
libnss
libpng
libraryname
librsvg
libsndfile
libsoup
libsqlite
Expand Down
179 changes: 115 additions & 64 deletions README.md

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions cve_bin_tool/checkers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
"libjpeg_turbo",
"liblas",
"libnss",
"librsvg",
"libsndfile",
"libsoup",
"libssh2",
Expand Down
16 changes: 16 additions & 0 deletions cve_bin_tool/checkers/librsvg.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Copyright (C) 2022 Intel Corporation
# SPDX-License-Identifier: GPL-3.0-or-later

"""
CVE checker for librsvg

https://www.cvedetails.com/product/23082/Gnome-Librsvg.html?vendor_id=283
"""
from cve_bin_tool.checkers import Checker


class LibrsvgChecker(Checker):
CONTAINS_PATTERNS = []
FILENAME_PATTERNS = [r"librsvg"]
VERSION_PATTERNS = [r"librsvg[0-9]?([0-9]+\.[0-99]+\.[0-99]+)"]
VENDOR_PRODUCT = [("gnome", "librsvg")]
Binary file added cve_test.pdf
Binary file not shown.
22 changes: 11 additions & 11 deletions doc/MANUAL.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,23 +115,23 @@ which is useful if you're trying the latest code from

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

For a quick overview of usage and how it works, you can also see [the readme file](README.md).
Expand Down Expand Up @@ -215,7 +215,7 @@ in the Input section.
## Limitations

The last release of this tool to support python 2.7 is 0.3.1. Please use
python 3.6+ for development and future versions. Linux and Windows are
python 3.7+ for development and future versions. Linux and Windows are
supported, as is usage within cygwin on windows.

This tool does not scan for all possible known public vulnerabilities, it only
Expand Down
Binary file not shown.
18 changes: 18 additions & 0 deletions test/test_data/librsvg.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Copyright (C) 2022 Intel Corporation
# SPDX-License-Identifier: GPL-3.0-or-later

mapping_test_data = [
{
"product": "librsvg2",
"version": "2.40.20",
"version_strings": ["librsvg-2.so.2.40.20"],
},
]
package_test_data = [
{
"url": "http://mirror.centos.org/altarch/7/os/aarch64/Packages/",
"package_name": "librsvg2-2.40.20-1.el7.aarch64.rpm",
"product": "librsvg2",
"version": "2.40.20",
},
]