Skip to content

Commit b2092d3

Browse files
committed
fix: update gcc checker
Fix gcc pattern to detect the following pattern: GCC: (crosstool-NG git+9f5f159-dirty) 4.8.3 Signed-off-by: Fabrice Fontaine <[email protected]>
1 parent d93bc2d commit b2092d3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+59
-6
lines changed

Diff for: cve_bin_tool/checkers/gcc.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class GccChecker(Checker):
3232
]
3333
FILENAME_PATTTERN = [r"gcc"]
3434
VERSION_PATTERNS = [
35-
r"GCC: \([a-zA-Z ,0-9]+\) ([0-9]+\.[0-9]+(\.[0-9]+)?)",
35+
r"GCC: \([a-zA-Z ,0-9_+\-\.]+\) ([0-9]+\.[0-9]+(\.[0-9]+)?)",
3636
# r"gcc ([0-9]+\.[0-9]+(\.[0-9]+)?)", # does not return correct version number on some packages
3737
]
3838
VENDOR_PRODUCT = [("gnu", "gcc")]

Diff for: test/test_data/apr.py

+1
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,6 @@
3232
"package_name": "apr-1.7.0-r0.apk",
3333
"product": "portable_runtime",
3434
"version": "1.7.0",
35+
"other_products": ["gcc"],
3536
},
3637
]

Diff for: test/test_data/axel.py

+1
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,6 @@
2222
"package_name": "axel-2.17.6-r1.apk",
2323
"product": "axel",
2424
"version": "2.17.6",
25+
"other_products": ["gcc"],
2526
},
2627
]

Diff for: test/test_data/bash.py

+1
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,6 @@
1616
"package_name": "bash_4.4.18-2ubuntu1_amd64.deb",
1717
"product": "bash",
1818
"version": "4.4.19",
19+
"other_products": ["gcc"],
1920
},
2021
]

Diff for: test/test_data/cairo.py

+1
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,6 @@
3333
"package_name": "cairo-1.16.0-r3.apk",
3434
"product": "cairo",
3535
"version": "1.16.0",
36+
"other_products": ["gcc"],
3637
},
3738
]

Diff for: test/test_data/cups_filters.py

+1
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,6 @@
2626
"package_name": "cups-filters-1.26.0-r0.apk",
2727
"product": "cups-filters",
2828
"version": "1.26.0",
29+
"other_products": ["gcc"],
2930
},
3031
]

Diff for: test/test_data/docker.py

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
"version": "19.03.15",
1414
"package_name": "docker-19.03.15-1.mga8.armv7hl.rpm",
1515
"other_products": [
16+
"gcc",
1617
"go",
1718
],
1819
},

Diff for: test/test_data/ed.py

+1
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,6 @@
2323
"package_name": "ed-1.15-r0.apk",
2424
"product": "ed",
2525
"version": "1.15",
26+
"other_products": ["gcc"],
2627
},
2728
]

Diff for: test/test_data/firejail.py

+1
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,6 @@
2626
"package_name": "firejail-0.9.60-r0.apk",
2727
"product": "firejail",
2828
"version": "0.9.60",
29+
"other_products": ["gcc"],
2930
},
3031
]

Diff for: test/test_data/gettext.py

+1
Original file line numberDiff line numberDiff line change
@@ -42,5 +42,6 @@
4242
"package_name": "gettext-0.20.1-r2.apk",
4343
"product": "gettext",
4444
"version": "0.20.1",
45+
"other_products": ["gcc"],
4546
},
4647
]

Diff for: test/test_data/glibc.py

+1
Original file line numberDiff line numberDiff line change
@@ -39,5 +39,6 @@
3939
"package_name": "libc6-amd64_2.24-11+deb9u4_i386.deb",
4040
"product": "glibc",
4141
"version": "2.24",
42+
"other_products": ["gcc"],
4243
},
4344
]

Diff for: test/test_data/go.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,6 @@
2222
"package_name": "go-1.13.13-r0.apk",
2323
"product": "go",
2424
"version": "1.13.13",
25-
"other-products": ["llvm"],
25+
"other_products": ["gcc"],
2626
},
2727
]

Diff for: test/test_data/gsasl.py

