veritensor 1.6.3__tar.gz → 1.8.0__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 (68) hide show
  1. {veritensor-1.6.3/src/veritensor.egg-info → veritensor-1.8.0}/PKG-INFO +52 -11
  2. {veritensor-1.6.3 → veritensor-1.8.0}/README.md +47 -10
  3. {veritensor-1.6.3 → veritensor-1.8.0}/pyproject.toml +5 -1
  4. veritensor-1.8.0/src/veritensor/__init__.py +2 -0
  5. {veritensor-1.6.3 → veritensor-1.8.0}/src/veritensor/cli/main.py +157 -52
  6. {veritensor-1.6.3 → veritensor-1.8.0}/src/veritensor/core/config.py +6 -4
  7. veritensor-1.8.0/src/veritensor/core/networking.py +59 -0
  8. {veritensor-1.6.3 → veritensor-1.8.0}/src/veritensor/core/safe_zip.py +9 -3
  9. {veritensor-1.6.3 → veritensor-1.8.0}/src/veritensor/core/streaming.py +19 -10
  10. {veritensor-1.6.3 → veritensor-1.8.0}/src/veritensor/core/types.py +1 -1
  11. {veritensor-1.6.3 → veritensor-1.8.0}/src/veritensor/engines/data/dataset_engine.py +72 -32
  12. {veritensor-1.6.3 → veritensor-1.8.0}/src/veritensor/engines/data/excel_engine.py +1 -0
  13. {veritensor-1.6.3 → veritensor-1.8.0}/src/veritensor/engines/hashing/readers.py +19 -14
  14. {veritensor-1.6.3 → veritensor-1.8.0}/src/veritensor/engines/static/dependency_engine.py +33 -5
  15. veritensor-1.8.0/src/veritensor/engines/static/mcp_permission_auditor.py +787 -0
  16. veritensor-1.8.0/src/veritensor/engines/static/mcp_scanner.py +396 -0
  17. {veritensor-1.6.3 → veritensor-1.8.0}/src/veritensor/engines/static/notebook_engine.py +50 -10
  18. {veritensor-1.6.3 → veritensor-1.8.0}/src/veritensor/engines/static/pickle_engine.py +16 -6
  19. {veritensor-1.6.3 → veritensor-1.8.0}/src/veritensor/engines/static/signatures.yaml +1 -1
  20. veritensor-1.8.0/src/veritensor/integrations/enterprise_scanner.py +159 -0
  21. veritensor-1.8.0/src/veritensor/reporting/excel_report.py +347 -0
  22. veritensor-1.8.0/src/veritensor/reporting/html_report.py +351 -0
  23. veritensor-1.8.0/src/veritensor/reporting/sbom.py +191 -0
  24. {veritensor-1.6.3 → veritensor-1.8.0}/src/veritensor/reporting/telemetry.py +3 -2
  25. {veritensor-1.6.3 → veritensor-1.8.0/src/veritensor.egg-info}/PKG-INFO +52 -11
  26. {veritensor-1.6.3 → veritensor-1.8.0}/src/veritensor.egg-info/SOURCES.txt +4 -1
  27. {veritensor-1.6.3 → veritensor-1.8.0}/src/veritensor.egg-info/requires.txt +4 -0
  28. {veritensor-1.6.3 → veritensor-1.8.0}/veritensor.yaml +4 -12
  29. veritensor-1.6.3/src/veritensor/__init__.py +0 -2
  30. veritensor-1.6.3/src/veritensor/core/networking.py +0 -61
  31. veritensor-1.6.3/src/veritensor/core/utils.py +0 -43
  32. veritensor-1.6.3/src/veritensor/integrations/enterprise_scanner.py +0 -62
  33. veritensor-1.6.3/src/veritensor/reporting/sbom.py +0 -34
  34. {veritensor-1.6.3 → veritensor-1.8.0}/LICENSE +0 -0
  35. {veritensor-1.6.3 → veritensor-1.8.0}/MANIFEST.in +0 -0
  36. {veritensor-1.6.3 → veritensor-1.8.0}/setup.cfg +0 -0
  37. {veritensor-1.6.3 → veritensor-1.8.0}/src/veritensor/__main__.py +0 -0
  38. {veritensor-1.6.3 → veritensor-1.8.0}/src/veritensor/cli/__init__.py +0 -0
  39. {veritensor-1.6.3 → veritensor-1.8.0}/src/veritensor/core/__init__.py +0 -0
  40. {veritensor-1.6.3 → veritensor-1.8.0}/src/veritensor/core/cache.py +0 -0
  41. {veritensor-1.6.3 → veritensor-1.8.0}/src/veritensor/core/entropy.py +0 -0
  42. {veritensor-1.6.3 → veritensor-1.8.0}/src/veritensor/core/file_utils.py +0 -0
  43. {veritensor-1.6.3 → veritensor-1.8.0}/src/veritensor/core/text_utils.py +0 -0
  44. {veritensor-1.6.3 → veritensor-1.8.0}/src/veritensor/engines/__init__.py +0 -0
  45. {veritensor-1.6.3 → veritensor-1.8.0}/src/veritensor/engines/container/__init__.py +0 -0
  46. {veritensor-1.6.3 → veritensor-1.8.0}/src/veritensor/engines/container/archive_engine.py +0 -0
  47. {veritensor-1.6.3 → veritensor-1.8.0}/src/veritensor/engines/content/__init__.py +0 -0
  48. {veritensor-1.6.3 → veritensor-1.8.0}/src/veritensor/engines/content/injection.py +0 -0
  49. {veritensor-1.6.3 → veritensor-1.8.0}/src/veritensor/engines/content/pii.py +0 -0
  50. {veritensor-1.6.3 → veritensor-1.8.0}/src/veritensor/engines/data/__init__.py +0 -0
  51. {veritensor-1.6.3 → veritensor-1.8.0}/src/veritensor/engines/hashing/__init__.py +0 -0
  52. {veritensor-1.6.3 → veritensor-1.8.0}/src/veritensor/engines/hashing/calculator.py +0 -0
  53. {veritensor-1.6.3 → veritensor-1.8.0}/src/veritensor/engines/hashing/lfs.py +0 -0
  54. {veritensor-1.6.3 → veritensor-1.8.0}/src/veritensor/engines/static/__init__.py +0 -0
  55. {veritensor-1.6.3 → veritensor-1.8.0}/src/veritensor/engines/static/keras_engine.py +0 -0
  56. {veritensor-1.6.3 → veritensor-1.8.0}/src/veritensor/engines/static/rules.py +0 -0
  57. {veritensor-1.6.3 → veritensor-1.8.0}/src/veritensor/integrations/__init__.py +0 -0
  58. {veritensor-1.6.3 → veritensor-1.8.0}/src/veritensor/integrations/chroma_guard.py +0 -0
  59. {veritensor-1.6.3 → veritensor-1.8.0}/src/veritensor/integrations/cosign.py +0 -0
  60. {veritensor-1.6.3 → veritensor-1.8.0}/src/veritensor/integrations/huggingface.py +0 -0
  61. {veritensor-1.6.3 → veritensor-1.8.0}/src/veritensor/integrations/langchain_guard.py +0 -0
  62. {veritensor-1.6.3 → veritensor-1.8.0}/src/veritensor/integrations/llamaindex_guard.py +0 -0
  63. {veritensor-1.6.3 → veritensor-1.8.0}/src/veritensor/integrations/unstructured_guard.py +0 -0
  64. {veritensor-1.6.3 → veritensor-1.8.0}/src/veritensor/reporting/manifest.py +0 -0
  65. {veritensor-1.6.3 → veritensor-1.8.0}/src/veritensor/reporting/sarif.py +0 -0
  66. {veritensor-1.6.3 → veritensor-1.8.0}/src/veritensor.egg-info/dependency_links.txt +0 -0
  67. {veritensor-1.6.3 → veritensor-1.8.0}/src/veritensor.egg-info/entry_points.txt +0 -0
  68. {veritensor-1.6.3 → veritensor-1.8.0}/src/veritensor.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: veritensor
