sec-report-kit 0.2.1__tar.gz → 0.2.2__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 (113) hide show
  1. {sec_report_kit-0.2.1 → sec_report_kit-0.2.2}/PKG-INFO +95 -21
  2. {sec_report_kit-0.2.1 → sec_report_kit-0.2.2}/README.md +94 -20
  3. sec_report_kit-0.2.2/class_index.html +341 -0
  4. sec_report_kit-0.2.2/coverage_html_cb_188fc9a4.js +735 -0
  5. sec_report_kit-0.2.2/favicon_32_cb_c827f16f.png +0 -0
  6. sec_report_kit-0.2.2/function_index.html +821 -0
  7. sec_report_kit-0.2.2/index.html +306 -0
  8. sec_report_kit-0.2.2/keybd_closed_cb_900cfef5.png +0 -0
  9. {sec_report_kit-0.2.1 → sec_report_kit-0.2.2}/pyproject.toml +1 -1
  10. sec_report_kit-0.2.2/scripts/install_external_clis.py +214 -0
  11. {sec_report_kit-0.2.1 → sec_report_kit-0.2.2}/scripts/install_tools.bat +8 -1
  12. {sec_report_kit-0.2.1 → sec_report_kit-0.2.2}/scripts/install_tools.sh +4 -1
  13. {sec_report_kit-0.2.1 → sec_report_kit-0.2.2}/scripts/render_bandit_html.bat +1 -1
  14. {sec_report_kit-0.2.1 → sec_report_kit-0.2.2}/scripts/render_bandit_html.sh +2 -1
  15. {sec_report_kit-0.2.1 → sec_report_kit-0.2.2}/scripts/render_checkov_html.bat +1 -1
  16. {sec_report_kit-0.2.1 → sec_report_kit-0.2.2}/scripts/render_checkov_html.sh +2 -1
  17. {sec_report_kit-0.2.1 → sec_report_kit-0.2.2}/scripts/render_codeql_html.bat +1 -1
  18. {sec_report_kit-0.2.1 → sec_report_kit-0.2.2}/scripts/render_codeql_html.sh +2 -1
  19. {sec_report_kit-0.2.1 → sec_report_kit-0.2.2}/scripts/render_gitleaks_html.bat +1 -1
  20. {sec_report_kit-0.2.1 → sec_report_kit-0.2.2}/scripts/render_gitleaks_html.sh +2 -1
  21. {sec_report_kit-0.2.1 → sec_report_kit-0.2.2}/scripts/render_osv_scanner_html.bat +1 -1
  22. {sec_report_kit-0.2.1 → sec_report_kit-0.2.2}/scripts/render_osv_scanner_html.sh +2 -1
  23. {sec_report_kit-0.2.1 → sec_report_kit-0.2.2}/scripts/render_pip_audit_html.bat +1 -1
  24. {sec_report_kit-0.2.1 → sec_report_kit-0.2.2}/scripts/render_pip_audit_html.sh +2 -1
  25. {sec_report_kit-0.2.1 → sec_report_kit-0.2.2}/scripts/render_semgrep_html.bat +1 -1
  26. {sec_report_kit-0.2.1 → sec_report_kit-0.2.2}/scripts/render_semgrep_html.sh +2 -1
  27. {sec_report_kit-0.2.1 → sec_report_kit-0.2.2}/scripts/render_tfsec_html.bat +1 -1
  28. {sec_report_kit-0.2.1 → sec_report_kit-0.2.2}/scripts/render_tfsec_html.sh +2 -1
  29. {sec_report_kit-0.2.1 → sec_report_kit-0.2.2}/scripts/render_trivy_html.bat +1 -1
  30. {sec_report_kit-0.2.1 → sec_report_kit-0.2.2}/scripts/render_trivy_html.sh +2 -1
  31. {sec_report_kit-0.2.1 → sec_report_kit-0.2.2}/scripts/render_trufflehog_html.bat +1 -1
  32. {sec_report_kit-0.2.1 → sec_report_kit-0.2.2}/scripts/render_trufflehog_html.sh +2 -1
  33. sec_report_kit-0.2.2/scripts/run_bandit.bat +34 -0
  34. sec_report_kit-0.2.2/scripts/run_bandit.sh +35 -0
  35. {sec_report_kit-0.2.1 → sec_report_kit-0.2.2}/scripts/run_codeql.sh +7 -2
  36. sec_report_kit-0.2.2/scripts/run_gitleaks.bat +35 -0
  37. sec_report_kit-0.2.2/scripts/run_gitleaks.sh +35 -0
  38. {sec_report_kit-0.2.1 → sec_report_kit-0.2.2}/scripts/run_osv_scanner.sh +7 -2
  39. {sec_report_kit-0.2.1 → sec_report_kit-0.2.2}/scripts/run_tfsec.sh +7 -2
  40. sec_report_kit-0.2.2/scripts/run_trivy.bat +27 -0
  41. sec_report_kit-0.2.2/scripts/run_trivy.sh +23 -0
  42. {sec_report_kit-0.2.1 → sec_report_kit-0.2.2}/scripts/run_trufflehog.sh +7 -2
  43. sec_report_kit-0.2.2/scripts/run_unit_tests_with_coverage.bat +25 -0
  44. {sec_report_kit-0.2.1 → sec_report_kit-0.2.2}/src/sec_report_kit/__init__.py +1 -1
  45. sec_report_kit-0.2.2/status.json +1 -0
  46. sec_report_kit-0.2.2/style_cb_5c747636.css +389 -0
  47. sec_report_kit-0.2.2/z_04615a1dd1ce4db0___init___py.html +160 -0
  48. sec_report_kit-0.2.2/z_04615a1dd1ce4db0_bandit_py.html +132 -0
  49. sec_report_kit-0.2.2/z_04615a1dd1ce4db0_checkov_py.html +126 -0
  50. sec_report_kit-0.2.2/z_04615a1dd1ce4db0_codeql_py.html +173 -0
  51. sec_report_kit-0.2.2/z_04615a1dd1ce4db0_gitleaks_py.html +139 -0
  52. sec_report_kit-0.2.2/z_04615a1dd1ce4db0_osv_scanner_py.html +157 -0
  53. sec_report_kit-0.2.2/z_04615a1dd1ce4db0_pip_audit_py.html +161 -0
  54. sec_report_kit-0.2.2/z_04615a1dd1ce4db0_semgrep_py.html +139 -0
  55. sec_report_kit-0.2.2/z_04615a1dd1ce4db0_tfsec_py.html +132 -0
  56. sec_report_kit-0.2.2/z_04615a1dd1ce4db0_trivy_py.html +123 -0
  57. sec_report_kit-0.2.2/z_04615a1dd1ce4db0_trufflehog_py.html +154 -0
  58. sec_report_kit-0.2.2/z_513b94261226dc0a___init___py.html +98 -0
  59. sec_report_kit-0.2.2/z_513b94261226dc0a_normalize_py.html +113 -0
  60. sec_report_kit-0.2.2/z_513b94261226dc0a_summarize_py.html +121 -0
  61. sec_report_kit-0.2.2/z_79d49abff220d1e3___init___py.html +101 -0
  62. sec_report_kit-0.2.2/z_79d49abff220d1e3___main___py.html +102 -0
  63. sec_report_kit-0.2.2/z_79d49abff220d1e3_cli_py.html +317 -0
  64. sec_report_kit-0.2.2/z_79d49abff220d1e3_models_py.html +113 -0
  65. sec_report_kit-0.2.2/z_b5cb2d0622dcf19f___init___py.html +98 -0
  66. sec_report_kit-0.2.2/z_b5cb2d0622dcf19f_html_renderer_py.html +311 -0
  67. sec_report_kit-0.2.2/z_dc88a0f48bfec113___init___py.html +98 -0
  68. sec_report_kit-0.2.2/z_dc88a0f48bfec113_server_py.html +191 -0
  69. sec_report_kit-0.2.1/scripts/run_unit_tests_with_coverage.bat +0 -14
  70. {sec_report_kit-0.2.1 → sec_report_kit-0.2.2}/.gitattributes +0 -0
  71. {sec_report_kit-0.2.1 → sec_report_kit-0.2.2}/.github/workflows/pip-audit.yml +0 -0
  72. {sec_report_kit-0.2.1 → sec_report_kit-0.2.2}/.github/workflows/publish-pypi.yml +0 -0
  73. {sec_report_kit-0.2.1 → sec_report_kit-0.2.2}/.github/workflows/publish-testpypi.yml +0 -0
  74. {sec_report_kit-0.2.1 → sec_report_kit-0.2.2}/.github/workflows/trivy-fs-audit.yml +0 -0
  75. {sec_report_kit-0.2.1 → sec_report_kit-0.2.2}/.github/workflows/unit-test-coverage-gate.yml +0 -0
  76. {sec_report_kit-0.2.1 → sec_report_kit-0.2.2}/.gitignore +0 -0
  77. {sec_report_kit-0.2.1 → sec_report_kit-0.2.2}/bandit-gaps-vs-sast-open-source-tools.md +0 -0
  78. {sec_report_kit-0.2.1 → sec_report_kit-0.2.2}/scripts/run_checkov.bat +0 -0
  79. {sec_report_kit-0.2.1 → sec_report_kit-0.2.2}/scripts/run_checkov.sh +0 -0
  80. {sec_report_kit-0.2.1 → sec_report_kit-0.2.2}/scripts/run_codeql.bat +0 -0
  81. {sec_report_kit-0.2.1 → sec_report_kit-0.2.2}/scripts/run_osv_scanner.bat +0 -0
  82. {sec_report_kit-0.2.1 → sec_report_kit-0.2.2}/scripts/run_pip_audit.bat +0 -0
  83. {sec_report_kit-0.2.1 → sec_report_kit-0.2.2}/scripts/run_pip_audit.sh +0 -0
  84. {sec_report_kit-0.2.1 → sec_report_kit-0.2.2}/scripts/run_semgrep.bat +0 -0
  85. {sec_report_kit-0.2.1 → sec_report_kit-0.2.2}/scripts/run_semgrep.sh +0 -0
  86. {sec_report_kit-0.2.1 → sec_report_kit-0.2.2}/scripts/run_tfsec.bat +0 -0
  87. {sec_report_kit-0.2.1 → sec_report_kit-0.2.2}/scripts/run_trufflehog.bat +0 -0
  88. {sec_report_kit-0.2.1 → sec_report_kit-0.2.2}/scripts/run_unit_tests_with_coverage.sh +0 -0
  89. {sec_report_kit-0.2.1 → sec_report_kit-0.2.2}/src/sec_report_kit/__main__.py +0 -0
  90. {sec_report_kit-0.2.1 → sec_report_kit-0.2.2}/src/sec_report_kit/cli.py +0 -0
  91. {sec_report_kit-0.2.1 → sec_report_kit-0.2.2}/src/sec_report_kit/mcp/__init__.py +0 -0
  92. {sec_report_kit-0.2.1 → sec_report_kit-0.2.2}/src/sec_report_kit/mcp/server.py +0 -0
  93. {sec_report_kit-0.2.1 → sec_report_kit-0.2.2}/src/sec_report_kit/models.py +0 -0
  94. {sec_report_kit-0.2.1 → sec_report_kit-0.2.2}/src/sec_report_kit/parsers/__init__.py +0 -0
  95. {sec_report_kit-0.2.1 → sec_report_kit-0.2.2}/src/sec_report_kit/parsers/bandit.py +0 -0
  96. {sec_report_kit-0.2.1 → sec_report_kit-0.2.2}/src/sec_report_kit/parsers/checkov.py +0 -0
  97. {sec_report_kit-0.2.1 → sec_report_kit-0.2.2}/src/sec_report_kit/parsers/codeql.py +0 -0
  98. {sec_report_kit-0.2.1 → sec_report_kit-0.2.2}/src/sec_report_kit/parsers/gitleaks.py +0 -0
  99. {sec_report_kit-0.2.1 → sec_report_kit-0.2.2}/src/sec_report_kit/parsers/osv_scanner.py +0 -0
  100. {sec_report_kit-0.2.1 → sec_report_kit-0.2.2}/src/sec_report_kit/parsers/pip_audit.py +0 -0
  101. {sec_report_kit-0.2.1 → sec_report_kit-0.2.2}/src/sec_report_kit/parsers/semgrep.py +0 -0
  102. {sec_report_kit-0.2.1 → sec_report_kit-0.2.2}/src/sec_report_kit/parsers/tfsec.py +0 -0
  103. {sec_report_kit-0.2.1 → sec_report_kit-0.2.2}/src/sec_report_kit/parsers/trivy.py +0 -0
  104. {sec_report_kit-0.2.1 → sec_report_kit-0.2.2}/src/sec_report_kit/parsers/trufflehog.py +0 -0
  105. {sec_report_kit-0.2.1 → sec_report_kit-0.2.2}/src/sec_report_kit/report/__init__.py +0 -0
  106. {sec_report_kit-0.2.1 → sec_report_kit-0.2.2}/src/sec_report_kit/report/html_renderer.py +0 -0
  107. {sec_report_kit-0.2.1 → sec_report_kit-0.2.2}/src/sec_report_kit/services/__init__.py +0 -0
  108. {sec_report_kit-0.2.1 → sec_report_kit-0.2.2}/src/sec_report_kit/services/normalize.py +0 -0
  109. {sec_report_kit-0.2.1 → sec_report_kit-0.2.2}/src/sec_report_kit/services/summarize.py +0 -0
  110. {sec_report_kit-0.2.1 → sec_report_kit-0.2.2}/tests/test_cli.py +0 -0
  111. {sec_report_kit-0.2.1 → sec_report_kit-0.2.2}/tests/test_html_renderer.py +0 -0
  112. {sec_report_kit-0.2.1 → sec_report_kit-0.2.2}/tests/test_mcp_server.py +0 -0
  113. {sec_report_kit-0.2.1 → sec_report_kit-0.2.2}/tests/test_parsers.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sec-report-kit