+1
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,6 @@
2626
"package_name": "libgsasl-1.8.1-r0.apk",
2727
"product": "gnu_sasl",
2828
"version": "1.8.1",
29+
"other_products": ["gcc"],
2930
},
3031
]

Diff for: test/test_data/heimdal.py

+1
Original file line numberDiff line numberDiff line change
@@ -35,5 +35,6 @@
3535
"package_name": "heimdal-7.7.0-r0.apk",
3636
"product": "heimdal",
3737
"version": "7.7.0",
38+
"other_products": ["gcc"],
3839
},
3940
]

Diff for: test/test_data/indent.py

+1
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,6 @@
2222
"package_name": "indent-2.2.12-r0.apk",
2323
"product": "indent",
2424
"version": "2.2.12",
25+
"other_products": ["gcc"],
2526
},
2627
]

Diff for: test/test_data/inetutils.py

+1
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,6 @@
2626
"package_name": "inetutils-syslogd-1.9.4-r3.apk",
2727
"product": "inetutils",
2828
"version": "1.9.4",
29+
"other_products": ["gcc"],
2930
},
3031
]

Diff for: test/test_data/iwd.py

+1
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,6 @@
3131
"package_name": "iwd-1.2-r1.apk",
3232
"product": "inet_wireless_daemon",
3333
"version": "1.2",
34+
"other_products": ["gcc"],
3435
},
3536
]

Diff for: test/test_data/kexectools.py

+2
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,13 @@
2626
"package_name": "kexec-tools_2.0.16-1ubuntu1_amd64.deb",
2727
"product": "kexec-tools",
2828
"version": "2.0.16",
29+
"other_products": ["gcc"],
2930
},
3031
{
3132
"url": "https://downloads.openwrt.org/releases/packages-19.07/x86_64/base/",
3233
"package_name": "kexec_2.0.16-2_x86_64.ipk",
3334
"product": "kexec-tools",
3435
"version": "2.0.16",
36+
"other_products": ["gcc"],
3537
},
3638
]

Diff for: test/test_data/kodi.py

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"package_name": "kodi-20.1-2.mga9.aarch64.rpm",
1212
"product": "kodi",
1313
"version": "20.1",
14+
"other_products": ["gcc"],
1415
},
1516
{
1617
"url": "http://ftp.debian.org/debian/pool/main/k/kodi/",

Diff for: test/test_data/libcap.py

+1
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,6 @@
2222
"package_name": "libcap2-2.69-r0.apk",
2323
"product": "libcap",
2424
"version": "2.69",
25+
"other_products": ["gcc"],
2526
},
2627
]

Diff for: test/test_data/libde265.py

+1
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,6 @@
2222
"package_name": "libde265-1.0.3-r0.apk",
2323
"product": "libde265",
2424
"version": "1.0.3",
25+
"other_products": ["gcc"],
2526
},
2627
]

Diff for: test/test_data/libheif.py

+1
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,6 @@
2222
"package_name": "libheif-1.6.0-r0.apk",
2323
"product": "libheif",
2424
"version": "1.6.0",
25+
"other_products": ["gcc"],
2526
},
2627
]

Diff for: test/test_data/liblouis.py

+1
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,6 @@
2222
"package_name": "liblouis-3.29.0-r0.apk",
2323
"product": "liblouis",
2424
"version": "3.29.0",
25+
"other_products": ["gcc"],
2526
},
2627
]

Diff for: test/test_data/libreoffice.py

+1
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,6 @@
2020
"package_name": "libreoffice-base-6.3.2.2-r3.apk",
2121
"product": "libreoffice",
2222
"version": "6.3.2.2",
23+
"other_products": ["gcc"],
2324
},
2425
]

Diff for: test/test_data/libreswan.py

+1
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,6 @@
2828
"package_name": "libreswan-3.29-r1.apk",
2929
"product": "libreswan",
3030
"version": "3.29",
31+
"other_products": ["gcc"],
3132
},
3233
]

Diff for: test/test_data/libyang.py

+1
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,6 @@
3434
"package_name": "libyang-2.0.194-r0.apk",
3535
"product": "libyang",
3636
"version": "2.0.194",
37+
"other_products": ["gcc"],
3738
},
3839
]

Diff for: test/test_data/linux_kernel.py

