-
Notifications
You must be signed in to change notification settings - Fork 571
Added a checker for gnutls #241
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 all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
fbeab02
Added a checker for gnutls
FReeshabh 2013a1d
Added gnutls to init file
FReeshabh 01bae3d
Missing comma
FReeshabh 4e87e86
Fixed major problems with the code(editor trouble)
FReeshabh 1c02c90
Added Vpkg and newline at the end
FReeshabh d2777d8
Merge branch 'master' into nextPR
terriko ff14b13
gnutls test and improved no cves error messages in TestScanner
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 |
---|---|---|
|
@@ -4,6 +4,7 @@ | |
"curl", | ||
"expat", | ||
"ffmpeg", | ||
"gnutls", | ||
"icu", | ||
"kerberos", | ||
"libgcrypt", | ||
|
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,36 @@ | ||
#!/usr/bin/env python3 | ||
""" | ||
CVE checker for GnuTLS | ||
References: | ||
https://www.cvedetails.com/vulnerability-list/vendor_id-72/product_id-4433/GNU-Gnutls.html | ||
""" | ||
import os | ||
from ..util import regex_find | ||
|
||
|
||
def get_version(lines, filename): | ||
""" | ||
returns version information for gnutls found in given file. | ||
Verfies using the tools gnutls-cli | ||
Verifies using the libraries libgnutls.so and libgnutls-dane.so | ||
|
||
VPkg: gnu, gnutls | ||
VPkg: gnutls, gnutls | ||
""" | ||
regex = [r"gnutls-cli ([0-9]+\.[0-9]+\.[0-9]+)"] | ||
|
||
for modulename, binary_names in ( | ||
{ | ||
"gnutls-serv": ["gnutls-serv"], | ||
"gnutls-cli": ["gnutls-cli", "libgnutls.so", "libgnutls-dane.so"], | ||
} | ||
).items(): | ||
for check in binary_names: | ||
if check in os.path.split(filename)[-1]: | ||
return { | ||
"is_or_contains": "is", | ||
"modulename": modulename, | ||
"version": regex_find(lines, *regex), | ||
} | ||
|
||
return {} |
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,11 @@ | ||
#include <stdio.h> | ||
|
||
int main() { | ||
printf("This program is designed to test the cve-bin-tool checker."); | ||
printf("It outputs a few strings normally associated with gnutls-cli 2.3.11"); | ||
printf("They appear below this line."); | ||
printf("------------------"); | ||
printf("gnutls-cli 2.3.11"); | ||
|
||
return 0; | ||
} |
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,11 @@ | ||
#include <stdio.h> | ||
|
||
int main() { | ||
printf("This program is designed to test the cve-bin-tool checker."); | ||
printf("It outputs a few strings normally associated with gnutls-serv 2.3.11"); | ||
printf("They appear below this line."); | ||
printf("------------------"); | ||
printf("gnutls-serv 2.3.11"); | ||
|
||
return 0; | ||
} |
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made these error messages a little more easy to read