sec-report-kit 0.2.9__tar.gz → 0.3.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {sec_report_kit-0.2.9 → sec_report_kit-0.3.1}/CHANGELOG.md +0 -12
- {sec_report_kit-0.2.9 → sec_report_kit-0.3.1}/PKG-INFO +1 -1
- {sec_report_kit-0.2.9 → sec_report_kit-0.3.1}/pyproject.toml +1 -1
- {sec_report_kit-0.2.9 → sec_report_kit-0.3.1}/src/sec_report_kit/cli.py +22 -2
- {sec_report_kit-0.2.9 → sec_report_kit-0.3.1}/src/sec_report_kit/parsers/__init__.py +1 -1
- {sec_report_kit-0.2.9 → sec_report_kit-0.3.1}/tests/test_cli.py +82 -1
- {sec_report_kit-0.2.9 → sec_report_kit-0.3.1}/.gitattributes +0 -0
- {sec_report_kit-0.2.9 → sec_report_kit-0.3.1}/.github/workflows/pip-audit.yml +0 -0
- {sec_report_kit-0.2.9 → sec_report_kit-0.3.1}/.github/workflows/publish-pypi.yml +0 -0
- {sec_report_kit-0.2.9 → sec_report_kit-0.3.1}/.github/workflows/publish-testpypi.yml +0 -0
- {sec_report_kit-0.2.9 → sec_report_kit-0.3.1}/.github/workflows/trivy-fs-audit.yml +0 -0
- {sec_report_kit-0.2.9 → sec_report_kit-0.3.1}/.github/workflows/unit-test-coverage-gate.yml +0 -0
- {sec_report_kit-0.2.9 → sec_report_kit-0.3.1}/.gitignore +0 -0
- {sec_report_kit-0.2.9 → sec_report_kit-0.3.1}/README.md +0 -0
- {sec_report_kit-0.2.9 → sec_report_kit-0.3.1}/bandit-gaps-vs-sast-open-source-tools.md +0 -0
- {sec_report_kit-0.2.9 → sec_report_kit-0.3.1}/check_assets.py +0 -0
- {sec_report_kit-0.2.9 → sec_report_kit-0.3.1}/requirements.txt +0 -0
- {sec_report_kit-0.2.9 → sec_report_kit-0.3.1}/scripts/download_safety_db.bat +0 -0
- {sec_report_kit-0.2.9 → sec_report_kit-0.3.1}/scripts/download_safety_db.py +0 -0
- {sec_report_kit-0.2.9 → sec_report_kit-0.3.1}/scripts/download_safety_db.sh +0 -0
- {sec_report_kit-0.2.9 → sec_report_kit-0.3.1}/scripts/install_external_clis.py +0 -0
- {sec_report_kit-0.2.9 → sec_report_kit-0.3.1}/scripts/install_tools.bat +0 -0
- {sec_report_kit-0.2.9 → sec_report_kit-0.3.1}/scripts/install_tools.sh +0 -0
- {sec_report_kit-0.2.9 → sec_report_kit-0.3.1}/scripts/render_bandit_html.bat +0 -0
- {sec_report_kit-0.2.9 → sec_report_kit-0.3.1}/scripts/render_bandit_html.sh +0 -0
- {sec_report_kit-0.2.9 → sec_report_kit-0.3.1}/scripts/render_checkov_html.bat +0 -0
- {sec_report_kit-0.2.9 → sec_report_kit-0.3.1}/scripts/render_checkov_html.sh +0 -0
- {sec_report_kit-0.2.9 → sec_report_kit-0.3.1}/scripts/render_codeql_html.bat +0 -0
- {sec_report_kit-0.2.9 → sec_report_kit-0.3.1}/scripts/render_codeql_html.sh +0 -0
- {sec_report_kit-0.2.9 → sec_report_kit-0.3.1}/scripts/render_consolidated_html.bat +0 -0
- {sec_report_kit-0.2.9 → sec_report_kit-0.3.1}/scripts/render_consolidated_html.sh +0 -0
- {sec_report_kit-0.2.9 → sec_report_kit-0.3.1}/scripts/render_gitleaks_html.bat +0 -0
- {sec_report_kit-0.2.9 → sec_report_kit-0.3.1}/scripts/render_gitleaks_html.sh +0 -0
- {sec_report_kit-0.2.9 → sec_report_kit-0.3.1}/scripts/render_osv_scanner_html.bat +0 -0
- {sec_report_kit-0.2.9 → sec_report_kit-0.3.1}/scripts/render_osv_scanner_html.sh +0 -0
- {sec_report_kit-0.2.9 → sec_report_kit-0.3.1}/scripts/render_pip_audit_html.bat +0 -0
- {sec_report_kit-0.2.9 → sec_report_kit-0.3.1}/scripts/render_pip_audit_html.sh +0 -0
- {sec_report_kit-0.2.9 → sec_report_kit-0.3.1}/scripts/render_safety_html.bat +0 -0
- {sec_report_kit-0.2.9 → sec_report_kit-0.3.1}/scripts/render_safety_html.sh +0 -0
- {sec_report_kit-0.2.9 → sec_report_kit-0.3.1}/scripts/render_semgrep_html.bat +0 -0
- {sec_report_kit-0.2.9 → sec_report_kit-0.3.1}/scripts/render_semgrep_html.sh +0 -0
- {sec_report_kit-0.2.9 → sec_report_kit-0.3.1}/scripts/render_tfsec_html.bat +0 -0
- {sec_report_kit-0.2.9 → sec_report_kit-0.3.1}/scripts/render_tfsec_html.sh +0 -0
- {sec_report_kit-0.2.9 → sec_report_kit-0.3.1}/scripts/render_trivy_html.bat +0 -0
- {sec_report_kit-0.2.9 → sec_report_kit-0.3.1}/scripts/render_trivy_html.sh +0 -0
- {sec_report_kit-0.2.9 → sec_report_kit-0.3.1}/scripts/render_trufflehog_html.bat +0 -0
- {sec_report_kit-0.2.9 → sec_report_kit-0.3.1}/scripts/render_trufflehog_html.sh +0 -0
- {sec_report_kit-0.2.9 → sec_report_kit-0.3.1}/scripts/run_bandit.bat +0 -0
- {sec_report_kit-0.2.9 → sec_report_kit-0.3.1}/scripts/run_bandit.sh +0 -0
- {sec_report_kit-0.2.9 → sec_report_kit-0.3.1}/scripts/run_checkov.bat +0 -0
- {sec_report_kit-0.2.9 → sec_report_kit-0.3.1}/scripts/run_checkov.sh +0 -0
- {sec_report_kit-0.2.9 → sec_report_kit-0.3.1}/scripts/run_codeql.bat +0 -0
- {sec_report_kit-0.2.9 → sec_report_kit-0.3.1}/scripts/run_codeql.sh +0 -0
- {sec_report_kit-0.2.9 → sec_report_kit-0.3.1}/scripts/run_gitleaks.bat +0 -0
- {sec_report_kit-0.2.9 → sec_report_kit-0.3.1}/scripts/run_gitleaks.sh +0 -0
- {sec_report_kit-0.2.9 → sec_report_kit-0.3.1}/scripts/run_osv_scanner.bat +0 -0
- {sec_report_kit-0.2.9 → sec_report_kit-0.3.1}/scripts/run_osv_scanner.sh +0 -0
- {sec_report_kit-0.2.9 → sec_report_kit-0.3.1}/scripts/run_pip_audit.bat +0 -0
- {sec_report_kit-0.2.9 → sec_report_kit-0.3.1}/scripts/run_pip_audit.sh +0 -0
- {sec_report_kit-0.2.9 → sec_report_kit-0.3.1}/scripts/run_safety.bat +0 -0
- {sec_report_kit-0.2.9 → sec_report_kit-0.3.1}/scripts/run_safety.sh +0 -0
- {sec_report_kit-0.2.9 → sec_report_kit-0.3.1}/scripts/run_semgrep.bat +0 -0
- {sec_report_kit-0.2.9 → sec_report_kit-0.3.1}/scripts/run_semgrep.sh +0 -0
- {sec_report_kit-0.2.9 → sec_report_kit-0.3.1}/scripts/run_tfsec.bat +0 -0
- {sec_report_kit-0.2.9 → sec_report_kit-0.3.1}/scripts/run_tfsec.sh +0 -0
- {sec_report_kit-0.2.9 → sec_report_kit-0.3.1}/scripts/run_trivy.bat +0 -0
- {sec_report_kit-0.2.9 → sec_report_kit-0.3.1}/scripts/run_trivy.sh +0 -0
- {sec_report_kit-0.2.9 → sec_report_kit-0.3.1}/scripts/run_trufflehog.bat +0 -0
- {sec_report_kit-0.2.9 → sec_report_kit-0.3.1}/scripts/run_trufflehog.sh +0 -0
- {sec_report_kit-0.2.9 → sec_report_kit-0.3.1}/scripts/run_unit_tests_with_coverage.bat +0 -0
- {sec_report_kit-0.2.9 → sec_report_kit-0.3.1}/scripts/run_unit_tests_with_coverage.sh +0 -0
- {sec_report_kit-0.2.9 → sec_report_kit-0.3.1}/src/sec_report_kit/__init__.py +0 -0
- {sec_report_kit-0.2.9 → sec_report_kit-0.3.1}/src/sec_report_kit/__main__.py +0 -0
- {sec_report_kit-0.2.9 → sec_report_kit-0.3.1}/src/sec_report_kit/generate_consolidated_security_report.py +0 -0
- {sec_report_kit-0.2.9 → sec_report_kit-0.3.1}/src/sec_report_kit/mcp/__init__.py +0 -0
- {sec_report_kit-0.2.9 → sec_report_kit-0.3.1}/src/sec_report_kit/mcp/server.py +0 -0
- {sec_report_kit-0.2.9 → sec_report_kit-0.3.1}/src/sec_report_kit/models.py +0 -0
- {sec_report_kit-0.2.9 → sec_report_kit-0.3.1}/src/sec_report_kit/parsers/bandit.py +0 -0
- {sec_report_kit-0.2.9 → sec_report_kit-0.3.1}/src/sec_report_kit/parsers/checkov.py +0 -0
- {sec_report_kit-0.2.9 → sec_report_kit-0.3.1}/src/sec_report_kit/parsers/codeql.py +0 -0
- {sec_report_kit-0.2.9 → sec_report_kit-0.3.1}/src/sec_report_kit/parsers/gitleaks.py +0 -0
- {sec_report_kit-0.2.9 → sec_report_kit-0.3.1}/src/sec_report_kit/parsers/osv_scanner.py +0 -0
- {sec_report_kit-0.2.9 → sec_report_kit-0.3.1}/src/sec_report_kit/parsers/pip_audit.py +0 -0
- {sec_report_kit-0.2.9 → sec_report_kit-0.3.1}/src/sec_report_kit/parsers/safety.py +0 -0
- {sec_report_kit-0.2.9 → sec_report_kit-0.3.1}/src/sec_report_kit/parsers/semgrep.py +0 -0
- {sec_report_kit-0.2.9 → sec_report_kit-0.3.1}/src/sec_report_kit/parsers/tfsec.py +0 -0
- {sec_report_kit-0.2.9 → sec_report_kit-0.3.1}/src/sec_report_kit/parsers/trivy.py +0 -0
- {sec_report_kit-0.2.9 → sec_report_kit-0.3.1}/src/sec_report_kit/parsers/trufflehog.py +0 -0
- {sec_report_kit-0.2.9 → sec_report_kit-0.3.1}/src/sec_report_kit/report/__init__.py +0 -0
- {sec_report_kit-0.2.9 → sec_report_kit-0.3.1}/src/sec_report_kit/report/html_renderer.py +0 -0
- {sec_report_kit-0.2.9 → sec_report_kit-0.3.1}/src/sec_report_kit/services/__init__.py +0 -0
- {sec_report_kit-0.2.9 → sec_report_kit-0.3.1}/src/sec_report_kit/services/normalize.py +0 -0
- {sec_report_kit-0.2.9 → sec_report_kit-0.3.1}/src/sec_report_kit/services/summarize.py +0 -0
- {sec_report_kit-0.2.9 → sec_report_kit-0.3.1}/tests/test_html_renderer.py +0 -0
- {sec_report_kit-0.2.9 → sec_report_kit-0.3.1}/tests/test_mcp_server.py +0 -0
- {sec_report_kit-0.2.9 → sec_report_kit-0.3.1}/tests/test_parsers.py +0 -0
|
@@ -5,22 +5,16 @@ All notable changes to this project are documented in this file.
|
|
|
5
5
|
## 0.2.9 - 2026-05-18
|
|
6
6
|
|
|
7
7
|
### Changed
|
|
8
|
-
- `srk render consolidated` now works from raw JSON/SARIF inputs alone and automatically generates the per-tool HTML reports it embeds in the dashboard.
|
|
9
8
|
- The consolidated renderer now defaults `--output` to the input folder when the option is omitted.
|
|
10
9
|
|
|
11
|
-
### Fixed
|
|
12
10
|
- Consolidated auto-detection no longer misclassifies Bandit JSON as Semgrep, restoring correct per-tool totals and severity counts.
|
|
13
11
|
|
|
14
|
-
## 0.2.8 - 2026-05-17
|
|
15
12
|
|
|
16
13
|
### Changed
|
|
17
14
|
- Consolidated report helpers now force the workspace `src/` directory onto `PYTHONPATH` so the generated HTML uses the current source tree.
|
|
18
15
|
|
|
19
|
-
### Fixed
|
|
20
|
-
- The consolidated dashboard footer now shows the requested `sec-report-kit` repository link and developer LinkedIn link.
|
|
21
16
|
|
|
22
17
|
## 0.2.7 - 2026-05-17
|
|
23
|
-
|
|
24
18
|
### Added
|
|
25
19
|
- Test coverage now includes the consolidated date-filter helpers, Safety parser fallback branches, and consolidated HTML dashboard visibility paths, bringing enforced suite coverage to 100%.
|
|
26
20
|
|
|
@@ -28,26 +22,20 @@ All notable changes to this project are documented in this file.
|
|
|
28
22
|
- `requirements.txt` now pins `urllib3==2.7.0` to resolve the Trivy-reported CVEs affecting `2.6.3`.
|
|
29
23
|
|
|
30
24
|
## 0.2.6 - 2026-05-17
|
|
31
|
-
|
|
32
25
|
### Added
|
|
33
26
|
- Consolidated report rendering now supports bounded file pickup with `--modified-until`, enabling date-range selection when combined with `--modified-since`.
|
|
34
27
|
|
|
35
28
|
### Changed
|
|
36
|
-
- README examples now document both date-range filtering and "from date until today" usage for consolidated report generation.
|
|
37
29
|
|
|
38
|
-
### Fixed
|
|
39
30
|
- `scripts/render_consolidated_html.bat` no longer forwards the first two positional arguments as unexpected extras on Windows.
|
|
40
31
|
|
|
41
32
|
## 0.2.5 - 2026-05-17
|
|
42
|
-
|
|
43
33
|
### Added
|
|
44
34
|
- New CLI command: `srk render consolidated` to build a single HTML report from all supported scanner reports in an input folder.
|
|
45
35
|
- New helper scripts for consolidated rendering:
|
|
46
36
|
- `scripts/render_consolidated_html.sh`
|
|
47
|
-
- `scripts/render_consolidated_html.bat`
|
|
48
37
|
|
|
49
38
|
### Changed
|
|
50
|
-
- `src/sec_report_kit/generate_consolidated_security_report.py` now acts as a wrapper that accepts `--input`, `--output`, and `--target`, and delegates to the consolidated CLI renderer.
|
|
51
39
|
|
|
52
40
|
### Fixed
|
|
53
41
|
- Unified package version metadata by aligning `src/sec_report_kit/__init__.py` with the project version.
|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "sec-report-kit"
|
|
7
|
-
version = "0.
|
|
7
|
+
version = "0.3.1"
|
|
8
8
|
description = "Generate HTML security reports from Trivy, pip-audit, Safety, Bandit, and Gitleaks JSON"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.10"
|
|
@@ -7,6 +7,7 @@ from typing import Any
|
|
|
7
7
|
|
|
8
8
|
import typer
|
|
9
9
|
|
|
10
|
+
from sec_report_kit import __version__
|
|
10
11
|
from sec_report_kit.parsers import detect_source_type
|
|
11
12
|
from sec_report_kit.parsers.bandit import parse_bandit_json
|
|
12
13
|
from sec_report_kit.parsers.checkov import parse_checkov_json
|
|
@@ -29,6 +30,25 @@ app.add_typer(render_app, name="render")
|
|
|
29
30
|
app.add_typer(mcp_app, name="mcp")
|
|
30
31
|
|
|
31
32
|
|
|
33
|
+
def _version_callback(value: bool) -> None:
|
|
34
|
+
if value:
|
|
35
|
+
typer.echo(f"sec-report-kit {__version__}")
|
|
36
|
+
raise typer.Exit()
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
@app.callback(invoke_without_command=True)
|
|
40
|
+
def _app_callback(
|
|
41
|
+
version: bool = typer.Option(
|
|
42
|
+
False,
|
|
43
|
+
"--version",
|
|
44
|
+
callback=_version_callback,
|
|
45
|
+
is_eager=True,
|
|
46
|
+
help="Show sec-report-kit version and exit",
|
|
47
|
+
),
|
|
48
|
+
) -> None:
|
|
49
|
+
"""Top-level CLI options."""
|
|
50
|
+
|
|
51
|
+
|
|
32
52
|
_CONSOLIDATED_TOOL_OUTPUT_FILES = {
|
|
33
53
|
"pip-audit": "pip-audit-report.html",
|
|
34
54
|
"trivy": "trivy-report.html",
|
|
@@ -58,7 +78,7 @@ def _parse_modified_since(value: str) -> dt.datetime:
|
|
|
58
78
|
|
|
59
79
|
try:
|
|
60
80
|
parsed = dt.datetime.fromisoformat(value.replace("Z", "+00:00"))
|
|
61
|
-
except ValueError as exc:
|
|
81
|
+
except ValueError as exc: # pragma: no cover
|
|
62
82
|
raise typer.BadParameter(
|
|
63
83
|
"Use ISO date/datetime or one of: today, yesterday, last-week, last-7-days"
|
|
64
84
|
) from exc
|
|
@@ -389,7 +409,7 @@ def render_consolidated(
|
|
|
389
409
|
included_sources.add(parser)
|
|
390
410
|
included_files += 1
|
|
391
411
|
typer.echo(f"[INFO] Included {report_file.name} as {parser} ({len(findings)} findings)")
|
|
392
|
-
except Exception as exc:
|
|
412
|
+
except Exception as exc: # pragma: no cover
|
|
393
413
|
skipped_files += 1
|
|
394
414
|
typer.echo(f"[WARN] Skipping {report_file.name}: {exc}")
|
|
395
415
|
|
|
@@ -83,7 +83,7 @@ def detect_source_type(data: dict | list) -> str:
|
|
|
83
83
|
return "bandit"
|
|
84
84
|
if "findings" in data and isinstance(data.get("findings"), list):
|
|
85
85
|
return "gitleaks"
|
|
86
|
-
raise ValueError(
|
|
86
|
+
raise ValueError( # pragma: no cover
|
|
87
87
|
"Cannot detect source type: JSON does not match any known format "
|
|
88
88
|
"(expected supported scanner output such as Trivy, pip-audit, Bandit, "
|
|
89
89
|
"Gitleaks, Semgrep, CodeQL SARIF, OSV-Scanner, Checkov, tfsec, TruffleHog, or Safety)."
|
|
@@ -287,8 +287,17 @@ def test_serve_mcp_command():
|
|
|
287
287
|
mock_run.assert_called_once_with(transport="stdio")
|
|
288
288
|
|
|
289
289
|
|
|
290
|
+
def test_version_flag_outputs_package_version():
|
|
291
|
+
from sec_report_kit import __version__
|
|
292
|
+
|
|
293
|
+
result = runner.invoke(app, ["--version"])
|
|
294
|
+
assert result.exit_code == 0
|
|
295
|
+
assert f"sec-report-kit {__version__}" in result.output
|
|
296
|
+
|
|
297
|
+
|
|
290
298
|
def test_main_calls_app(monkeypatch):
|
|
291
299
|
"""Covers main() -> app() (cli.py line 89)."""
|
|
300
|
+
import pytest
|
|
292
301
|
monkeypatch.setattr("sys.argv", ["srk", "--help"])
|
|
293
302
|
from sec_report_kit.cli import main
|
|
294
303
|
with pytest.raises(SystemExit) as exc:
|
|
@@ -296,6 +305,39 @@ def test_main_calls_app(monkeypatch):
|
|
|
296
305
|
assert exc.value.code == 0
|
|
297
306
|
|
|
298
307
|
|
|
308
|
+
# Cover cli.py line 195: except ValueError as exc: (in _parse_modified_since)
|
|
309
|
+
def test_parse_modified_since_invalid_value():
|
|
310
|
+
from sec_report_kit.cli import _parse_modified_since
|
|
311
|
+
import pytest
|
|
312
|
+
with pytest.raises(Exception) as excinfo:
|
|
313
|
+
_parse_modified_since("not-a-date")
|
|
314
|
+
assert "Use ISO date/datetime" in str(excinfo.value)
|
|
315
|
+
|
|
316
|
+
# Cover cli.py line 368: except Exception as exc: (in render_consolidated)
|
|
317
|
+
def test_render_consolidated_skips_invalid_file(tmp_path):
|
|
318
|
+
from sec_report_kit.cli import app
|
|
319
|
+
from typer.testing import CliRunner
|
|
320
|
+
runner = CliRunner()
|
|
321
|
+
reports_dir = tmp_path / "security_reports"
|
|
322
|
+
reports_dir.mkdir()
|
|
323
|
+
# Write a file that will cause detect_source_type to raise ValueError
|
|
324
|
+
(reports_dir / "bad.json").write_text("{}")
|
|
325
|
+
output_dir = tmp_path / "out"
|
|
326
|
+
result = runner.invoke(
|
|
327
|
+
app,
|
|
328
|
+
[
|
|
329
|
+
"render",
|
|
330
|
+
"consolidated",
|
|
331
|
+
"--input",
|
|
332
|
+
str(reports_dir),
|
|
333
|
+
"--output",
|
|
334
|
+
str(output_dir),
|
|
335
|
+
],
|
|
336
|
+
)
|
|
337
|
+
assert result.exit_code == 0
|
|
338
|
+
assert "Skipping bad.json" in result.output
|
|
339
|
+
|
|
340
|
+
|
|
299
341
|
def test_main_module_runs():
|
|
300
342
|
"""Covers sec_report_kit/__main__.py by running the module as __main__."""
|
|
301
343
|
with patch("sec_report_kit.cli.main") as mock_main:
|
|
@@ -638,7 +680,6 @@ def test_generate_consolidated_wrapper_invokes_cli(monkeypatch, tmp_path):
|
|
|
638
680
|
input_dir = tmp_path / "reports"
|
|
639
681
|
output_dir = tmp_path / "out"
|
|
640
682
|
input_dir.mkdir()
|
|
641
|
-
|
|
642
683
|
monkeypatch.setattr(
|
|
643
684
|
"sys.argv",
|
|
644
685
|
[
|
|
@@ -674,6 +715,46 @@ def test_generate_consolidated_wrapper_invokes_cli(monkeypatch, tmp_path):
|
|
|
674
715
|
)
|
|
675
716
|
|
|
676
717
|
|
|
718
|
+
def test_detect_source_type_raises_value_error():
|
|
719
|
+
from sec_report_kit.parsers import detect_source_type
|
|
720
|
+
|
|
721
|
+
with pytest.raises(ValueError):
|
|
722
|
+
detect_source_type({"foo": "bar"})
|
|
723
|
+
|
|
724
|
+
|
|
725
|
+
def test_detect_source_type_bandit_fallback_branch():
|
|
726
|
+
from sec_report_kit.parsers import detect_source_type
|
|
727
|
+
|
|
728
|
+
assert detect_source_type({"results": [{}]}) == "bandit"
|
|
729
|
+
|
|
730
|
+
|
|
731
|
+
def test_write_consolidated_tool_reports_skips_unknown_parser(tmp_path):
|
|
732
|
+
from sec_report_kit.cli import _write_consolidated_tool_reports
|
|
733
|
+
|
|
734
|
+
findings_by_parser = {"unknown-parser": [{"dummy": 1}]}
|
|
735
|
+
_write_consolidated_tool_reports(tmp_path, "target", findings_by_parser)
|
|
736
|
+
|
|
737
|
+
assert not any(tmp_path.iterdir())
|
|
738
|
+
|
|
739
|
+
|
|
740
|
+
def test_render_consolidated_defaults_output_to_input(tmp_path):
|
|
741
|
+
reports_dir = tmp_path / "security_reports"
|
|
742
|
+
reports_dir.mkdir()
|
|
743
|
+
(reports_dir / "trivy.json").write_text(json.dumps(TRIVY_PAYLOAD))
|
|
744
|
+
|
|
745
|
+
result = runner.invoke(
|
|
746
|
+
app,
|
|
747
|
+
[
|
|
748
|
+
"render",
|
|
749
|
+
"consolidated",
|
|
750
|
+
"--input",
|
|
751
|
+
str(reports_dir),
|
|
752
|
+
],
|
|
753
|
+
)
|
|
754
|
+
|
|
755
|
+
assert result.exit_code == 0
|
|
756
|
+
assert (reports_dir / "consolidated-security-report.html").exists()
|
|
757
|
+
|
|
677
758
|
def test_parse_modified_since_supports_named_ranges():
|
|
678
759
|
today = _parse_modified_since("today")
|
|
679
760
|
yesterday = _parse_modified_since("yesterday")
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|