mirror of
https://forgejo.altau.su/lego/lego-monitoring.git
synced 2026-03-10 04:41:10 +00:00
34 lines
985 B
Python
34 lines
985 B
Python
import unittest
|
|
|
|
from misc import vuln
|
|
|
|
|
|
class TestVuln(unittest.TestCase):
|
|
def test_parse_arch_audit_output(self):
|
|
self.assertEqual(
|
|
vuln._parse_arch_audit_output(
|
|
"""[
|
|
{"name":"AVG-2765",
|
|
"packages":["openssl"],
|
|
"status":"Vulnerable",
|
|
"type":"arbitrary command execution",
|
|
"severity":"Medium",
|
|
"fixed":null,
|
|
"issues":["CVE-2022-2068"]}
|
|
]"""
|
|
),
|
|
[
|
|
vuln.Vulnerability(
|
|
id="AVG-2765",
|
|
link="https://security.archlinux.org/AVG-2765",
|
|
vuln_type="arbitrary command execution",
|
|
packages=["openssl"],
|
|
severity=vuln.Severity.MEDIUM,
|
|
fixed=None,
|
|
)
|
|
],
|
|
)
|
|
|
|
|
|
if __name__ == "__main__":
|
|
unittest.main()
|