+2
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,14 @@
2727
"package_name": "linux-image-3.16.0-6-586_3.16.56-1+deb8u1_i386.deb",
2828
"product": "linux_kernel",
2929
"version": "3.16.0",
30+
"other_products": ["gcc"],
3031
},
3132
{
3233
"url": "http://ftp.debian.org/debian/pool/main/l/linux/",
3334
"package_name": "linux-image-5.10.0-21-s390x_5.10.162-1_s390x.deb",
3435
"product": "linux_kernel",
3536
"version": "5.10.0",
37+
"other_products": ["gcc"],
3638
},
3739
{
3840
"url": "https://downloads.openwrt.org/releases/17.01.0/targets/x86/generic/",

Diff for: test/test_data/lrzip.py

+1
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,6 @@
3131
"package_name": "lrzip-0.631-r0.apk",
3232
"product": "long_range_zip",
3333
"version": "0.631",
34+
"other_products": ["gcc"],
3435
},
3536
]

Diff for: test/test_data/mbedtls.py

+1
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,6 @@
3131
"package_name": "mbedtls-2.16.9-r0.apk",
3232
"product": "mbed_tls",
3333
"version": "2.16.9",
34+
"other_products": ["gcc"],
3435
},
3536
]

Diff for: test/test_data/mini_httpd.py

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
"package_name": "mini_httpd-1.30-r5.apk",
1111
"product": "mini_httpd",
1212
"version": "1.30",
13+
"other_products": ["gcc"],
1314
},
1415
{
1516
"url": "http://ftp.debian.org/debian/pool/main/m/mini-httpd/",

Diff for: test/test_data/monit.py

+1
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,6 @@
2828
"package_name": "monit-5.26.0-r2.apk",
2929
"product": "monit",
3030
"version": "5.26.0",
31+
"other_products": ["gcc"],
3132
},
3233
]

Diff for: test/test_data/mpg123.py

+1
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,6 @@
2828
"package_name": "mpg123-1.25.13-r0.apk",
2929
"product": "mpg123",
3030
"version": "1.25.13",
31+
"other_products": ["gcc"],
3132
},
3233
]

Diff for: test/test_data/mupdf.py

+1
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,6 @@
2222
"package_name": "mupdf-tools-1.16.1-r1.apk",
2323
"product": "mupdf",
2424
"version": "1.16.1",
25+
"other_products": ["gcc"],
2526
},
2627
]

Diff for: test/test_data/nano.py

+1
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
"package_name": "nano-4.6-r0.apk",
3939
"product": "nano",
4040
"version": "4.6",
41+
"other_products": ["gcc"],
4142
},
4243
{
4344
"url": "http://ftp.debian.org/debian/pool/main/n/nano/",

Diff for: test/test_data/ofono.py

+1
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,6 @@
2222
"package_name": "ofono-1.34-r0.apk",
2323
"product": "ofono",
2424
"version": "1.34",
25+
"other_products": ["gcc"],
2526
},
2627
]

Diff for: test/test_data/open_vm_tools.py

+1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
"package_name": "open-vm-tools-10.3.10-r2.apk",
3030
"product": "open-vm-tools",
3131
"version": "10.3.10",
32+
"other_products": ["gcc"],
3233
},
3334
{
3435
"url": "http://ftp.debian.org/debian/pool/main/o/open-vm-tools/",

Diff for: test/test_data/openjpeg.py

+1
Original file line numberDiff line numberDiff line change
@@ -39,5 +39,6 @@
3939
"package_name": "openjpeg-2.4.0-r1.apk",
4040
"product": "openjpeg",
4141
"version": "2.4.0",
42+
"other_products": ["gcc"],
4243
},
4344
]

Diff for: test/test_data/openvswitch.py

+1
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,6 @@
3232
"package_name": "openvswitch-2.12.0-r2.apk",
3333
"product": "openvswitch",
3434
"version": "2.12.0",
35+
"other_products": ["gcc"],
3536
},
3637
]

Diff for: test/test_data/pcsc_lite.py

+1
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,6 @@
2929
"package_name": "pcsc-lite-1.8.25-r2.apk",
3030
"product": "pcsc-lite",
3131
"version": "1.8.25",
32+
"other_products": ["gcc"],
3233
},
3334
]