3
- Version: 0.2.1
3
+ Version: 0.2.2
4
4
  Summary: Generate HTML security reports from Trivy, pip-audit, Bandit, and Gitleaks JSON
5
5
  Author: Ravi Konduru
6
6
  License: MIT
@@ -77,6 +77,8 @@ srk render pip-audit --input pip-audit.json --output security_reports/report-pip
77
77
 
78
78
  Cross-platform helper scripts are available in `scripts/`.
79
79
 
80
+ When render helpers are called without an explicit `<target_name>`, they automatically use the repository root folder name as the report target label.
81
+
80
82
  Install this package and Python-installable scanners:
81
83
 
82
84
  ```bash
@@ -87,7 +89,7 @@ bash scripts/install_tools.sh
87
89
  scripts\install_tools.bat
88
90
  ```
89
91
 
90
- After cloning on a new machine, run the install script above to recreate the local `.tools/` directory and download required binaries. The `.tools/` folder is intentionally not committed to git.
92
+ After cloning on a new machine, run the install script above to recreate the local `.tools/` directory and install required external CLI binaries (`codeql`, `tfsec`, `gitleaks`, `trufflehog`, `osv-scanner`) alongside Python dependencies. The `.tools/` folder is intentionally not committed to git.
91
93
 
92
94
  Run all unit tests locally with coverage:
