sec-report-kit 0.3.1__tar.gz → 0.3.3__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.
Files changed (98) hide show
  1. {sec_report_kit-0.3.1 → sec_report_kit-0.3.3}/CHANGELOG.md +11 -0
  2. {sec_report_kit-0.3.1 → sec_report_kit-0.3.3}/PKG-INFO +1 -1
  3. {sec_report_kit-0.3.1 → sec_report_kit-0.3.3}/pyproject.toml +2 -1
  4. sec_report_kit-0.3.3/scripts/run_all_security_scans.bat +129 -0
  5. sec_report_kit-0.3.3/scripts/run_all_security_scans.sh +104 -0
  6. {sec_report_kit-0.3.1 → sec_report_kit-0.3.3}/src/sec_report_kit/__init__.py +1 -1
  7. {sec_report_kit-0.3.1 → sec_report_kit-0.3.3}/src/sec_report_kit/cli.py +3 -1
  8. {sec_report_kit-0.3.1 → sec_report_kit-0.3.3}/tests/test_cli.py +30 -0
  9. {sec_report_kit-0.3.1 → sec_report_kit-0.3.3}/.gitattributes +0 -0
  10. {sec_report_kit-0.3.1 → sec_report_kit-0.3.3}/.github/workflows/pip-audit.yml +0 -0
  11. {sec_report_kit-0.3.1 → sec_report_kit-0.3.3}/.github/workflows/publish-pypi.yml +0 -0
  12. {sec_report_kit-0.3.1 → sec_report_kit-0.3.3}/.github/workflows/publish-testpypi.yml +0 -0
  13. {sec_report_kit-0.3.1 → sec_report_kit-0.3.3}/.github/workflows/trivy-fs-audit.yml +0 -0
  14. {sec_report_kit-0.3.1 → sec_report_kit-0.3.3}/.github/workflows/unit-test-coverage-gate.yml +0 -0
  15. {sec_report_kit-0.3.1 → sec_report_kit-0.3.3}/.gitignore +0 -0
  16. {sec_report_kit-0.3.1 → sec_report_kit-0.3.3}/README.md +0 -0
  17. {sec_report_kit-0.3.1 → sec_report_kit-0.3.3}/bandit-gaps-vs-sast-open-source-tools.md +0 -0
  18. {sec_report_kit-0.3.1 → sec_report_kit-0.3.3}/check_assets.py +0 -0
  19. {sec_report_kit-0.3.1 → sec_report_kit-0.3.3}/requirements.txt +0 -0
  20. {sec_report_kit-0.3.1 → sec_report_kit-0.3.3}/scripts/download_safety_db.bat +0 -0
  21. {sec_report_kit-0.3.1 → sec_report_kit-0.3.3}/scripts/download_safety_db.py +0 -0
  22. {sec_report_kit-0.3.1 → sec_report_kit-0.3.3}/scripts/download_safety_db.sh +0 -0
  23. {sec_report_kit-0.3.1 → sec_report_kit-0.3.3}/scripts/install_external_clis.py +0 -0
  24. {sec_report_kit-0.3.1 → sec_report_kit-0.3.3}/scripts/install_tools.bat +0 -0
  25. {sec_report_kit-0.3.1 → sec_report_kit-0.3.3}/scripts/install_tools.sh +0 -0
  26. {sec_report_kit-0.3.1 → sec_report_kit-0.3.3}/scripts/render_bandit_html.bat +0 -0
  27. {sec_report_kit-0.3.1 → sec_report_kit-0.3.3}/scripts/render_bandit_html.sh +0 -0
  28. {sec_report_kit-0.3.1 → sec_report_kit-0.3.3}/scripts/render_checkov_html.bat +0 -0
  29. {sec_report_kit-0.3.1 → sec_report_kit-0.3.3}/scripts/render_checkov_html.sh +0 -0
  30. {sec_report_kit-0.3.1 → sec_report_kit-0.3.3}/scripts/render_codeql_html.bat +0 -0
  31. {sec_report_kit-0.3.1 → sec_report_kit-0.3.3}/scripts/render_codeql_html.sh +0 -0
  32. {sec_report_kit-0.3.1 → sec_report_kit-0.3.3}/scripts/render_consolidated_html.bat +0 -0
  33. {sec_report_kit-0.3.1 → sec_report_kit-0.3.3}/scripts/render_consolidated_html.sh +0 -0
  34. {sec_report_kit-0.3.1 → sec_report_kit-0.3.3}/scripts/render_gitleaks_html.bat +0 -0
  35. {sec_report_kit-0.3.1 → sec_report_kit-0.3.3}/scripts/render_gitleaks_html.sh +0 -0
  36. {sec_report_kit-0.3.1 → sec_report_kit-0.3.3}/scripts/render_osv_scanner_html.bat +0 -0
  37. {sec_report_kit-0.3.1 → sec_report_kit-0.3.3}/scripts/render_osv_scanner_html.sh +0 -0
  38. {sec_report_kit-0.3.1 → sec_report_kit-0.3.3}/scripts/render_pip_audit_html.bat +0 -0
  39. {sec_report_kit-0.3.1 → sec_report_kit-0.3.3}/scripts/render_pip_audit_html.sh +0 -0
  40. {sec_report_kit-0.3.1 → sec_report_kit-0.3.3}/scripts/render_safety_html.bat +0 -0
  41. {sec_report_kit-0.3.1 → sec_report_kit-0.3.3}/scripts/render_safety_html.sh +0 -0
  42. {sec_report_kit-0.3.1 → sec_report_kit-0.3.3}/scripts/render_semgrep_html.bat +0 -0
  43. {sec_report_kit-0.3.1 → sec_report_kit-0.3.3}/scripts/render_semgrep_html.sh +0 -0
  44. {sec_report_kit-0.3.1 → sec_report_kit-0.3.3}/scripts/render_tfsec_html.bat +0 -0
  45. {sec_report_kit-0.3.1 → sec_report_kit-0.3.3}/scripts/render_tfsec_html.sh +0 -0
  46. {sec_report_kit-0.3.1 → sec_report_kit-0.3.3}/scripts/render_trivy_html.bat +0 -0
  47. {sec_report_kit-0.3.1 → sec_report_kit-0.3.3}/scripts/render_trivy_html.sh +0 -0
  48. {sec_report_kit-0.3.1 → sec_report_kit-0.3.3}/scripts/render_trufflehog_html.bat +0 -0
  49. {sec_report_kit-0.3.1 → sec_report_kit-0.3.3}/scripts/render_trufflehog_html.sh +0 -0
  50. {sec_report_kit-0.3.1 → sec_report_kit-0.3.3}/scripts/run_bandit.bat +0 -0
  51. {sec_report_kit-0.3.1 → sec_report_kit-0.3.3}/scripts/run_bandit.sh +0 -0
  52. {sec_report_kit-0.3.1 → sec_report_kit-0.3.3}/scripts/run_checkov.bat +0 -0
  53. {sec_report_kit-0.3.1 → sec_report_kit-0.3.3}/scripts/run_checkov.sh +0 -0
  54. {sec_report_kit-0.3.1 → sec_report_kit-0.3.3}/scripts/run_codeql.bat +0 -0
  55. {sec_report_kit-0.3.1 → sec_report_kit-0.3.3}/scripts/run_codeql.sh +0 -0
  56. {sec_report_kit-0.3.1 → sec_report_kit-0.3.3}/scripts/run_gitleaks.bat +0 -0
  57. {sec_report_kit-0.3.1 → sec_report_kit-0.3.3}/scripts/run_gitleaks.sh +0 -0
  58. {sec_report_kit-0.3.1 → sec_report_kit-0.3.3}/scripts/run_osv_scanner.bat +0 -0
  59. {sec_report_kit-0.3.1 → sec_report_kit-0.3.3}/scripts/run_osv_scanner.sh +0 -0
  60. {sec_report_kit-0.3.1 → sec_report_kit-0.3.3}/scripts/run_pip_audit.bat +0 -0
  61. {sec_report_kit-0.3.1 → sec_report_kit-0.3.3}/scripts/run_pip_audit.sh +0 -0
  62. {sec_report_kit-0.3.1 → sec_report_kit-0.3.3}/scripts/run_safety.bat +0 -0
  63. {sec_report_kit-0.3.1 → sec_report_kit-0.3.3}/scripts/run_safety.sh +0 -0
  64. {sec_report_kit-0.3.1 → sec_report_kit-0.3.3}/scripts/run_semgrep.bat +0 -0
  65. {sec_report_kit-0.3.1 → sec_report_kit-0.3.3}/scripts/run_semgrep.sh +0 -0
  66. {sec_report_kit-0.3.1 → sec_report_kit-0.3.3}/scripts/run_tfsec.bat +0 -0
  67. {sec_report_kit-0.3.1 → sec_report_kit-0.3.3}/scripts/run_tfsec.sh +0 -0
  68. {sec_report_kit-0.3.1 → sec_report_kit-0.3.3}/scripts/run_trivy.bat +0 -0
  69. {sec_report_kit-0.3.1 → sec_report_kit-0.3.3}/scripts/run_trivy.sh +0 -0
  70. {sec_report_kit-0.3.1 → sec_report_kit-0.3.3}/scripts/run_trufflehog.bat +0 -0
  71. {sec_report_kit-0.3.1 → sec_report_kit-0.3.3}/scripts/run_trufflehog.sh +0 -0
  72. {sec_report_kit-0.3.1 → sec_report_kit-0.3.3}/scripts/run_unit_tests_with_coverage.bat +0 -0
  73. {sec_report_kit-0.3.1 → sec_report_kit-0.3.3}/scripts/run_unit_tests_with_coverage.sh +0 -0
  74. {sec_report_kit-0.3.1 → sec_report_kit-0.3.3}/src/sec_report_kit/__main__.py +0 -0
  75. {sec_report_kit-0.3.1 → sec_report_kit-0.3.3}/src/sec_report_kit/generate_consolidated_security_report.py +0 -0
  76. {sec_report_kit-0.3.1 → sec_report_kit-0.3.3}/src/sec_report_kit/mcp/__init__.py +0 -0
  77. {sec_report_kit-0.3.1 → sec_report_kit-0.3.3}/src/sec_report_kit/mcp/server.py +0 -0
  78. {sec_report_kit-0.3.1 → sec_report_kit-0.3.3}/src/sec_report_kit/models.py +0 -0
  79. {sec_report_kit-0.3.1 → sec_report_kit-0.3.3}/src/sec_report_kit/parsers/__init__.py +0 -0
  80. {sec_report_kit-0.3.1 → sec_report_kit-0.3.3}/src/sec_report_kit/parsers/bandit.py +0 -0
  81. {sec_report_kit-0.3.1 → sec_report_kit-0.3.3}/src/sec_report_kit/parsers/checkov.py +0 -0
  82. {sec_report_kit-0.3.1 → sec_report_kit-0.3.3}/src/sec_report_kit/parsers/codeql.py +0 -0
  83. {sec_report_kit-0.3.1 → sec_report_kit-0.3.3}/src/sec_report_kit/parsers/gitleaks.py +0 -0
  84. {sec_report_kit-0.3.1 → sec_report_kit-0.3.3}/src/sec_report_kit/parsers/osv_scanner.py +0 -0
  85. {sec_report_kit-0.3.1 → sec_report_kit-0.3.3}/src/sec_report_kit/parsers/pip_audit.py +0 -0
  86. {sec_report_kit-0.3.1 → sec_report_kit-0.3.3}/src/sec_report_kit/parsers/safety.py +0 -0
  87. {sec_report_kit-0.3.1 → sec_report_kit-0.3.3}/src/sec_report_kit/parsers/semgrep.py +0 -0
  88. {sec_report_kit-0.3.1 → sec_report_kit-0.3.3}/src/sec_report_kit/parsers/tfsec.py +0 -0
  89. {sec_report_kit-0.3.1 → sec_report_kit-0.3.3}/src/sec_report_kit/parsers/trivy.py +0 -0
  90. {sec_report_kit-0.3.1 → sec_report_kit-0.3.3}/src/sec_report_kit/parsers/trufflehog.py +0 -0
  91. {sec_report_kit-0.3.1 → sec_report_kit-0.3.3}/src/sec_report_kit/report/__init__.py +0 -0
  92. {sec_report_kit-0.3.1 → sec_report_kit-0.3.3}/src/sec_report_kit/report/html_renderer.py +0 -0
  93. {sec_report_kit-0.3.1 → sec_report_kit-0.3.3}/src/sec_report_kit/services/__init__.py +0 -0
  94. {sec_report_kit-0.3.1 → sec_report_kit-0.3.3}/src/sec_report_kit/services/normalize.py +0 -0
  95. {sec_report_kit-0.3.1 → sec_report_kit-0.3.3}/src/sec_report_kit/services/summarize.py +0 -0
  96. {sec_report_kit-0.3.1 → sec_report_kit-0.3.3}/tests/test_html_renderer.py +0 -0
  97. {sec_report_kit-0.3.1 → sec_report_kit-0.3.3}/tests/test_mcp_server.py +0 -0
  98. {sec_report_kit-0.3.1 → sec_report_kit-0.3.3}/tests/test_parsers.py +0 -0