3
- Version: 1.6.3
3
+ Version: 1.8.0
4
4
  Summary: Antivirus for the AI Supply Chain. Scans models, datasets, notebooks, and RAG documents for threats.
5
5
  Author-email: Arsenii Brazhnyk <veritensor@gmail.com>
6
6
  License: Apache-2.0
@@ -27,6 +27,10 @@ Requires-Dist: requests>=2.31.0
27
27
  Requires-Dist: pyyaml>=6.0
28
28
  Requires-Dist: huggingface_hub>=0.19.0
29
29
  Requires-Dist: cyclonedx-python-lib>=6.0.0
30
+ Requires-Dist: jinja2>=3.1.0
31
+ Requires-Dist: pillow>=12.2.0
32
+ Requires-Dist: lxml>=6.1.0
33
+ Requires-Dist: gitpython>=3.1.47
30
34
  Provides-Extra: test
31
35
  Requires-Dist: pytest>=7.0.0; extra == "test"
32
36
  Requires-Dist: pytest-mock>=3.10.0; extra == "test"
@@ -75,7 +79,8 @@ Unlike standard SAST tools (which focus on code), Veritensor understands the bin
75
79
  2. **Data & RAG:** Streaming scan of **Parquet, CSV, Excel, PDF** to detect Data Poisoning, Prompt Injections, and PII.
