Overview
`report_generator.py` has zero test coverage today. It owns all 4 output formats and any regression here would silently break user-facing reports. This is a great first contribution for anyone comfortable with `pytest`.
What Needs to Be Done
Create `tests/test_report_generator.py` covering:
JSON Report
CSV Report
PDF Report
HTML Report
Suggested Fixture (add to `tests/conftest.py`)
@pytest.fixture
def sample_vulnerabilities():
return [
{
"VulnerabilityID": "CVE-2023-1234",
"Severity": "CRITICAL",
"PkgName": "openssl",
"InstalledVersion": "1.0.0",
"Title": "Buffer overflow in openssl",
"CVSS": 9.8,
"Status": "fixed",
"Target": "python:3.9-slim",
"PrimaryURL": "https://nvd.nist.gov/vuln/detail/CVE-2023-1234"
}
]
Files
| File |
Action |
| `tests/test_report_generator.py` |
Create |
| `tests/conftest.py` |
Update with fixtures |
Acceptance Criteria
Skill Level
Beginner–Intermediate Python. Familiarity with `pytest` helpful but not required.
Related Files
- `report_generator.py`
- `docker_scanner.py` (also generates reports inline)
- `tests/conftest.py`
Overview
`report_generator.py` has zero test coverage today. It owns all 4 output formats and any regression here would silently break user-facing reports. This is a great first contribution for anyone comfortable with `pytest`.
What Needs to Be Done
Create `tests/test_report_generator.py` covering:
JSON Report
CSV Report
PDF Report
HTML Report
Suggested Fixture (add to `tests/conftest.py`)
Files
Acceptance Criteria
Skill Level
Beginner–Intermediate Python. Familiarity with `pytest` helpful but not required.
Related Files