@@ -2,6 +2,17 @@
2
2
 
3
3
  All notable changes to this project are documented in this file.
4
4
 
5
+ ## 0.3.3 - 2026-05-21
6
+
7
+ ### Added
8
+ - Added `sec_report_kit` console script alias alongside `srk` and `sec-report-kit`.
9
+
10
+ ### Changed
11
+ - CLI startup now suppresses the ASCII banner for `--help` and `--version` so these flags output only command help/version details.
12
+
13
+ ### Tests
14
+ - Added regression tests for top-level `--help` and `--version` banner behavior.
15
+
5
16
  ## 0.2.9 - 2026-05-18
6
17
 
7
18
  ### Changed
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sec-report-kit
3
- Version: 0.3.1
3
+ Version: 0.3.3
4
4
  Summary: Generate HTML security reports from Trivy, pip-audit, Safety, Bandit, and Gitleaks JSON
5
5
  Author: Ravi Konduru
6
6
  License: MIT
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "sec-report-kit"
7
- version = "0.3.1"
7
+ version = "0.3.3"
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"
@@ -39,6 +39,7 @@ dev = [
39
39
 
40
40
  [project.scripts]
41
41
  srk = "sec_report_kit.cli:main"
42
+ sec_report_kit = "sec_report_kit.cli:main"
42
43
  "sec-report-kit" = "sec_report_kit.cli:main"
43
44
 
44
45
  [tool.hatch.build.targets.wheel]
@@ -0,0 +1,129 @@
1
+ @echo off
2
+ REM Master script to run all security scans one by one
3
+ REM Each scan launches in a new command window
4
+ REM Opens the consolidated HTML report at the end
5
+
6
+ setlocal enabledelayedexpansion
7
+
8
+ cd /d "%~dp0\.."
9
+
10
+ echo.
11
+ echo ========================================
12
+ echo Running All Security Scans
13
+ echo ========================================
14
+ echo.
15
+
16
+ set REPORT_DIR=security_reports
17
+ if not exist "%REPORT_DIR%" mkdir "%REPORT_DIR%"
18
+
19
+ REM Use absolute path for report directory
20
+ for %%I in ("%~dp0..") do set "PROJECT_ROOT=%%~fI"
21
+ set "REPORT_DIR=%PROJECT_ROOT%\security_reports"
22
+ if not exist "%REPORT_DIR%" mkdir "%REPORT_DIR%"
23
+
24
+ REM Run Bandit
25
+ echo Starting: Bandit scan...
26
+ start "Bandit Scan" /wait cmd /c "cd /d %CD%\scripts && call run_bandit.bat "%REPORT_DIR%" "%PROJECT_ROOT%""
27
+ echo Completed: Bandit scan
28
+ echo Rendering Bandit report...
29
+ call scripts\render_bandit_html.bat "%REPORT_DIR%" "%PROJECT_ROOT%"
30
+ echo.
31
+
32
+ REM Run Checkov
33
+ echo Starting: Checkov scan...
34
+ start "Checkov Scan" /wait cmd /c "cd /d %CD%\scripts && call run_checkov.bat "%REPORT_DIR%" "%PROJECT_ROOT%""
35
+ echo Completed: Checkov scan
36
+ echo Rendering Checkov report...
37
+ call scripts\render_checkov_html.bat "%REPORT_DIR%" "%PROJECT_ROOT%"
38
+ echo.
39
+
40
+ REM Run CodeQL
41
+ echo Starting: CodeQL scan...
42
+ start "CodeQL Scan" /wait cmd /c "cd /d %CD%\scripts && call run_codeql.bat "%REPORT_DIR%" "%PROJECT_ROOT%""
43
+ echo Completed: CodeQL scan
44
+ echo Rendering CodeQL report...
45
+ call scripts\render_codeql_html.bat "%REPORT_DIR%" "%PROJECT_ROOT%"
46
+ echo.
47
+
48
+ REM Run Gitleaks
49
+ echo Starting: Gitleaks scan...
50
+ start "Gitleaks Scan" /wait cmd /c "cd /d %CD%\scripts && call run_gitleaks.bat "%REPORT_DIR%" "%PROJECT_ROOT%""
51
+ echo Completed: Gitleaks scan
52
+ echo Rendering Gitleaks report...
53
+ call scripts\render_gitleaks_html.bat "%REPORT_DIR%" "%PROJECT_ROOT%"
54
+ echo.
55
+
56
+ REM Run OSV Scanner
57
+ echo Starting: OSV Scanner scan...
58
+ start "OSV Scanner Scan" /wait cmd /c "cd /d %CD%\scripts && call run_osv_scanner.bat "%REPORT_DIR%" "%PROJECT_ROOT%""
59
+ echo Completed: OSV Scanner scan
60
+ echo Rendering OSV Scanner report...
61
+ call scripts\render_osv_scanner_html.bat "%REPORT_DIR%" "%PROJECT_ROOT%"
62
+ echo.
63
+
64
+ REM Run Pip Audit
65
+ echo Starting: Pip Audit scan...
66
+ start "Pip Audit Scan" /wait cmd /c "cd /d %CD%\scripts && call run_pip_audit.bat "%REPORT_DIR%" "%PROJECT_ROOT%""
67
+ echo Completed: Pip Audit scan
68
+ echo Rendering Pip Audit report...
69
+ call scripts\render_pip_audit_html.bat "%REPORT_DIR%" "%PROJECT_ROOT%"
70
+ echo.
71
+
72
+ REM Run Safety
73
+ echo Starting: Safety scan...
74
+ start "Safety Scan" /wait cmd /c "cd /d %CD%\scripts && call run_safety.bat "%REPORT_DIR%" "%PROJECT_ROOT%""
75
+ echo Completed: Safety scan
76
+ echo Rendering Safety report...
77
+ call scripts\render_safety_html.bat "%REPORT_DIR%" "%PROJECT_ROOT%"
78
+ echo.
79
+
80
+ REM Run Semgrep
81
+ echo Starting: Semgrep scan...
82
+ start "Semgrep Scan" /wait cmd /c "cd /d %CD%\scripts && call run_semgrep.bat "%REPORT_DIR%" "%PROJECT_ROOT%""
83
+ echo Completed: Semgrep scan
84
+ echo Rendering Semgrep report...
85
+ call scripts\render_semgrep_html.bat "%REPORT_DIR%" "%PROJECT_ROOT%"
86
+ echo.
87
+
88
+ REM Run Tfsec
89
+ echo Starting: Tfsec scan...
90
+ start "Tfsec Scan" /wait cmd /c "cd /d %CD%\scripts && call run_tfsec.bat "%REPORT_DIR%" "%PROJECT_ROOT%""
91
+ echo Completed: Tfsec scan
92
+ echo Rendering Tfsec report...
93
+ call scripts\render_tfsec_html.bat "%REPORT_DIR%" "%PROJECT_ROOT%"
94
+ echo.
95
+
96
+ REM Run Trivy
97
+ echo Starting: Trivy scan...
98
+ start "Trivy Scan" /wait cmd /c "cd /d %CD%\scripts && call run_trivy.bat "%REPORT_DIR%" "%PROJECT_ROOT%""
99
+ echo Completed: Trivy scan
100
+ echo Rendering Trivy report...
101
+ call scripts\render_trivy_html.bat "%REPORT_DIR%" "%PROJECT_ROOT%"
102
+ echo.
103
+
104
+ REM Run Trufflehog
105
+ echo Starting: Trufflehog scan...
106
+ start "Trufflehog Scan" /wait cmd /c "cd /d %CD%\scripts && call run_trufflehog.bat "%REPORT_DIR%" "%PROJECT_ROOT%""
107
+ echo Completed: Trufflehog scan
108
+ echo Rendering Trufflehog report...
109
+ call scripts\render_trufflehog_html.bat "%REPORT_DIR%" "%PROJECT_ROOT%"
110
+ echo.
111
+
112
+ REM Generate consolidated report
113
+ echo.
114
+ echo ========================================
115
+ echo Generating Consolidated Report
116
+ echo ========================================
117
+ echo.
118
+ echo Rendering: Consolidated Security Report
119
+ call scripts\render_consolidated_html.bat "%REPORT_DIR%" "%PROJECT_ROOT%"
120
+ echo Completed: Consolidated Report
121
+ echo.
122
+
123
+ echo.
124
+ echo ========================================
125
+ echo All Security Scans Complete
126
+ echo ========================================
127
+ echo.
128
+
129
+ endlocal
@@ -0,0 +1,104 @@
1
+ #!/bin/bash
2
+
3
+ # Master script to run all security scans one by one
4
+ # Each scan launches in a new terminal window (for GUI systems)
5
+ # Opens the consolidated HTML report at the end
6
+
7
+ set -e # Exit on error
8
+
9
+ SCRIPTS_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
10
+ PROJECT_ROOT="$(dirname "$SCRIPTS_DIR")"
11
+ REPORT_DIR="$PROJECT_ROOT/security_reports"
12
+
13
+ cd "$PROJECT_ROOT"
14
+ mkdir -p "$REPORT_DIR"
15
+
16
+ echo ""
17
+ echo "========================================"
18
+ echo "Running All Security Scans"
19
+ echo "========================================"
20
+ echo ""
21
+
22
+ # Function to run a scan and render its report
23
+ run_scan_and_render() {
24
+ local scan_name=$1
25
+ local scan_script="run_${scan_name}.sh"
26
+ local render_script="render_${scan_name}_html.sh"
27
+
28
+ if [ ! -f "$SCRIPTS_DIR/$scan_script" ]; then
29
+ echo "WARNING: $scan_script not found, skipping..."
30
+ return
31
+ fi
32
+
33
+ echo "Starting: $scan_name scan..."
34
+ bash "$SCRIPTS_DIR/$scan_script" "$REPORT_DIR/" "$PROJECT_ROOT" || echo "WARNING: $scan_script failed"
35
+ echo "Completed: $scan_name scan"
36
+
37
+ if [ -f "$SCRIPTS_DIR/$render_script" ]; then
38
+ echo "Rendering: $scan_name report..."
39
+ bash "$SCRIPTS_DIR/$render_script" "$REPORT_DIR/" "$PROJECT_ROOT" || echo "WARNING: $render_script failed"
40
+ echo "Completed: $scan_name report"
41
+ fi
42
+ echo ""
43
+ }
44
+
45
+ # Run all security scans
46
+ run_scan_and_render "bandit"
47
+ run_scan_and_render "checkov"
48
+ run_scan_and_render "codeql"
49
+ run_scan_and_render "gitleaks"
50
+ run_scan_and_render "osv_scanner"
51
+ run_scan_and_render "pip_audit"
52
+ run_scan_and_render "safety"
53
+ run_scan_and_render "semgrep"
54
+ run_scan_and_render "tfsec"
55
+ run_scan_and_render "trivy"
56
+ run_scan_and_render "trufflehog"
57
+
58
+ # Generate consolidated report
59
+ echo ""
60
+ echo "========================================"
61
+ echo "Generating Consolidated Report"
62
+ echo "========================================"
63
+ echo ""
64
+
65
+ if [ -f "$SCRIPTS_DIR/render_consolidated_html.sh" ]; then
66
+ echo "Rendering: Consolidated Security Report"
67
+ bash "$SCRIPTS_DIR/render_consolidated_html.sh" "$REPORT_DIR" "$PROJECT_ROOT" || echo "WARNING: Consolidated report generation failed"
68
+ echo "Completed: Consolidated Report"
69
+ echo ""
70
+ fi
71
+
72
+ # Open the consolidated HTML report
73
+ CONSOLIDATED_REPORT="$REPORT_DIR/consolidated-security-report.html"
74
+
75
+ if [ -f "$CONSOLIDATED_REPORT" ]; then
76
+ echo ""
77
+ echo "========================================"
78
+ echo "Opening Consolidated Security Report"
79
+ echo "========================================"
80
+ echo ""
81
+
82
+ # Try different methods to open the report based on the OS
83
+ if command -v xdg-open &> /dev/null; then
84
+ # Linux
85
+ xdg-open "$CONSOLIDATED_REPORT"
86
+ elif command -v open &> /dev/null; then
87
+ # macOS
88
+ open "$CONSOLIDATED_REPORT"
89
+ else
90
+ echo "Could not automatically open report. Please open manually:"
91
+ echo "$CONSOLIDATED_REPORT"
92
+ fi
93
+
94
+ echo "Report opened"
95
+ else
96
+ echo ""
97
+ echo "WARNING: Consolidated report not found at: $CONSOLIDATED_REPORT"
98
+ fi
99
+
100
+ echo ""
101
+ echo "========================================"
102
+ echo "All Security Scans Complete"
103
+ echo "========================================"
104
+ echo ""
@@ -1,4 +1,4 @@
1
1
  """sec_report_kit package."""
2
2
 
3
3
  __all__ = ["__version__"]
4
- __version__ = "0.2.9"
4
+ __version__ = "0.3.3"
@@ -2,6 +2,7 @@ from __future__ import annotations
2
2
 
3
3
  import datetime as dt
4
4
  import json
5
+ import sys
5
6
  from pathlib import Path
6
7
  from typing import Any
7
8
 
@@ -467,7 +468,8 @@ ASCII_BANNER = """
467
468
 
468
469
 
469
470
  def main() -> None:
470
- typer.echo(ASCII_BANNER)
471
+ if not any(flag in sys.argv[1:] for flag in ("--help", "-h", "--version")):
472
+ typer.echo(ASCII_BANNER)
471
473
  app()
472
474
 
473
475
 
@@ -305,6 +305,36 @@ def test_main_calls_app(monkeypatch):
305
305
  assert exc.value.code == 0
306
306
 
307
307
 
308
+ def test_main_help_does_not_print_banner(monkeypatch, capsys):
309
+ import pytest
310
+
311
+ monkeypatch.setattr("sys.argv", ["srk", "--help"])
312
+ from sec_report_kit.cli import main
313
+
314
+ with pytest.raises(SystemExit) as exc:
315
+ main()
316
+
317
+ captured = capsys.readouterr()
318
+ assert exc.value.code == 0
319
+ assert "____ _____" not in captured.out
320
+
321
+
322
+ def test_main_version_does_not_print_banner(monkeypatch, capsys):
323
+ import pytest
324
+ from sec_report_kit import __version__
325
+
326
+ monkeypatch.setattr("sys.argv", ["srk", "--version"])
327
+ from sec_report_kit.cli import main
328
+
329
+ with pytest.raises(SystemExit) as exc:
330
+ main()
331
+
332
+ captured = capsys.readouterr()
333
+ assert exc.value.code == 0
334
+ assert f"sec-report-kit {__version__}" in captured.out
335
+ assert "____ _____" not in captured.out
336
+
337
+
308
338
  # Cover cli.py line 195: except ValueError as exc: (in _parse_modified_since)
309
339
  def test_parse_modified_since_invalid_value():
310
340
  from sec_report_kit.cli import _parse_modified_since
File without changes