76
80
  3. **Notebooks:** Hardening of **Jupyter (.ipynb)** files by detecting leaked secrets (using Entropy analysis), malicious magics, and XSS.
77
81
  4. **Supply Chain:** Audits **dependencies** (`requirements.txt`, `poetry.lock`) for Typosquatting and known CVEs (via OSV.dev).
78
- 5. **Governance:** Generates cryptographic **Data Manifests** (Provenance) and signs containers via **Sigstore**.
82
+ 5. **Agentic AI & MCP Servers:** Pure AST analysis of Python files to detect Agent Hijacking risks in `@mcp.tool()` functions. Scans `claude_desktop_config.json` and `mcp.json` for over-privileged permissions.
83
+ 6. **Governance:** Generates cryptographic **Data Manifests** (Provenance) and signs containers via **Sigstore**.
79
84
 
80
85
  ---
81
86
 
@@ -92,7 +97,7 @@ Unlike standard SAST tools (which focus on code), Veritensor understands the bin
92
97
  * **De-obfuscation Engine:** Automatically detects and decodes **Base64** strings to uncover hidden payloads (e.g., `SWdub3Jl...` -> `Ignore previous instructions`).
93
98
  * **Magic Number Validation:** Detects malware masquerading as safe files (e.g., an `.exe` renamed to `invoice.pdf`).
94
99
  * **Smart Filtering & Entropy Analysis:** Drastically reduces false positives in Jupyter Notebooks. Uses Shannon Entropy to find real, unknown API keys (WandB, Pinecone, Telegram) while ignoring safe UUIDs and standard imports.
95
-
100
+ * **CISO-Ready HTML Reports:** Generate beautiful, standalone HTML security reports with interactive charts and severity breakdowns using the `--html` flag.
96
101
  ---
97
102
 
98
103
  ## 📦 Installation
@@ -175,6 +180,30 @@ Check code cells, markdown, and saved outputs for threats:
175
180
  veritensor scan ./research/experiment.ipynb
176
181
  ```
177
182
 
183
+ ### 10. Generate a CISO-Friendly HTML Report
184
+ Create a standalone, interactive HTML dashboard of your scan results:
185
+ ```bash
186
+ veritensor scan ./project --html
187
+ ```
188
+
189
+ ### 11. Scan MCP Servers for Agent Hijacking
190
+ Detect dangerous tool logic and over-privileged permissions in your AI agent infrastructure:
191
+ ```bash
192
+ # Scan MCP server Python files (AST analysis — no code execution)
193
+ veritensor scan ./mcp_servers/
194
+
195
+ # Also audit MCP configuration files
196
+ veritensor scan ./claude_desktop_config.json
197
+ ```
198
+
199
+ **Example output:**
200
+ ```
201
+ CRITICAL: MCP Agent Hijacking Risk [OS_COMMAND_EXECUTION] in tool 'run_script'
202
+ (line 14): os.system() inside agent tool — no human-in-the-loop confirmation
203
+ HIGH: MCP Config [LETHAL_TRIFECTA] server 'everything':
204
+ filesystem + network + private data — prompt injection can silently exfiltrate all data
205
+ ```
206
+
178
207
  **Example Output:**
179
208
  ```Text
