Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions cve_bin_tool/mismatch_data/pypi/arrow/mismatch_relations.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
purls:
- pkg:pypi/arrow
invalid_vendors:
- apache
34 changes: 34 additions & 0 deletions test/test_no_scan_mode.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
from cve_bin_tool.sbom_manager.generate import SBOMGenerate

class FakeProduct:
def __init__(self, name, version):
self.product = name
self.version = version
self.source = "manual"
self.vendor = "UNKNOWN"

def test_generate_sbom_without_scan(tmp_path):
output_file = tmp_path / "sbom.json"

# Fake scan result object
fake_product = FakeProduct("zlib", "1.2.11")

all_product_data = [fake_product]
all_cve_data = {}

sbomgen = SBOMGenerate(
all_product_data=all_product_data,
all_cve_data=all_cve_data,
filename=str(output_file),
sbom_type="spdx",
sbom_format="tag",
sbom_root="CVE_BIN_TOOL_TEST"
)

sbomgen.generate_sbom()

# Check the output file
assert output_file.exists()
content = output_file.read_text()
assert "zlib" in content
assert "1.2.11" in content
Loading