Skip to content

Commit afa1505

Browse files
committed
Remove unused prysk and update dependencies
1 parent f13dda4 commit afa1505

23 files changed

+733
-842
lines changed

doc/changes/unreleased.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ be added (project-specific or globally), see the
1111
## Refactoring
1212

1313
* #517: Refactored `dependency:audit` & split up to support upcoming work
14+
* Updated dependencies (removed unused `prysk`)
1415

1516
## Bugfix
1617

exasol/toolbox/tools/security.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ def _row(issue):
249249

250250

251251
def security_issue_title(issue: Issue) -> str:
252-
return f"🔐 {issue.cve}: {issue.coordinates}"
252+
return f"{issue.cve}: {issue.coordinates}"
253253

254254

255255
def security_issue_body(issue: Issue) -> str:

poetry.lock

Lines changed: 226 additions & 252 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ pip-audit = "^2.7.3"
5454
pip-licenses = "^5.0.0"
5555
pluggy = "^1.5.0"
5656
pre-commit = ">=4"
57-
prysk = { extras = ["pytest-plugin"], version = ">0.17.0,<1" }
5857
pydantic = "^2.11.5"
5958
pylint = ">=2.15.4"
6059
pysonar = "^1.0.1.1548"

test/conftest.py

Lines changed: 86 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,11 @@
44

55
import pytest
66

7-
from exasol.toolbox.tools.security import Issue
7+
from exasol.toolbox.tools import security
8+
from exasol.toolbox.tools.security import (
9+
Issue,
10+
_issues_as_json_str,
11+
)
812
from exasol.toolbox.util.dependencies.audit import Vulnerability
913

1014

@@ -78,6 +82,87 @@ def security_issue(self) -> Issue:
7882
)
7983

8084

85+
class SampleMavenVulnerabilities:
86+
gturri_issue = security.Issue(
87+
cve="CVE-2020-36641",
88+
cwe="CWE-611",
89+
description="A vulnerability classified as problematic was found in "
90+
"gturri aXMLRPC up to 1.12.0. This vulnerability affects "
91+
"the function ResponseParser of the file "
92+
"src/main/java/de/timroes/axmlrpc/ResponseParser.java. The "
93+
"manipulation leads to xml external entity reference. "
94+
"Upgrading to version 1.12.1 is able to address this issue. "
95+
"The patch is identified as "
96+
"ad6615b3ec41353e614f6ea5fdd5b046442a832b. It is "
97+
"recommended to upgrade the affected component. VDB-217450 "
98+
"is the identifier assigned to this vulnerability.\n"
99+
"\n"
100+
"Sonatype's research suggests that this CVE's details "
101+
"differ from those defined at NVD. See "
102+
"https://ossindex.sonatype.org/vulnerability/CVE-2020-36641 "
103+
"for details",
104+
coordinates="fr.turri:aXMLRPC:jar:1.13.0:test",
105+
references=(
106+
"https://ossindex.sonatype.org/vulnerability/CVE-2020-36641?component-type=maven&component-name=fr.turri%2FaXMLRPC&utm_source=ossindex-client&utm_medium=integration&utm_content=1.8.1",
107+
"http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2020-36641",
108+
"https://www.tenable.com/cve/CVE-2020-36641",
109+
),
110+
)
111+
github_issue_url = "https://github.com/exasol/a-project/issues/123"
112+
113+
@property
114+
def report_json(self) -> str:
115+
return json.dumps(
116+
{
117+
"vulnerable": {
118+
"fr.turri:aXMLRPC:jar:1.13.0:test": {
119+
"coordinates": "pkg:maven/fr.turri/[email protected]",
120+
"description": "Lightweight Java XML-RPC working also on Android.",
121+
"reference": "https://ossindex.sonatype.org/component/pkg:maven/fr.turri/[email protected]?utm_source=ossindex-client&utm_medium=integration&utm_content=1.8.1",
122+
"vulnerabilities": [
123+
{
124+
"id": self.gturri_issue.cve,
125+
"displayName": self.gturri_issue.cve,
126+
"title": f"[{self.gturri_issue.cve}] {self.gturri_issue.cwe}: Improper Restriction of XML External Entity Reference ('XXE')",
127+
"description": self.gturri_issue.description,
128+
"cvssScore": 9.8,
129+
"cvssVector": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
130+
"cwe": self.gturri_issue.cwe,
131+
"cve": self.gturri_issue.cve,
132+
"reference": self.gturri_issue.references[0],
133+
"externalReferences": self.gturri_issue.references[1:],
134+
}
135+
],
136+
},
137+
},
138+
}
139+
)
140+
141+
@property
142+
def issues(self) -> set[Issue]:
143+
return {self.gturri_issue}
144+
145+
@property
146+
def issues_json(self) -> str:
147+
convert_to_json = list(_issues_as_json_str(self.issues))
148+
return convert_to_json[0]
149+
150+
@property
151+
def gh_security_issues(self):
152+
yield "I_kwDOKj3wMM50puMN", self.gturri_issue.cve
153+
154+
@property
155+
def create_issues_json(self) -> str:
156+
issues_dict = json.loads(self.issues_json)
157+
issues_dict["issue_url"] = self.github_issue_url
158+
return json.dumps(issues_dict)
159+
160+
81161
@pytest.fixture(scope="session")
82162
def sample_vulnerability() -> SampleVulnerability:
83163
return SampleVulnerability()
164+
165+
166+
@pytest.fixture(scope="session")
167+
def sample_maven_vulnerabilities() -> SampleMavenVulnerabilities:
168+
return SampleMavenVulnerabilities()

test/integration/cli/issue-install-if-github-directory-exist.t

Lines changed: 0 additions & 7 deletions
This file was deleted.

test/integration/cli/issue-install-if-issue-exist

Lines changed: 0 additions & 12 deletions
This file was deleted.

test/integration/cli/issue-install.t

Lines changed: 0 additions & 13 deletions
This file was deleted.

test/integration/cli/issue-list.t

Lines changed: 0 additions & 9 deletions
This file was deleted.

test/integration/cli/security-cve-convert.t

Lines changed: 0 additions & 123 deletions
This file was deleted.

0 commit comments

Comments
 (0)