180
209
  ╭────────────────────────────────╮
@@ -296,22 +325,32 @@ with DAG('secure_rag_ingestion', start_date=datetime(2026, 1, 1)) as dag:
296
325
 
297
326
  Veritensor supports industry-standard formats for integration with security dashboards and audit tools.
298
327
 
299
- ### 1. GitHub Security (SARIF)
328
+ ### 1. Interactive HTML Dashboard
329
+ Generate a visually rich, standalone HTML report designed for CISOs and security audits. Includes severity breakdowns, charts, and easy copy-to-clipboard functionality for Jira tickets.
330
+ ```bash
331
+ veritensor scan ./models --html
332
+ ```
333
+
334
+ ### 2. GitHub Security (SARIF)
300
335
  Generate a report compatible with GitHub Code Scanning:
301
336
  ```bash
302
337
  veritensor scan ./models --sarif > veritensor-report.sarif
303
338
  ```
304
- ### 2. Software Bill of Materials (SBOM)
339
+ ### 3. Software Bill of Materials (SBOM)
305
340
  Generate a CycloneDX v1.5 SBOM to inventory your AI assets:
306
341
  ```bash
307
342
  veritensor scan ./models --sbom > sbom.json
308
343
  ```
309
- ### 3. Raw JSON
344
+ ### 4. Raw JSON
310
345
  For custom parsers and SOAR automation:
311
346
  ```bash
312
347
  veritensor scan ./models --json
313
348
  ```
314
-
349
+ ### 5. Excel report
350
+ Create an Excel report with data about the problems:
351
+ ```bash
352
+ veritensor scan ./models --excel
353
+ ```
315
354
  ---
316
355
 
317
356
  ## 🔐 Supply Chain Security (Container Signing)
@@ -360,7 +399,7 @@ jobs:
360
399
  steps:
361
400
  - uses: actions/checkout@v4
362
401
  - name: Veritensor Scan
363
- uses: arsbr/Veritensor@v1.6.3
402
+ uses: arsbr/Veritensor@v1.7.0
364
403
  with:
365
404
  path: '.'
366
405
  jobs: '4'
@@ -371,7 +410,7 @@ Prevent committing malicious models to your repository. Add this to .pre-commit-
371
410
  ```yaml
372
411
  repos:
373
412
  - repo: https://github.com/arsbr/Veritensor
374
- rev: v1.6.3
413
+ rev: v1.7.0
375
414
  hooks:
376
415
  - id: veritensor-scan
377
416
  ```
@@ -389,6 +428,8 @@ veritensor_audit:
389
428
  script:
390
429
  - veritensor scan . --jobs 4
391
430
  allow_failure: false
