-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Feature/vulndb #18492
base: develop
Are you sure you want to change the base?
Feature/vulndb #18492
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -167,7 +167,14 @@ def _allow_methods(self, forged_req, url, origin, response, | |
msg %= (url, ACCESS_CONTROL_ALLOW_METHODS, | ||
allow_methods, ', '.join(report_sensitive)) | ||
|
||
v = Vuln(name, msg, severity.LOW, response.get_id(), self.get_name()) | ||
v = Vuln( | ||
name, | ||
msg, | ||
severity.LOW, | ||
response.get_id(), | ||
self.get_name(), | ||
vulndb_id=10010, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Would it be possible for Holm to contribute back to the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I brought up the discussion internally in Holm. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. And what was the resolution? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So far there's no decision to contribute to |
||
) | ||
v.set_url(forged_req.get_url()) | ||
v[METHODS] = allow_methods_set | ||
|
||
|
@@ -184,7 +191,14 @@ def _allow_methods(self, forged_req, url, origin, response, | |
msg %= (url, ACCESS_CONTROL_ALLOW_METHODS, | ||
allow_methods, ', '.join(report_strange)) | ||
|
||
v = Vuln(name, msg, severity.LOW, response.get_id(), self.get_name()) | ||
v = Vuln( | ||
name, | ||
msg, | ||
severity.LOW, | ||
response.get_id(), | ||
self.get_name(), | ||
vulndb_id=10011, | ||
) | ||
v.set_url(forged_req.get_url()) | ||
v[METHODS] = allow_methods_set | ||
|
||
|
@@ -205,8 +219,14 @@ def _universal_allow(self, forged_req, url, origin, response, | |
' and leaves the application open to Cross-domain attacks.' | ||
msg %= (forged_req.get_url(), ACCESS_CONTROL_ALLOW_ORIGIN) | ||
|
||
v = Vuln('Access-Control-Allow-Origin set to "*"', msg, | ||
severity.LOW, response.get_id(), self.get_name()) | ||
v = Vuln( | ||
'Access-Control-Allow-Origin set to "*"', | ||
msg, | ||
severity.LOW, | ||
response.get_id(), | ||
self.get_name(), | ||
vulndb_id=10012, | ||
) | ||
v.set_url(forged_req.get_url()) | ||
v[DOMAIN] = forged_req.get_url().get_domain() | ||
|
||
|
@@ -249,7 +269,14 @@ def _origin_echo(self, forged_req, url, origin, response, | |
ACCESS_CONTROL_ALLOW_ORIGIN, | ||
ACCESS_CONTROL_ALLOW_CREDENTIALS) | ||
|
||
v = Vuln(name, msg, sev, response.get_id(), self.get_name()) | ||
v = Vuln( | ||
name, | ||
msg, | ||
sev, | ||
response.get_id(), | ||
self.get_name(), | ||
vulndb_id=10013, | ||
) | ||
v.set_url(forged_req.get_url()) | ||
v[DOMAIN] = forged_req.get_url().get_domain() | ||
|
||
|
@@ -266,7 +293,14 @@ def _origin_echo(self, forged_req, url, origin, response, | |
msg = msg % (forged_req.get_url(), | ||
ACCESS_CONTROL_ALLOW_ORIGIN) | ||
|
||
v = Vuln(name, msg, sev, response.get_id(), self.get_name()) | ||
v = Vuln( | ||
name, | ||
msg, | ||
sev, | ||
response.get_id(), | ||
self.get_name(), | ||
vulndb_id=10014, | ||
) | ||
v.set_url(forged_req.get_url()) | ||
v[DOMAIN] = forged_req.get_url().get_domain() | ||
|
||
|
@@ -306,7 +340,8 @@ def _universal_origin_allow_creds(self, forged_req, url, origin, response, | |
ACCESS_CONTROL_ALLOW_CREDENTIALS) | ||
|
||
v = Vuln('Incorrect withCredentials implementation', msg, | ||
severity.INFORMATION, response.get_id(), self.get_name()) | ||
severity.INFORMATION, response.get_id(), self.get_name(), | ||
vulndb_id=10015) | ||
v.set_url(forged_req.get_url()) | ||
v[DOMAIN] = forged_req.get_url().get_domain() | ||
|
||
|
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.
https://github.com/vulndb/data/search?q=10116&unscoped_q=10116
What happens when the ID is not present in the
vulndb
? Is this error handled somewhere?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.
There's no error. I don't implement here the concept of making
vulndb_id
required forVuln
instances. I just mentioned the concept in description, because in this PR I prepare the code for this concept. I'll be able to implement it once #18543 is merged.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.
My point is, when
10116
is passed to theVuln
instance, and then XML plugin tries to write that vuln instance to disk, what happens? Will it crash because10116
is NOT in thevulndb
?10116
is Holm-specific, that is why I'm asking.