93
95
 
@@ -113,6 +115,18 @@ scripts\run_pip_audit.bat
113
115
  scripts\run_pip_audit.bat reports requirements.txt
114
116
  ```
115
117
 
118
+ Run Bandit and write JSON output:
119
+
120
+ ```bash
121
+ # Linux/macOS (optional args: <report_dir> <target_path>)
122
+ bash scripts/run_bandit.sh
123
+ bash scripts/run_bandit.sh security_reports src
124
+
125
+ # Windows (optional args: <report_dir> <target_path>)
126
+ scripts\run_bandit.bat
127
+ scripts\run_bandit.bat security_reports src
128
+ ```
129
+
116
130
  Convert pip-audit JSON report to HTML:
117
131
 
118
132
  ```bash
@@ -167,37 +181,95 @@ By default, JSON is written to `reports/pip-audit.json` and HTML to `reports/pip
167
181
 
168
182
  ## Additional Tool Workflows
169
183
 
170
- Each workflow has paired run and render scripts in `scripts/`:
184
+ ### Script Coverage Matrix
171
185
 
172
- - Semgrep: `run_semgrep.(sh|bat)` and `render_semgrep_html.(sh|bat)`
173
- - CodeQL: `run_codeql.(sh|bat)` and `render_codeql_html.(sh|bat)`
174
- - OSV-Scanner: `run_osv_scanner.(sh|bat)` and `render_osv_scanner_html.(sh|bat)`
175
- - Checkov: `run_checkov.(sh|bat)` and `render_checkov_html.(sh|bat)`
176
- - tfsec: `run_tfsec.(sh|bat)` and `render_tfsec_html.(sh|bat)`
177
- - TruffleHog: `run_trufflehog.(sh|bat)` and `render_trufflehog_html.(sh|bat)`
186
+ The table below reflects what is currently implemented in `scripts/`:
178
187
 
179
- Manual CLI render examples:
188
+ | Tool | Run Script (JSON/SARIF) | Render Script (HTML) | Default JSON/SARIF Output |
189
+ | --- | --- | --- | --- |
190
+ | Trivy | `run_trivy.(sh/bat)` | `render_trivy_html.(sh/bat)` | `security_reports/trivy-image-report-v1.0.21.json` |
191
+ | pip-audit | `run_pip_audit.(sh/bat)` | `render_pip_audit_html.(sh/bat)` | `reports/pip-audit.json` |
192
+ | Bandit | `run_bandit.(sh/bat)` | `render_bandit_html.(sh/bat)` | `security_reports/bandit.json` |
193
+ | Gitleaks | `run_gitleaks.(sh/bat)` | `render_gitleaks_html.(sh/bat)` | `security_reports/gitleaks.json` |
194
+ | Semgrep | `run_semgrep.(sh/bat)` | `render_semgrep_html.(sh/bat)` | `security_reports/semgrep.json` |
195
+ | CodeQL | `run_codeql.(sh/bat)` | `render_codeql_html.(sh/bat)` | `security_reports/codeql.sarif.json` |
196
+ | OSV-Scanner | `run_osv_scanner.(sh/bat)` | `render_osv_scanner_html.(sh/bat)` | `security_reports/osv-scanner.json` |
197
+ | Checkov | `run_checkov.(sh/bat)` | `render_checkov_html.(sh/bat)` | `security_reports/checkov.json` |
198
+ | tfsec | `run_tfsec.(sh/bat)` | `render_tfsec_html.(sh/bat)` | `security_reports/tfsec.json` |
199
+ | TruffleHog | `run_trufflehog.(sh/bat)` | `render_trufflehog_html.(sh/bat)` | `security_reports/trufflehog.json` |
200
+
201
+ ### Bandit End-To-End Example
202
+
203
+ Generate JSON first, then render HTML:
180
204
 
181
205
  ```bash