Diff for: test/test_data/perl.py

+1
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,6 @@
2727
"package_name": "perl_5.28.1-4_x86_64.ipk",
2828
"product": "perl",
2929
"version": "5.28.1",
30+
"other_products": ["gcc"],
3031
},
3132
]

Diff for: test/test_data/php.py

+1
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,6 @@
2828
"package_name": "php7-7.3.22-r0.apk",
2929
"product": "php",
3030
"version": "7.3.22",
31+
"other_products": ["gcc"],
3132
},
3233
]

Diff for: test/test_data/pigz.py

+1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
"package_name": "pigz-2.6-r0.apk",
3232
"product": "pigz",
3333
"version": "2.6",
34+
"other_products": ["gcc"],
3435
},
3536
{
3637
"url": "https://download-ib01.fedoraproject.org/pub/fedora/linux/releases/33/Everything/x86_64/os/Packages/p/",

Diff for: test/test_data/pjsip.py

+1
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,6 @@
2323
"package_name": "pjproject-2.9-r0.apk",
2424
"product": "pjsip",
2525
"version": "2.9",
26+
"other_products": ["gcc"],
2627
},
2728
]

Diff for: test/test_data/poppler.py

+1
Original file line numberDiff line numberDiff line change
@@ -43,5 +43,6 @@
4343
"package_name": "poppler-0.82.0-r1.apk",
4444
"product": "poppler",
4545
"version": "0.82.0",
46+
"other_products": ["gcc"],
4647
},
4748
]

Diff for: test/test_data/python.py

+1
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@
6565
"package_name": "python-base_2.7.18-3_x86_64.ipk",
6666
"product": "python",
6767
"version": "2.7.18",
68+
"other_products": ["gcc"],
6869
},
6970
{
7071
"url": "https://downloads.openwrt.org/releases/22.03.3/packages/x86_64/packages/",

Diff for: test/test_data/redis.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,6 @@
3434
"package_name": "redis-5.0.14-r0.apk",
3535
"product": "redis",
3636
"version": "5.0.14",
37-
"other_products": ["lua"],
37+
"other_products": ["gcc", "lua"],
3838
},
3939
]

Diff for: test/test_data/rsyslog.py

+1
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,6 @@
2222
"package_name": "rsyslog-8.2012.0-r3.apk",
2323
"product": "rsyslog",
2424
"version": "8.2012.0",
25+
"other_products": ["gcc"],
2526
},
2627
]

Diff for: test/test_data/ruby.py

+1
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,6 @@
2929
"package_name": "ruby-libs-2.6.8-r0.apk",
3030
"product": "ruby",
3131
"version": "2.6.8",
32+
"other_products": ["gcc"],
3233
},
3334
]

Diff for: test/test_data/seahorse.py

+1
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,6 @@
2727
"package_name": "seahorse-3.38.1-r0.apk",
2828
"product": "seahorse",
2929
"version": "3.38.1",
30+
"other_products": ["gcc"],
3031
},
3132
]

Diff for: test/test_data/sngrep.py

+1
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,6 @@
2828
"package_name": "sngrep-1.8.1-r0.apk",
2929
"product": "sngrep",
3030
"version": "1.8.1",
31+
"other_products": ["gcc"],
3132
},
3233
]

Diff for: test/test_data/strongswan.py

+1
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,6 @@
3232
"package_name": "strongswan-5.8.1-r2.apk",
3333
"product": "strongswan",
3434
"version": "5.8.1",
35+
"other_products": ["gcc"],
3536
},
3637
]

Diff for: test/test_data/twonky_server.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@
1414
"package_name": "twonky-x86-64-glibc-2.22-8.5.2.zip",
1515
"product": "twonky_server",
1616
"version": "8.5.2",
17-
"other_products": ["libjpeg"],
17+
"other_products": ["gcc", "libjpeg"],
1818
},
1919
]

Diff for: test/test_data/vlc.py

+1
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,6 @@
1616
"package_name": "vlc-3.0.12-r0.apk",
1717
"product": "vlc",
1818
"version": "3.0.12",
19+
"other_products": ["gcc"],
1920
},
2021
]

0 commit comments

Comments
 (0)