Skip to content

Commit

Permalink
Report unmodified affected versions
Browse files Browse the repository at this point in the history
Signed-off-by: Keshav Priyadarshi <[email protected]>
  • Loading branch information
keshav-space committed Mar 16, 2023
1 parent df19d27 commit 200a17b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion vulntotal/datasources/github.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def parse_advisory(interesting_edges) -> Iterable[VendorData]:
for edge in interesting_edges:
node = edge["node"]
aliases = [aliase["value"] for aliase in get_item(node, "advisory", "identifiers")]
affected_versions = node["vulnerableVersionRange"].strip().replace(" ", "").split(",")
affected_versions = [node["vulnerableVersionRange"].strip()]
parsed_fixed_versions = get_item(node, "firstPatchedVersion", "identifier")
fixed_versions = [parsed_fixed_versions] if parsed_fixed_versions else []
yield VendorData(
Expand Down
8 changes: 4 additions & 4 deletions vulntotal/tests/test_data/github/parse_advisory-expected.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[
{
"affected_versions": [
"<2.7.2"
"< 2.7.2"
],
"fixed_versions": [
"2.7.2"
Expand All @@ -13,7 +13,7 @@
},
{
"affected_versions": [
"<2.11.3"
"< 2.11.3"
],
"fixed_versions": [
"2.11.3"
Expand All @@ -25,7 +25,7 @@
},
{
"affected_versions": [
"<2.8.1"
"< 2.8.1"
],
"fixed_versions": [
"2.8.1"
Expand All @@ -37,7 +37,7 @@
},
{
"affected_versions": [
"<2.10.1"
"< 2.10.1"
],
"fixed_versions": [
"2.10.1"
Expand Down

0 comments on commit 200a17b

Please sign in to comment.