182
- srk render semgrep --input security_reports/semgrep.json --output security_reports/semgrep-report.html --target my-repo
183
- srk render codeql --input security_reports/codeql.sarif.json --output security_reports/codeql-report.html --target my-repo
184
- srk render osv-scanner --input security_reports/osv-scanner.json --output security_reports/osv-scanner-report.html --target requirements.txt
185
- srk render checkov --input security_reports/checkov.json --output security_reports/checkov-report.html --target terraform
186
- srk render tfsec --input security_reports/tfsec.json --output security_reports/tfsec-report.html --target terraform
187
- srk render trufflehog --input security_reports/trufflehog.json --output security_reports/trufflehog-report.html --target my-repo
206
+ # Linux/macOS
207
+ bash scripts/run_bandit.sh security_reports src
208
+ bash scripts/render_bandit_html.sh security_reports my-python-project
209
+
210
+ # Windows
211
+ scripts\run_bandit.bat security_reports src
212
+ scripts\render_bandit_html.bat security_reports my-python-project
188
213
  ```
189
214
 
190
- Render Bandit JSON:
215
+ ### Other Run Script Usage
191
216
 
192
217
  ```bash
193
- srk render bandit --input bandit-report.json --output security_reports/report-bandit.html --target my-python-project
218
+ # Linux/macOS
219
+ bash scripts/run_trivy.sh security_reports alpine:latest
220
+ bash scripts/run_gitleaks.sh security_reports .
221
+ bash scripts/run_semgrep.sh security_reports .
222
+ bash scripts/run_codeql.sh security_reports codeql-db codeql/python-queries
223
+ bash scripts/run_osv_scanner.sh security_reports .
224
+ bash scripts/run_checkov.sh security_reports .
225
+ bash scripts/run_tfsec.sh security_reports .
226
+ bash scripts/run_trufflehog.sh security_reports .
227
+
228
+ # Windows
229
+ scripts\run_trivy.bat security_reports alpine:latest
230
+ scripts\run_gitleaks.bat security_reports .
231
+ scripts\run_semgrep.bat security_reports .
232
+ scripts\run_codeql.bat security_reports codeql-db codeql/python-queries
233
+ scripts\run_osv_scanner.bat security_reports .
234
+ scripts\run_checkov.bat security_reports .
235
+ scripts\run_tfsec.bat security_reports .
236
+ scripts\run_trufflehog.bat security_reports .
194
237
  ```
195
238
 
196
- Render Gitleaks JSON:
239
+ ### Trivy and Gitleaks End-To-End
240
+
241
+ Generate JSON and then render HTML using wrapper scripts:
242
+
243
+ ```bash
244
+ # Linux/macOS
245
+ bash scripts/run_trivy.sh security_reports your-image:tag
246
+ bash scripts/render_trivy_html.sh security_reports your-image:tag
247
+
248
+ bash scripts/run_gitleaks.sh security_reports .
249
+ bash scripts/render_gitleaks_html.sh security_reports my-repository
250
+
251
+ # Windows
252
+ scripts\run_trivy.bat security_reports your-image:tag
253
+ scripts\render_trivy_html.bat security_reports your-image:tag
254
+
255
+ scripts\run_gitleaks.bat security_reports .
256
+ scripts\render_gitleaks_html.bat security_reports my-repository
257
+ ```
258
+
259
+ Manual CLI render examples:
197
260
 
198
261
  ```bash
