-
Notifications
You must be signed in to change notification settings - Fork 547
feat(checker): add Apache commons-compress checker (#1040) #1666
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
Merged
Merged
Changes from 4 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
e8eb064
feat(checker): add Apache commons-compress checker
26a9160
refactor: no need for custom get_version func
22774c1
Merge branch 'main' into dev
b31ngd3v 553c212
Merge branch 'main' into dev
terriko cbf31c9
fix: version signature commons_compress
b31ngd3v 33ccbcc
Merge branch 'main' into dev
b31ngd3v 7aa8609
fix: version signature of commons_compress
b31ngd3v 2c3a5ea
fix: version signature of commons_compress
2c77b28
fix: version signature
69d6767
Merge branch 'main' into dev
terriko File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -58,6 +58,8 @@ cleartext | |
clnt | ||
cmdline | ||
codecov | ||
commons | ||
compress | ||
conda | ||
config | ||
conventionalcommits | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,6 +20,7 @@ | |
"bubblewrap", | ||
"busybox", | ||
"bzip2", | ||
"commons_compress", | ||
"cronie", | ||
"cryptsetup", | ||
"cups", | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Copyright (C) 2022 Intel Corporation | ||
# SPDX-License-Identifier: GPL-3.0-or-later | ||
|
||
|
||
""" | ||
CVE checker for Apache commons-compress: | ||
|
||
https://www.cvedetails.com/vulnerability-list/vendor_id-45/product_id-59066/Apache-Commons-Compress.html | ||
""" | ||
from cve_bin_tool.checkers import Checker | ||
|
||
|
||
class CommonsCompressChecker(Checker): | ||
CONTAINS_PATTERNS = [ | ||
r"Apache Commons Compress software defines an API for working with", | ||
r"<url>http://commons.apache.org/proper/commons-compress/</url>", | ||
] | ||
FILENAME_PATTERNS = [r"commons-compress(-[0-9]+\.[0-9]+(\.[0-9]+)?)?.jar"] | ||
VERSION_PATTERNS = [ | ||
r"<artifactId>commons-compress</artifactId>\n <version>([0-9]+\.[0-9]+(\.[0-9]+)?)</version>" | ||
] | ||
VENDOR_PRODUCT = [("apache", "commons_compress")] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+4.21 KB
test/condensed-downloads/apache-commons-compress-1.21-1.fc35.noarch.rpm.tar.gz
Binary file not shown.
Binary file not shown.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# Copyright (C) 2022 Intel Corporation | ||
# SPDX-License-Identifier: GPL-3.0-or-later | ||
|
||
mapping_test_data = [ | ||
{ | ||
"product": "commons_compress", | ||
"version": "1.18", | ||
"version_strings": [ | ||
"<artifactId>commons-compress</artifactId>\n <version>1.18</version>" | ||
], | ||
}, | ||
{ | ||
"product": "commons_compress", | ||
"version": "1.15.1", | ||
"version_strings": [ | ||
"<artifactId>commons-compress</artifactId>\n <version>1.15.1</version>" | ||
], | ||
}, | ||
] | ||
package_test_data = [ | ||
{ | ||
"url": "https://repo1.maven.org/maven2/org/apache/commons/commons-compress/1.16.1/", | ||
"package_name": "commons-compress-1.16.1.jar", | ||
"product": "commons_compress", | ||
"version": "1.16.1", | ||
}, | ||
{ | ||
"url": "http://rpmfind.net/linux/fedora/linux/releases/35/Everything/x86_64/os/Packages/a/", | ||
"package_name": "apache-commons-compress-1.21-1.fc35.noarch.rpm", | ||
"product": "commons_compress", | ||
"version": "1.21", | ||
}, | ||
] |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.