431
+ ```
432
+
392
433
  ---
393
434
 
394
435
  ## 📂 Supported Formats
@@ -399,8 +440,8 @@ veritensor_audit:
399
440
  | **Datasets** | `.parquet`, `.csv`, `.tsv`, `.jsonl`, `.ndjson`, `.ldjson` | Streaming Regex Scan (URLs, Injections, PII) |
400
441
  | **Notebooks** | `.ipynb` | JSON Structure Analysis + Code AST + Markdown Phishing |
401
442
  | **Documents** | `.pdf`, `.docx`, `.pptx`, `.txt`, `.md`, `.html` | DOM Extraction, Stealth/CSS Detection, PII |
402
- | **Archives** | `.zip`, `.tar`, `.gz`, `.tgz`, `.whl` | Recursive In-Memory Inspection |
403
- | **RAG Docs** | `requirements.txt`, `poetry.lock`, `Pipfile.lock` | Typosquatting, OSV.dev CVE Lookup |
443
+ | **Media & Archives** | `.png`, `.jpg`, `.zip`, `.tar`, `.gz`, `.whl` | EasyOCR, LSB Steganography, YARA (Enterprise) |
444
+ | **Supply Chain** | `requirements.txt`, `pyproject.toml`, `poetry.lock`, `Pipfile.lock` | Typosquatting, OSV.dev CVE Lookup |
404
445
 
405
446
  ---
406
447
 
@@ -17,7 +17,8 @@ Unlike standard SAST tools (which focus on code), Veritensor understands the bin
17
17
  2. **Data & RAG:** Streaming scan of **Parquet, CSV, Excel, PDF** to detect Data Poisoning, Prompt Injections, and PII.
18
18
  3. **Notebooks:** Hardening of **Jupyter (.ipynb)** files by detecting leaked secrets (using Entropy analysis), malicious magics, and XSS.
19
19
  4. **Supply Chain:** Audits **dependencies** (`requirements.txt`, `poetry.lock`) for Typosquatting and known CVEs (via OSV.dev).
20
- 5. **Governance:** Generates cryptographic **Data Manifests** (Provenance) and signs containers via **Sigstore**.
20
+ 5. **Agentic AI & MCP Servers:** Pure AST analysis of Python files to detect Agent Hijacking risks in `@mcp.tool()` functions. Scans `claude_desktop_config.json` and `mcp.json` for over-privileged permissions.
21
+ 6. **Governance:** Generates cryptographic **Data Manifests** (Provenance) and signs containers via **Sigstore**.
21
22
 
22
23
  ---
23
24
 
@@ -34,7 +35,7 @@ Unlike standard SAST tools (which focus on code), Veritensor understands the bin
34
35
  * **De-obfuscation Engine:** Automatically detects and decodes **Base64** strings to uncover hidden payloads (e.g., `SWdub3Jl...` -> `Ignore previous instructions`).
35
36
  * **Magic Number Validation:** Detects malware masquerading as safe files (e.g., an `.exe` renamed to `invoice.pdf`).
36
37
  * **Smart Filtering & Entropy Analysis:** Drastically reduces false positives in Jupyter Notebooks. Uses Shannon Entropy to find real, unknown API keys (WandB, Pinecone, Telegram) while ignoring safe UUIDs and standard imports.
37
-
38
+ * **CISO-Ready HTML Reports:** Generate beautiful, standalone HTML security reports with interactive charts and severity breakdowns using the `--html` flag.
38
39
  ---
39
40
 
40
41
  ## 📦 Installation
@@ -117,6 +118,30 @@ Check code cells, markdown, and saved outputs for threats:
117
118
  veritensor scan ./research/experiment.ipynb
118
119
  ```
119
120
 
121
+ ### 10. Generate a CISO-Friendly HTML Report
122
+ Create a standalone, interactive HTML dashboard of your scan results:
123
+ ```bash
124
+ veritensor scan ./project --html
125
+ ```
126
+
127
+ ### 11. Scan MCP Servers for Agent Hijacking
128
+ Detect dangerous tool logic and over-privileged permissions in your AI agent infrastructure:
129
+ ```bash
130
+ # Scan MCP server Python files (AST analysis — no code execution)
131
+ veritensor scan ./mcp_servers/
132
+
133
+ # Also audit MCP configuration files
134
+ veritensor scan ./claude_desktop_config.json
135
+ ```
136
+
137
+ **Example output:**
138
+ ```
139
+ CRITICAL: MCP Agent Hijacking Risk [OS_COMMAND_EXECUTION] in tool 'run_script'
140
+ (line 14): os.system() inside agent tool — no human-in-the-loop confirmation
141
+ HIGH: MCP Config [LETHAL_TRIFECTA] server 'everything':
142
+ filesystem + network + private data — prompt injection can silently exfiltrate all data
143
+ ```
144
+
120
145
  **Example Output:**
121
146
  ```Text
122
147
  ╭────────────────────────────────╮
@@ -238,22 +263,32 @@ with DAG('secure_rag_ingestion', start_date=datetime(2026, 1, 1)) as dag:
238
263
 
239
264
  Veritensor supports industry-standard formats for integration with security dashboards and audit tools.
240
265
 
241
- ### 1. GitHub Security (SARIF)
266
+ ### 1. Interactive HTML Dashboard
267
+ Generate a visually rich, standalone HTML report designed for CISOs and security audits. Includes severity breakdowns, charts, and easy copy-to-clipboard functionality for Jira tickets.
268
+ ```bash
269
+ veritensor scan ./models --html
270
+ ```
271
+
272
+ ### 2. GitHub Security (SARIF)
242
273
  Generate a report compatible with GitHub Code Scanning:
243
274
  ```bash