199
- srk render gitleaks --input gitleaks-report.json --output security_reports/report-gitleaks.html --target my-repository
262
+ srk render semgrep --input security_reports/semgrep.json --output security_reports/semgrep-report.html --target my-repo
263
+ srk render codeql --input security_reports/codeql.sarif.json --output security_reports/codeql-report.html --target my-repo
264
+ srk render osv-scanner --input security_reports/osv-scanner.json --output security_reports/osv-scanner-report.html --target requirements.txt
265
+ srk render checkov --input security_reports/checkov.json --output security_reports/checkov-report.html --target terraform
266
+ srk render tfsec --input security_reports/tfsec.json --output security_reports/tfsec-report.html --target terraform
267
+ srk render trufflehog --input security_reports/trufflehog.json --output security_reports/trufflehog-report.html --target my-repo
268
+ srk render bandit --input security_reports/bandit.json --output security_reports/bandit-report.html --target my-python-project
269
+ srk render gitleaks --input security_reports/gitleaks.json --output security_reports/gitleaks-report.html --target my-repository
270
+ srk render trivy --input security_reports/trivy-image-report-v1.0.21.json --output security_reports/trivy-report.html --target my-image
200
271
  ```
272
+
201
273
  ## MCP Server
202
274
 
203
275
  Run MCP server over stdio:
@@ -209,7 +281,7 @@ srk mcp serve --transport stdio
209
281
  ### Available MCP Tools
210
282
 
211
283
  | Tool | Description |
212
- |---|---|
284
+ | --- | --- |
213
285
  | `summarize_json` | Summarize vulnerabilities by severity from a JSON file |
214
286
  | `render_report_from_json` | Parse JSON and render an HTML report to disk |
215
287
  | `validate_input` | Validate that a JSON file is parseable and return finding count |
@@ -307,6 +379,7 @@ Edit `~/.codeium/windsurf/mcp_config.json`:
307
379
  If the package is installed in a `.venv`, use the full path to avoid PATH issues:
308
380
 
309
381
  **Windows:**
382
+
310
383
  ```json
