Skip to content

Commit aaac8d2

Browse files
committed
Apply Black formatting to OpenSSF malicious importer
Signed-off-by: Mrityunjay Raj [email protected]
1 parent 165791c commit aaac8d2

File tree

2 files changed

+17
-10
lines changed

2 files changed

+17
-10
lines changed

vulnerabilities/pipelines/v2_importers/openssf_malicious_importer.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,13 @@ def collect_advisories(self) -> Iterable[AdvisoryData]:
5959
# Ecosystems supported by both OpenSSF malicious-packages and VulnerableCode
6060
# Mapping: OSV ecosystem name -> purl type
6161
supported_ecosystems = [
62-
"pypi", # Python packages
63-
"npm", # JavaScript/Node.js packages
64-
"cargo", # Rust packages (crates.io)
65-
"gem", # Ruby packages (rubygems)
66-
"maven", # Java packages
67-
"nuget", # .NET packages
68-
"golang", # Go packages
62+
"pypi", # Python packages
63+
"npm", # JavaScript/Node.js packages
64+
"cargo", # Rust packages (crates.io)
65+
"gem", # Ruby packages (rubygems)
66+
"maven", # Java packages
67+
"nuget", # .NET packages
68+
"golang", # Go packages
6969
]
7070

7171
base_path = Path(self.vcs_response.dest_dir)

vulnerabilities/tests/pipelines/v2_importers/test_openssf_malicious_importer_v2.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,9 @@ def test_multiple_advisories(tmp_path: Path):
165165
{
166166
"id": "MAL-2025-0001",
167167
"summary": "Bad PyPI package",
168-
"affected": [{"package": {"ecosystem": "PyPI", "name": "bad-pkg"}, "versions": ["1.0"]}],
168+
"affected": [
169+
{"package": {"ecosystem": "PyPI", "name": "bad-pkg"}, "versions": ["1.0"]}
170+
],
169171
}
170172
)
171173
)
@@ -178,7 +180,9 @@ def test_multiple_advisories(tmp_path: Path):
178180
{
179181
"id": "MAL-2025-0002",
180182
"summary": "Bad npm package",
181-
"affected": [{"package": {"ecosystem": "npm", "name": "bad-js"}, "versions": ["2.0"]}],
183+
"affected": [
184+
{"package": {"ecosystem": "npm", "name": "bad-js"}, "versions": ["2.0"]}
185+
],
182186
}
183187
)
184188
)
@@ -212,7 +216,10 @@ def test_unsupported_ecosystem_skipped(tmp_path: Path):
212216
"id": "MAL-2025-9999",
213217
"summary": "Package in unsupported ecosystem",
214218
"affected": [
215-
{"package": {"ecosystem": "UnsupportedEcosystem", "name": "pkg"}, "versions": ["1.0"]}
219+
{
220+
"package": {"ecosystem": "UnsupportedEcosystem", "name": "pkg"},
221+
"versions": ["1.0"],
222+
}
216223
],
217224
}
218225
)

0 commit comments

Comments
 (0)