Skip to content

Commit

Permalink
fixing comments
Browse files Browse the repository at this point in the history
  • Loading branch information
PiranhaSa committed Nov 24, 2023
1 parent 0ecae1d commit 67919ba
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions agent/exploits/cve_2019_12989__cve_2019_12991.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def _create_vulnerability(
) -> definitions.Vulnerability:
entry = kb.Entry(
title="Security Vulnerabilities in Citrix CVE-2019-12989 and CVE-2019-12991",
risk_rating="critical",
risk_rating="CRITICAL",
short_description="Citrix SD-WAN Appliance 10.2.2 - Authentication Bypass / Remote Command Execution",
description="CVE-2019-12989: The cgi-bin/sdwanrestapi/getpackagefile.cgi Perl script "
"contains a SQL injection vulnerability that can be exploited by a remote, unauthenticated attacker."
Expand Down Expand Up @@ -105,7 +105,7 @@ def _create_vulnerability(
targeted_by_nation_state=True,
)
technical_detail = (
f"{target.host} is vulnerable to CVE-2019-12989 and CVE-2019-12991"
f"{target.scheme}://{target.host}:{target.port} is vulnerable to CVE-2019-12989 and CVE-2019-12991"
)
vulnerability = definitions.Vulnerability(
entry=entry,
Expand Down
6 changes: 3 additions & 3 deletions tests/exploits/cve_2019_12989_cve_2019_12997_test.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
"""Unit tests for Agent Asteriod exploits"""
"""Unit tests for Agent Asteriod: CVE-2019-12989 and CVE-2019-12991."""

import requests_mock as req_mock

from agent import definitions
from agent.exploits import cve_2019_12989__cve_2019_12991


def test_CVE_2019_12989_and_CVE_2019_12991_whenVulnerable_reportFinding(
def testCVE201912989AndCVE201912991_whenVulnerable_reportFinding(
requests_mock: req_mock.mocker.Mocker,
) -> None:
"""Ensure that the exploit reports findings when the application is vulnerable."""
Expand All @@ -31,7 +31,7 @@ def test_CVE_2019_12989_and_CVE_2019_12991_whenVulnerable_reportFinding(
)
assert (
vulnerability.technical_detail
== "213.174.110.201 is vulnerable to CVE-2019-12989 and CVE-2019-12991"
== "http://213.174.110.201:80 is vulnerable to CVE-2019-12989 and CVE-2019-12991"
)


Expand Down
2 changes: 1 addition & 1 deletion tests/exploits_registry_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def testExploitsRegistry_importingAllExploits_registerAll() -> None:

registered_exploits = exploits_registry.ExploitsRegistry.values()

assert len(registered_exploits) == 6
assert len(registered_exploits) > 0


def testExploitsRegistry_allExploits_mustBeRegisteredOnce() -> None:
Expand Down

0 comments on commit 67919ba

Please sign in to comment.