311
384
  {
312
385
  "command": "C:/MyProjects/sec-report-kit/.venv/Scripts/srk.exe",
@@ -315,6 +388,7 @@ If the package is installed in a `.venv`, use the full path to avoid PATH issues
315
388
  ```
316
389
 
317
390
  **macOS / Linux:**
391
+
318
392
  ```json
319
393
  {
320
394
  "command": "/home/user/sec-report-kit/.venv/bin/srk",
@@ -50,6 +50,8 @@ srk render pip-audit --input pip-audit.json --output security_reports/report-pip
50
50
 
51
51
  Cross-platform helper scripts are available in `scripts/`.
52
52
 
53
+ When render helpers are called without an explicit `<target_name>`, they automatically use the repository root folder name as the report target label.
54
+
53
55
  Install this package and Python-installable scanners:
54
56
 
55
57
  ```bash
@@ -60,7 +62,7 @@ bash scripts/install_tools.sh
60
62
  scripts\install_tools.bat
61
63
  ```
62
64
 
63
- After cloning on a new machine, run the install script above to recreate the local `.tools/` directory and download required binaries. The `.tools/` folder is intentionally not committed to git.
65
+ After cloning on a new machine, run the install script above to recreate the local `.tools/` directory and install required external CLI binaries (`codeql`, `tfsec`, `gitleaks`, `trufflehog`, `osv-scanner`) alongside Python dependencies. The `.tools/` folder is intentionally not committed to git.
64
66
 
65
67
  Run all unit tests locally with coverage:
66
68
 
@@ -86,6 +88,18 @@ scripts\run_pip_audit.bat
86
88
  scripts\run_pip_audit.bat reports requirements.txt
87
89
  ```
88
90
 
91
+ Run Bandit and write JSON output:
92
+
93
+ ```bash
94
+ # Linux/macOS (optional args: <report_dir> <target_path>)
95
+ bash scripts/run_bandit.sh
96
+ bash scripts/run_bandit.sh security_reports src
97
+
98
+ # Windows (optional args: <report_dir> <target_path>)
99
+ scripts\run_bandit.bat
100
+ scripts\run_bandit.bat security_reports src
101
+ ```
102
+
89
103
  Convert pip-audit JSON report to HTML:
90
104
 
91
105
  ```bash
@@ -140,37 +154,95 @@ By default, JSON is written to `reports/pip-audit.json` and HTML to `reports/pip
140
154
 
141
155
  ## Additional Tool Workflows
142
156
 
143
- Each workflow has paired run and render scripts in `scripts/`:
157
+ ### Script Coverage Matrix
144
158
 
145
- - Semgrep: `run_semgrep.(sh|bat)` and `render_semgrep_html.(sh|bat)`
146
- - CodeQL: `run_codeql.(sh|bat)` and `render_codeql_html.(sh|bat)`
147
- - OSV-Scanner: `run_osv_scanner.(sh|bat)` and `render_osv_scanner_html.(sh|bat)`
148
- - Checkov: `run_checkov.(sh|bat)` and `render_checkov_html.(sh|bat)`
149
- - tfsec: `run_tfsec.(sh|bat)` and `render_tfsec_html.(sh|bat)`
150
- - TruffleHog: `run_trufflehog.(sh|bat)` and `render_trufflehog_html.(sh|bat)`
159
+ The table below reflects what is currently implemented in `scripts/`:
151
160
 
152
- Manual CLI render examples:
161
+ | Tool | Run Script (JSON/SARIF) | Render Script (HTML) | Default JSON/SARIF Output |
162
+ | --- | --- | --- | --- |
163
+ | Trivy | `run_trivy.(sh/bat)` | `render_trivy_html.(sh/bat)` | `security_reports/trivy-image-report-v1.0.21.json` |
164
+ | pip-audit | `run_pip_audit.(sh/bat)` | `render_pip_audit_html.(sh/bat)` | `reports/pip-audit.json` |
165
+ | Bandit | `run_bandit.(sh/bat)` | `render_bandit_html.(sh/bat)` | `security_reports/bandit.json` |
166
+ | Gitleaks | `run_gitleaks.(sh/bat)` | `render_gitleaks_html.(sh/bat)` | `security_reports/gitleaks.json` |
167
+ | Semgrep | `run_semgrep.(sh/bat)` | `render_semgrep_html.(sh/bat)` | `security_reports/semgrep.json` |
168
+ | CodeQL | `run_codeql.(sh/bat)` | `render_codeql_html.(sh/bat)` | `security_reports/codeql.sarif.json` |
169
+ | OSV-Scanner | `run_osv_scanner.(sh/bat)` | `render_osv_scanner_html.(sh/bat)` | `security_reports/osv-scanner.json` |
170
+ | Checkov | `run_checkov.(sh/bat)` | `render_checkov_html.(sh/bat)` | `security_reports/checkov.json` |
171
+ | tfsec | `run_tfsec.(sh/bat)` | `render_tfsec_html.(sh/bat)` | `security_reports/tfsec.json` |
172
+ | TruffleHog | `run_trufflehog.(sh/bat)` | `render_trufflehog_html.(sh/bat)` | `security_reports/trufflehog.json` |
173
+
174
+ ### Bandit End-To-End Example
175
+
176
+ Generate JSON first, then render HTML:
153
177
 
154
178
  ```bash
155
- srk render semgrep --input security_reports/semgrep.json --output security_reports/semgrep-report.html --target my-repo
156
- srk render codeql --input security_reports/codeql.sarif.json --output security_reports/codeql-report.html --target my-repo
157
- srk render osv-scanner --input security_reports/osv-scanner.json --output security_reports/osv-scanner-report.html --target requirements.txt
158
- srk render checkov --input security_reports/checkov.json --output security_reports/checkov-report.html --target terraform
159
- srk render tfsec --input security_reports/tfsec.json --output security_reports/tfsec-report.html --target terraform
160
- srk render trufflehog --input security_reports/trufflehog.json --output security_reports/trufflehog-report.html --target my-repo
179
+ # Linux/macOS
180
+ bash scripts/run_bandit.sh security_reports src
181
+ bash scripts/render_bandit_html.sh security_reports my-python-project
182
+
183
+ # Windows
184
+ scripts\run_bandit.bat security_reports src
185
+ scripts\render_bandit_html.bat security_reports my-python-project
161
186
  ```
162
187
 
163
- Render Bandit JSON:
188
+ ### Other Run Script Usage
164
189
 
165
190
  ```bash
166
- srk render bandit --input bandit-report.json --output security_reports/report-bandit.html --target my-python-project
191
+ # Linux/macOS
192
+ bash scripts/run_trivy.sh security_reports alpine:latest
193
+ bash scripts/run_gitleaks.sh security_reports .
194
+ bash scripts/run_semgrep.sh security_reports .
195
+ bash scripts/run_codeql.sh security_reports codeql-db codeql/python-queries
196
+ bash scripts/run_osv_scanner.sh security_reports .
197
+ bash scripts/run_checkov.sh security_reports .
198
+ bash scripts/run_tfsec.sh security_reports .
199
+ bash scripts/run_trufflehog.sh security_reports .
200
+
201
+ # Windows
202
+ scripts\run_trivy.bat security_reports alpine:latest
203
+ scripts\run_gitleaks.bat security_reports .
204
+ scripts\run_semgrep.bat security_reports .
205
+ scripts\run_codeql.bat security_reports codeql-db codeql/python-queries
206
+ scripts\run_osv_scanner.bat security_reports .
207
+ scripts\run_checkov.bat security_reports .
208
+ scripts\run_tfsec.bat security_reports .
209
+ scripts\run_trufflehog.bat security_reports .
167
210
  ```
168
211
 
169
- Render Gitleaks JSON:
212
+ ### Trivy and Gitleaks End-To-End
213
+
214
+ Generate JSON and then render HTML using wrapper scripts:
215
+
216
+ ```bash
217
+ # Linux/macOS
218
+ bash scripts/run_trivy.sh security_reports your-image:tag
219
+ bash scripts/render_trivy_html.sh security_reports your-image:tag
220
+
221
+ bash scripts/run_gitleaks.sh security_reports .
222
+ bash scripts/render_gitleaks_html.sh security_reports my-repository
223
+
224
+ # Windows
225
+ scripts\run_trivy.bat security_reports your-image:tag
226
+ scripts\render_trivy_html.bat security_reports your-image:tag
227
+
228
+ scripts\run_gitleaks.bat security_reports .
229
+ scripts\render_gitleaks_html.bat security_reports my-repository
230
+ ```
231
+
232
+ Manual CLI render examples:
170
233
 
171
234
  ```bash
172
- srk render gitleaks --input gitleaks-report.json --output security_reports/report-gitleaks.html --target my-repository
235
+ srk render semgrep --input security_reports/semgrep.json --output security_reports/semgrep-report.html --target my-repo
236
+ srk render codeql --input security_reports/codeql.sarif.json --output security_reports/codeql-report.html --target my-repo
237
+ srk render osv-scanner --input security_reports/osv-scanner.json --output security_reports/osv-scanner-report.html --target requirements.txt
238
+ srk render checkov --input security_reports/checkov.json --output security_reports/checkov-report.html --target terraform
239
+ srk render tfsec --input security_reports/tfsec.json --output security_reports/tfsec-report.html --target terraform
240
+ srk render trufflehog --input security_reports/trufflehog.json --output security_reports/trufflehog-report.html --target my-repo
241
+ srk render bandit --input security_reports/bandit.json --output security_reports/bandit-report.html --target my-python-project
242
+ srk render gitleaks --input security_reports/gitleaks.json --output security_reports/gitleaks-report.html --target my-repository
243
+ srk render trivy --input security_reports/trivy-image-report-v1.0.21.json --output security_reports/trivy-report.html --target my-image
173
244
  ```
245
+
174
246
  ## MCP Server
175
247
 
176
248
  Run MCP server over stdio:
@@ -182,7 +254,7 @@ srk mcp serve --transport stdio
182
254
  ### Available MCP Tools
183
255
 
184
256
  | Tool | Description |
185
- |---|---|
257
+ | --- | --- |
186
258
  | `summarize_json` | Summarize vulnerabilities by severity from a JSON file |
187
259
  | `render_report_from_json` | Parse JSON and render an HTML report to disk |
188
260
  | `validate_input` | Validate that a JSON file is parseable and return finding count |
@@ -280,6 +352,7 @@ Edit `~/.codeium/windsurf/mcp_config.json`:
280
352
  If the package is installed in a `.venv`, use the full path to avoid PATH issues:
281
353
 
282
354
  **Windows:**
355
+
283
356
  ```json
284
357
  {
285
358
  "command": "C:/MyProjects/sec-report-kit/.venv/Scripts/srk.exe",
@@ -288,6 +361,7 @@ If the package is installed in a `.venv`, use the full path to avoid PATH issues
288
361
  ```
289
362
 
290
363
  **macOS / Linux:**
364
+
291
365
  ```json
292
366
  {
293
367
  "command": "/home/user/sec-report-kit/.venv/bin/srk",