244
275
  veritensor scan ./models --sarif > veritensor-report.sarif
245
276
  ```
246
- ### 2. Software Bill of Materials (SBOM)
277
+ ### 3. Software Bill of Materials (SBOM)
247
278
  Generate a CycloneDX v1.5 SBOM to inventory your AI assets:
248
279
  ```bash
249
280
  veritensor scan ./models --sbom > sbom.json
250
281
  ```
251
- ### 3. Raw JSON
282
+ ### 4. Raw JSON
252
283
  For custom parsers and SOAR automation:
253
284
  ```bash
254
285
  veritensor scan ./models --json
255
286
  ```
256
-
287
+ ### 5. Excel report
288
+ Create an Excel report with data about the problems:
289
+ ```bash
290
+ veritensor scan ./models --excel
291
+ ```
257
292
  ---
258
293
 
259
294
  ## 🔐 Supply Chain Security (Container Signing)
@@ -302,7 +337,7 @@ jobs:
302
337
  steps:
303
338
  - uses: actions/checkout@v4
304
339
  - name: Veritensor Scan
305
- uses: arsbr/Veritensor@v1.6.3
340
+ uses: arsbr/Veritensor@v1.7.0
306
341
  with:
307
342
  path: '.'
308
343
  jobs: '4'
@@ -313,7 +348,7 @@ Prevent committing malicious models to your repository. Add this to .pre-commit-
313
348
  ```yaml
314
349
  repos:
315
350
  - repo: https://github.com/arsbr/Veritensor
316
- rev: v1.6.3
351
+ rev: v1.7.0
317
352
  hooks:
318
353
  - id: veritensor-scan
319
354
  ```
@@ -331,6 +366,8 @@ veritensor_audit:
331
366
  script:
332
367
  - veritensor scan . --jobs 4
333
368
  allow_failure: false
369
+ ```
370
+
334
371
  ---
335
372
 
336
373
  ## 📂 Supported Formats
@@ -341,8 +378,8 @@ veritensor_audit:
341
378
  | **Datasets** | `.parquet`, `.csv`, `.tsv`, `.jsonl`, `.ndjson`, `.ldjson` | Streaming Regex Scan (URLs, Injections, PII) |
342
379
  | **Notebooks** | `.ipynb` | JSON Structure Analysis + Code AST + Markdown Phishing |
343
380
  | **Documents** | `.pdf`, `.docx`, `.pptx`, `.txt`, `.md`, `.html` | DOM Extraction, Stealth/CSS Detection, PII |
344
- | **Archives** | `.zip`, `.tar`, `.gz`, `.tgz`, `.whl` | Recursive In-Memory Inspection |
345
- | **RAG Docs** | `requirements.txt`, `poetry.lock`, `Pipfile.lock` | Typosquatting, OSV.dev CVE Lookup |
381
+ | **Media & Archives** | `.png`, `.jpg`, `.zip`, `.tar`, `.gz`, `.whl` | EasyOCR, LSB Steganography, YARA (Enterprise) |
382
+ | **Supply Chain** | `requirements.txt`, `pyproject.toml`, `poetry.lock`, `Pipfile.lock` | Typosquatting, OSV.dev CVE Lookup |
346
383
 
347
384
  ---
348
385
 
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "veritensor"
7
- version = "1.6.3"
7
+ version = "1.8.0"
8
8
  description = "Antivirus for the AI Supply Chain. Scans models, datasets, notebooks, and RAG documents for threats."
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"
@@ -32,7 +32,11 @@ dependencies = [
32
32
  "pyyaml>=6.0",
33
33
  "huggingface_hub>=0.19.0",
34
34
  "cyclonedx-python-lib>=6.0.0",
35
+ "jinja2>=3.1.0",
36
+ "pillow>=12.2.0",
37
+ "lxml>=6.1.0",
35
38
  # Fickling removed from here to avoid installing PyTorch (800MB+) for regular users
39
+ "gitpython>=3.1.47",
36
40
  ]
37
41
 
38
42
 
@@ -0,0 +1,2 @@
1
+ __version__ = "1.8.0"
2
+