cve-sentinel 0.1.2__py3-none-any.whl
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.
- cve_sentinel/__init__.py +4 -0
- cve_sentinel/__main__.py +18 -0
- cve_sentinel/analyzers/__init__.py +19 -0
- cve_sentinel/analyzers/base.py +274 -0
- cve_sentinel/analyzers/go.py +186 -0
- cve_sentinel/analyzers/maven.py +291 -0
- cve_sentinel/analyzers/npm.py +586 -0
- cve_sentinel/analyzers/php.py +238 -0
- cve_sentinel/analyzers/python.py +435 -0
- cve_sentinel/analyzers/ruby.py +182 -0
- cve_sentinel/analyzers/rust.py +199 -0
- cve_sentinel/cli.py +517 -0
- cve_sentinel/config.py +347 -0
- cve_sentinel/fetchers/__init__.py +22 -0
- cve_sentinel/fetchers/nvd.py +544 -0
- cve_sentinel/fetchers/osv.py +719 -0
- cve_sentinel/matcher.py +496 -0
- cve_sentinel/reporter.py +549 -0
- cve_sentinel/scanner.py +513 -0
- cve_sentinel/scanners/__init__.py +13 -0
- cve_sentinel/scanners/import_scanner.py +1121 -0
- cve_sentinel/utils/__init__.py +5 -0
- cve_sentinel/utils/cache.py +61 -0
- cve_sentinel-0.1.2.dist-info/METADATA +454 -0
- cve_sentinel-0.1.2.dist-info/RECORD +28 -0
- cve_sentinel-0.1.2.dist-info/WHEEL +4 -0
- cve_sentinel-0.1.2.dist-info/entry_points.txt +2 -0
- cve_sentinel-0.1.2.dist-info/licenses/LICENSE +21 -0
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"""File-based cache for CVE data."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import json
|
|
6
|
+
from datetime import datetime, timedelta, timezone
|
|
7
|
+
from pathlib import Path
|
|
8
|
+
from typing import Any, Optional
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class Cache:
|
|
12
|
+
"""File-based cache with TTL support."""
|
|
13
|
+
|
|
14
|
+
def __init__(self, cache_dir: Path, ttl_hours: int = 24) -> None:
|
|
15
|
+
"""Initialize cache with directory and TTL."""
|
|
16
|
+
self.cache_dir = cache_dir
|
|
17
|
+
self.ttl = timedelta(hours=ttl_hours)
|
|
18
|
+
self.cache_dir.mkdir(parents=True, exist_ok=True)
|
|
19
|
+
|
|
20
|
+
def _get_cache_path(self, key: str) -> Path:
|
|
21
|
+
"""Get file path for a cache key."""
|
|
22
|
+
# Sanitize key for filesystem
|
|
23
|
+
safe_key = key.replace("/", "_").replace(":", "_")
|
|
24
|
+
return self.cache_dir / f"{safe_key}.json"
|
|
25
|
+
|
|
26
|
+
def get(self, key: str) -> Optional[Any]:
|
|
27
|
+
"""Get value from cache if not expired."""
|
|
28
|
+
cache_path = self._get_cache_path(key)
|
|
29
|
+
|
|
30
|
+
if not cache_path.exists():
|
|
31
|
+
return None
|
|
32
|
+
|
|
33
|
+
try:
|
|
34
|
+
data = json.loads(cache_path.read_text())
|
|
35
|
+
cached_at = datetime.fromisoformat(data["cached_at"])
|
|
36
|
+
now = datetime.now(timezone.utc)
|
|
37
|
+
|
|
38
|
+
if now - cached_at > self.ttl:
|
|
39
|
+
# Cache expired
|
|
40
|
+
cache_path.unlink()
|
|
41
|
+
return None
|
|
42
|
+
|
|
43
|
+
return data["value"]
|
|
44
|
+
except (json.JSONDecodeError, KeyError, ValueError):
|
|
45
|
+
return None
|
|
46
|
+
|
|
47
|
+
def set(self, key: str, value: Any) -> None:
|
|
48
|
+
"""Set value in cache."""
|
|
49
|
+
cache_path = self._get_cache_path(key)
|
|
50
|
+
|
|
51
|
+
data = {
|
|
52
|
+
"cached_at": datetime.now(timezone.utc).isoformat(),
|
|
53
|
+
"value": value,
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
cache_path.write_text(json.dumps(data, ensure_ascii=False))
|
|
57
|
+
|
|
58
|
+
def clear(self) -> None:
|
|
59
|
+
"""Clear all cached data."""
|
|
60
|
+
for cache_file in self.cache_dir.glob("*.json"):
|
|
61
|
+
cache_file.unlink()
|
|
@@ -0,0 +1,454 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: cve-sentinel
|
|
3
|
+
Version: 0.1.2
|
|
4
|
+
Summary: CVE auto-detection and remediation proposal system for Claude Code
|
|
5
|
+
Project-URL: Homepage, https://github.com/cawa102/cveSentinel
|
|
6
|
+
Project-URL: Documentation, https://github.com/cawa102/cveSentinel#readme
|
|
7
|
+
Project-URL: Repository, https://github.com/cawa102/cveSentinel
|
|
8
|
+
Project-URL: Issues, https://github.com/cawa102/cveSentinel/issues
|
|
9
|
+
Author: CVE Sentinel Team
|
|
10
|
+
License-Expression: MIT
|
|
11
|
+
License-File: LICENSE
|
|
12
|
+
Keywords: claude-code,cve,scanner,security,vulnerability
|
|
13
|
+
Classifier: Development Status :: 3 - Alpha
|
|
14
|
+
Classifier: Intended Audience :: Developers
|
|
15
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
21
|
+
Classifier: Topic :: Security
|
|
22
|
+
Requires-Python: >=3.9
|
|
23
|
+
Requires-Dist: packaging>=21.0
|
|
24
|
+
Requires-Dist: pyyaml>=6.0
|
|
25
|
+
Requires-Dist: requests>=2.28.0
|
|
26
|
+
Requires-Dist: tomli>=2.0.0; python_version < '3.11'
|
|
27
|
+
Provides-Extra: dev
|
|
28
|
+
Requires-Dist: mypy>=1.0.0; extra == 'dev'
|
|
29
|
+
Requires-Dist: pytest-cov>=4.0.0; extra == 'dev'
|
|
30
|
+
Requires-Dist: pytest>=7.0.0; extra == 'dev'
|
|
31
|
+
Requires-Dist: ruff>=0.1.0; extra == 'dev'
|
|
32
|
+
Requires-Dist: types-pyyaml>=6.0.0; extra == 'dev'
|
|
33
|
+
Requires-Dist: types-requests>=2.28.0; extra == 'dev'
|
|
34
|
+
Description-Content-Type: text/markdown
|
|
35
|
+
|
|
36
|
+
<p align="center">
|
|
37
|
+
<img src="assets/icon.png" alt="CVE Sentinel" width="180" height="180">
|
|
38
|
+
</p>
|
|
39
|
+
|
|
40
|
+
<h1 align="center">CVE Sentinel</h1>
|
|
41
|
+
|
|
42
|
+
<p align="center">
|
|
43
|
+
<strong>Your AI-Powered Vulnerability Detector</strong>
|
|
44
|
+
</p>
|
|
45
|
+
|
|
46
|
+
<p align="center">
|
|
47
|
+
Automatically detect vulnerabilities in your dependencies before they become threats.
|
|
48
|
+
</p>
|
|
49
|
+
|
|
50
|
+
<p align="center">
|
|
51
|
+
<!-- CI & Coverage -->
|
|
52
|
+
<a href="https://github.com/cawa102/cveSentinel/actions/workflows/ci.yml">
|
|
53
|
+
<img src="https://github.com/cawa102/cveSentinel/actions/workflows/ci.yml/badge.svg" alt="CI">
|
|
54
|
+
</a>
|
|
55
|
+
<a href="https://codecov.io/gh/cawa102/cveSentinel">
|
|
56
|
+
<img src="https://codecov.io/gh/cawa102/cveSentinel/branch/main/graph/badge.svg" alt="Coverage">
|
|
57
|
+
</a>
|
|
58
|
+
<!-- Package Info -->
|
|
59
|
+
<a href="https://pypi.org/project/cve-sentinel/">
|
|
60
|
+
<img src="https://img.shields.io/pypi/v/cve-sentinel.svg" alt="PyPI">
|
|
61
|
+
</a>
|
|
62
|
+
<a href="https://pypi.org/project/cve-sentinel/">
|
|
63
|
+
<img src="https://img.shields.io/pypi/pyversions/cve-sentinel.svg" alt="Python Versions">
|
|
64
|
+
</a>
|
|
65
|
+
<a href="https://pepy.tech/project/cve-sentinel">
|
|
66
|
+
<img src="https://pepy.tech/badge/cve-sentinel" alt="Downloads">
|
|
67
|
+
</a>
|
|
68
|
+
</p>
|
|
69
|
+
|
|
70
|
+
<p align="center">
|
|
71
|
+
<!-- Community -->
|
|
72
|
+
<a href="https://github.com/cawa102/cveSentinel/stargazers">
|
|
73
|
+
<img src="https://img.shields.io/github/stars/cawa102/cveSentinel.svg?style=social" alt="Stars">
|
|
74
|
+
</a>
|
|
75
|
+
<a href="https://github.com/cawa102/cveSentinel/issues">
|
|
76
|
+
<img src="https://img.shields.io/github/issues/cawa102/cveSentinel.svg" alt="Issues">
|
|
77
|
+
</a>
|
|
78
|
+
<a href="https://opensource.org/licenses/MIT">
|
|
79
|
+
<img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="License: MIT">
|
|
80
|
+
</a>
|
|
81
|
+
<!-- Security -->
|
|
82
|
+
<a href="https://github.com/cawa102/cveSentinel/security/policy">
|
|
83
|
+
<img src="https://img.shields.io/badge/Security-Policy-blue.svg" alt="Security Policy">
|
|
84
|
+
</a>
|
|
85
|
+
</p>
|
|
86
|
+
|
|
87
|
+
---
|
|
88
|
+
|
|
89
|
+
## Demo
|
|
90
|
+
|
|
91
|
+
<p align="center">
|
|
92
|
+
<img src="assets/cveSentinel.gif" alt="CVE Sentinel Demo" width="800">
|
|
93
|
+
</p>
|
|
94
|
+
|
|
95
|
+
https://github.com/user-attachments/assets/25634a88-8ed0-4da4-9b11-4e924ad87adf
|
|
96
|
+
|
|
97
|
+
---
|
|
98
|
+
|
|
99
|
+
## Why CVE Sentinel?
|
|
100
|
+
|
|
101
|
+
### Built for the AI Coding Era
|
|
102
|
+
|
|
103
|
+
Traditional vulnerability scanners run periodically in CI/CD pipelines — but AI-driven development moves faster. When you're building with Claude Code, new dependencies get added in real-time. **CVE Sentinel** provides always-on protection that activates the moment you start coding, catching vulnerabilities before they ever reach your repository.
|
|
104
|
+
|
|
105
|
+
### Superior Coverage with Multi-Source Intelligence
|
|
106
|
+
|
|
107
|
+
Most scanners rely on a single vulnerability database. CVE Sentinel combines **NVD (National Vulnerability Database)** and **Google OSV (Open Source Vulnerabilities)** to deliver broader coverage:
|
|
108
|
+
|
|
109
|
+
| Source | Strength |
|
|
110
|
+
|--------|----------|
|
|
111
|
+
| **NVD** | Industry standard, detailed CVSS scores, comprehensive CVE data |
|
|
112
|
+
| **Google OSV** | Faster updates, ecosystem-specific advisories (npm, PyPI, Go, etc.) |
|
|
113
|
+
|
|
114
|
+
By querying both sources, CVE Sentinel catches vulnerabilities that single-source tools miss.
|
|
115
|
+
|
|
116
|
+
### Key Features
|
|
117
|
+
|
|
118
|
+
- **Always-On Detection** - Automatically scans when you start Claude Code sessions
|
|
119
|
+
- **Multi-Source Intelligence** - NVD + Google OSV for maximum coverage
|
|
120
|
+
- **7+ Languages** - JavaScript, Python, Go, Java, Ruby, Rust, PHP and more
|
|
121
|
+
- **3 Analysis Levels** - From quick manifest scans to deep source code analysis
|
|
122
|
+
- **Actionable Fixes** - Get specific upgrade commands, not just vulnerability reports
|
|
123
|
+
|
|
124
|
+
---
|
|
125
|
+
|
|
126
|
+
## Quick Start
|
|
127
|
+
|
|
128
|
+
### Installation
|
|
129
|
+
|
|
130
|
+
```bash
|
|
131
|
+
# Install from PyPI
|
|
132
|
+
pip install cve-sentinel
|
|
133
|
+
|
|
134
|
+
# Or install from GitHub (latest development version)
|
|
135
|
+
pip install git+https://github.com/cawa102/cveSentinel.git
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
### Scan Your Project
|
|
139
|
+
|
|
140
|
+
```bash
|
|
141
|
+
# Scan current directory
|
|
142
|
+
cve-sentinel scan
|
|
143
|
+
|
|
144
|
+
# Scan a specific directory
|
|
145
|
+
cve-sentinel scan /path/to/project
|
|
146
|
+
|
|
147
|
+
# Scan with options
|
|
148
|
+
cve-sentinel scan /path/to/project --level 2 --exclude node_modules --exclude .venv
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
No configuration file required - just run and scan!
|
|
152
|
+
|
|
153
|
+
### Auto-scan with Claude Code (Optional)
|
|
154
|
+
|
|
155
|
+
```bash
|
|
156
|
+
cve-sentinel init
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
This sets up a **SessionStart Hook** - CVE Sentinel will automatically scan your project every time you launch Claude Code.
|
|
160
|
+
|
|
161
|
+
---
|
|
162
|
+
|
|
163
|
+
## NVD API Key (Recommended)
|
|
164
|
+
|
|
165
|
+
For faster scanning, get a free API key from [NVD](https://nvd.nist.gov/developers/request-an-api-key):
|
|
166
|
+
|
|
167
|
+
```bash
|
|
168
|
+
export NVD_API_KEY=your-api-key-here
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
Without an API key, requests are rate-limited to 5 per 30 seconds.
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
---
|
|
175
|
+
|
|
176
|
+
## How It Works
|
|
177
|
+
|
|
178
|
+
```
|
|
179
|
+
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
|
|
180
|
+
│ Your Project │────▶│ CVE Sentinel │────▶│ Security Report│
|
|
181
|
+
│ │ │ │ │ │
|
|
182
|
+
│ package.json │ │ ┌─────────────┐ │ │ 3 Critical │
|
|
183
|
+
│ requirements.txt│ │ │ NVD API 2.0 │ │ │ 5 High │
|
|
184
|
+
│ go.mod │ │ └─────────────┘ │ │ 2 Medium │
|
|
185
|
+
│ Cargo.toml │ │ ┌─────────────┐ │ │ │
|
|
186
|
+
│ ... │ │ │ Google OSV │ │ │ + Fix Commands │
|
|
187
|
+
│ │ │ └─────────────┘ │ │ │
|
|
188
|
+
└─────────────────┘ └─────────────────┘ └─────────────────┘
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
---
|
|
192
|
+
|
|
193
|
+
## Supported Languages (Default)
|
|
194
|
+
|
|
195
|
+
| Language | Package Managers | Files Analyzed |
|
|
196
|
+
|:--------:|:-----------------|:---------------|
|
|
197
|
+
| **JavaScript** | npm, yarn, pnpm | `package.json`, `package-lock.json`, `yarn.lock` |
|
|
198
|
+
| **Python** | pip, poetry, pipenv | `requirements.txt`, `pyproject.toml`, `Pipfile` |
|
|
199
|
+
| **Go** | go mod | `go.mod`, `go.sum` |
|
|
200
|
+
| **Java** | Maven, Gradle | `pom.xml`, `build.gradle` |
|
|
201
|
+
| **Ruby** | Bundler | `Gemfile`, `Gemfile.lock` |
|
|
202
|
+
| **Rust** | Cargo | `Cargo.toml`, `Cargo.lock` |
|
|
203
|
+
| **PHP** | Composer | `composer.json`, `composer.lock` |
|
|
204
|
+
|
|
205
|
+
---
|
|
206
|
+
|
|
207
|
+
## Analysis Levels
|
|
208
|
+
|
|
209
|
+
Choose the depth of analysis that fits your needs:
|
|
210
|
+
|
|
211
|
+
| Level | What It Scans | Best For |
|
|
212
|
+
|:-----:|:--------------|:---------|
|
|
213
|
+
| **1** | Manifest files only | Quick CI checks |
|
|
214
|
+
| **2** | + Lock files (transitive deps) | Regular development (default) |
|
|
215
|
+
| **3** | + Source code imports | Pre-release audits |
|
|
216
|
+
|
|
217
|
+
```bash
|
|
218
|
+
# Quick scan - manifest files only (Level 1)
|
|
219
|
+
cve-sentinel scan --level 1
|
|
220
|
+
|
|
221
|
+
# Standard scan - includes lock files (Level 2, default)
|
|
222
|
+
cve-sentinel scan
|
|
223
|
+
|
|
224
|
+
# Deep scan - includes source code analysis (Level 3)
|
|
225
|
+
cve-sentinel scan --level 3
|
|
226
|
+
|
|
227
|
+
# Scan specific directory with level
|
|
228
|
+
cve-sentinel scan /path/to/project --level 3
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
---
|
|
232
|
+
|
|
233
|
+
## Usage
|
|
234
|
+
|
|
235
|
+
```bash
|
|
236
|
+
cve-sentinel scan [PATH] [OPTIONS]
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
| Option | Description |
|
|
240
|
+
|--------|-------------|
|
|
241
|
+
| `PATH` | Target directory to scan (default: current directory) |
|
|
242
|
+
| `--level`, `-l` | Analysis level: 1, 2, or 3 (default: 2) |
|
|
243
|
+
| `--exclude`, `-e` | Paths to exclude (can be specified multiple times) |
|
|
244
|
+
| `--verbose`, `-v` | Enable verbose output |
|
|
245
|
+
| `--fail-on` | Exit with error if vulnerabilities at or above this severity (default: HIGH) |
|
|
246
|
+
|
|
247
|
+
### Examples
|
|
248
|
+
|
|
249
|
+
```bash
|
|
250
|
+
# Basic scan
|
|
251
|
+
cve-sentinel scan
|
|
252
|
+
|
|
253
|
+
# Scan with exclusions
|
|
254
|
+
cve-sentinel scan --exclude node_modules --exclude dist
|
|
255
|
+
|
|
256
|
+
# CI/CD usage - fail on critical vulnerabilities only
|
|
257
|
+
cve-sentinel scan --fail-on CRITICAL
|
|
258
|
+
|
|
259
|
+
# Verbose deep scan
|
|
260
|
+
cve-sentinel scan /path/to/project --level 3 --verbose
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
---
|
|
264
|
+
|
|
265
|
+
## Configuration (Optional)
|
|
266
|
+
|
|
267
|
+
For persistent settings, create `.cve-sentinel.yaml` in your project root:
|
|
268
|
+
|
|
269
|
+
```yaml
|
|
270
|
+
# Scan settings
|
|
271
|
+
analysis_level: 2
|
|
272
|
+
|
|
273
|
+
# Exclude paths (e.g., test fixtures)
|
|
274
|
+
exclude:
|
|
275
|
+
- node_modules/
|
|
276
|
+
- vendor/
|
|
277
|
+
- .venv/
|
|
278
|
+
|
|
279
|
+
# Cache settings
|
|
280
|
+
cache_ttl_hours: 24
|
|
281
|
+
|
|
282
|
+
# Auto-scan on Claude Code startup
|
|
283
|
+
auto_scan_on_startup: true
|
|
284
|
+
```
|
|
285
|
+
|
|
286
|
+
CLI options override configuration file settings.
|
|
287
|
+
|
|
288
|
+
---
|
|
289
|
+
|
|
290
|
+
## Custom File Patterns
|
|
291
|
+
|
|
292
|
+
Your unique projects sometimes use non-standard file names for their dependencies. CVE Sentinel lets you specify additional file patterns to scan:
|
|
293
|
+
|
|
294
|
+
```yaml
|
|
295
|
+
# .cve-sentinel.yaml
|
|
296
|
+
custom_patterns:
|
|
297
|
+
python:
|
|
298
|
+
manifests:
|
|
299
|
+
- "deps/*.txt"
|
|
300
|
+
- "requirements-*.txt"
|
|
301
|
+
locks:
|
|
302
|
+
- "custom.lock"
|
|
303
|
+
javascript:
|
|
304
|
+
manifests:
|
|
305
|
+
- "dependencies.json"
|
|
306
|
+
```
|
|
307
|
+
|
|
308
|
+
### Supported Ecosystems
|
|
309
|
+
|
|
310
|
+
| Config Key | Aliases | Default Files |
|
|
311
|
+
|:-----------|:--------|:--------------|
|
|
312
|
+
| `javascript` | `npm` | `package.json`, `package-lock.json`, `yarn.lock` |
|
|
313
|
+
| `python` | `pypi` | `requirements.txt`, `pyproject.toml`, `Pipfile` |
|
|
314
|
+
| `go` | - | `go.mod`, `go.sum` |
|
|
315
|
+
| `java` | `maven`, `gradle` | `pom.xml`, `build.gradle` |
|
|
316
|
+
| `ruby` | `rubygems` | `Gemfile`, `Gemfile.lock` |
|
|
317
|
+
| `rust` | `crates.io` | `Cargo.toml`, `Cargo.lock` |
|
|
318
|
+
| `php` | `packagist` | `composer.json`, `composer.lock` |
|
|
319
|
+
|
|
320
|
+
Custom patterns **extend** the defaults - your standard files are always scanned.
|
|
321
|
+
|
|
322
|
+
---
|
|
323
|
+
|
|
324
|
+
## Claude Code Integration
|
|
325
|
+
|
|
326
|
+
CVE Sentinel is designed to work seamlessly with [Claude Code](https://claude.ai/code). After running `cve-sentinel init`, it will:
|
|
327
|
+
|
|
328
|
+
1. Automatically scan your project when you start a Claude Code session
|
|
329
|
+
2. Report vulnerabilities directly in your conversation
|
|
330
|
+
3. Suggest fixes that Claude can help you implement
|
|
331
|
+
|
|
332
|
+
---
|
|
333
|
+
|
|
334
|
+
## Sample Output
|
|
335
|
+
|
|
336
|
+
```
|
|
337
|
+
⚠ CVE Scan Complete: 73 vulnerabilities found
|
|
338
|
+
|
|
339
|
+
[CVE-2025-xxxxx] (Description)
|
|
340
|
+
Severity:
|
|
341
|
+
Description:
|
|
342
|
+
Affected Files: '/path/where/this/vuln/exists'
|
|
343
|
+
Fix:
|
|
344
|
+
...
|
|
345
|
+
```
|
|
346
|
+
|
|
347
|
+
---
|
|
348
|
+
|
|
349
|
+
## Troubleshooting
|
|
350
|
+
|
|
351
|
+
#### API Rate Limiting
|
|
352
|
+
|
|
353
|
+
```
|
|
354
|
+
Error querying OSV for npm: OSV API bad request: {"code":3,"message":"Too many queries."}
|
|
355
|
+
```
|
|
356
|
+
|
|
357
|
+
**Cause:** Too many requests to OSV API in a short period.
|
|
358
|
+
|
|
359
|
+
**Solution:** The tool automatically retries with exponential backoff. For large projects, the scan may take longer. If errors persist, wait a few minutes and try again.
|
|
360
|
+
|
|
361
|
+
---
|
|
362
|
+
|
|
363
|
+
#### CVSS Score Parsing Error
|
|
364
|
+
|
|
365
|
+
```
|
|
366
|
+
could not convert string to float: 'CVSS:3.1/AV:N/AC:L/...'
|
|
367
|
+
```
|
|
368
|
+
|
|
369
|
+
**Cause:** Older version of CVE Sentinel. This was fixed in recent updates.
|
|
370
|
+
|
|
371
|
+
**Solution:** Update to the latest version:
|
|
372
|
+
```bash
|
|
373
|
+
pip install --upgrade cve-sentinel
|
|
374
|
+
```
|
|
375
|
+
|
|
376
|
+
---
|
|
377
|
+
|
|
378
|
+
#### Configuration Errors
|
|
379
|
+
|
|
380
|
+
| Error | Cause | Solution |
|
|
381
|
+
|-------|-------|----------|
|
|
382
|
+
| `analysis_level must be between 1 and 3` | Invalid analysis level | Use `--level 1`, `2`, or `3` |
|
|
383
|
+
| `target_path does not exist` | Invalid scan path | Check the path exists |
|
|
384
|
+
| `Failed to parse YAML config file` | Invalid YAML syntax | Check `.cve-sentinel.yaml` syntax |
|
|
385
|
+
|
|
386
|
+
---
|
|
387
|
+
|
|
388
|
+
#### NVD API Errors
|
|
389
|
+
|
|
390
|
+
```
|
|
391
|
+
NVD API rate limit exceeded
|
|
392
|
+
```
|
|
393
|
+
|
|
394
|
+
**Cause:** NVD API has strict rate limits without an API key (5 requests per 30 seconds).
|
|
395
|
+
|
|
396
|
+
**Solution:** Get a free API key from [NVD](https://nvd.nist.gov/developers/request-an-api-key) and set it:
|
|
397
|
+
```bash
|
|
398
|
+
export CVE_SENTINEL_NVD_API_KEY=your-api-key-here
|
|
399
|
+
```
|
|
400
|
+
|
|
401
|
+
---
|
|
402
|
+
|
|
403
|
+
#### Python Version Error
|
|
404
|
+
|
|
405
|
+
```
|
|
406
|
+
Package 'cve-sentinel' requires a different Python: 3.8.x not in '>=3.9'
|
|
407
|
+
```
|
|
408
|
+
|
|
409
|
+
**Cause:** Python version is too old.
|
|
410
|
+
|
|
411
|
+
**Solution:** Use Python 3.9 or later:
|
|
412
|
+
```bash
|
|
413
|
+
python3.9 -m pip install cve-sentinel
|
|
414
|
+
```
|
|
415
|
+
|
|
416
|
+
---
|
|
417
|
+
|
|
418
|
+
## Development
|
|
419
|
+
|
|
420
|
+
```bash
|
|
421
|
+
# Clone and install
|
|
422
|
+
git clone https://github.com/cawa102/cveSentinel.git
|
|
423
|
+
cd cveSentinel
|
|
424
|
+
pip install -e ".[dev]"
|
|
425
|
+
|
|
426
|
+
# Run tests
|
|
427
|
+
pytest
|
|
428
|
+
|
|
429
|
+
# Run linting
|
|
430
|
+
ruff check .
|
|
431
|
+
```
|
|
432
|
+
|
|
433
|
+
---
|
|
434
|
+
|
|
435
|
+
## Contributing
|
|
436
|
+
|
|
437
|
+
Contributions are welcome! Whether it's:
|
|
438
|
+
- Adding support for new languages
|
|
439
|
+
- Improving vulnerability detection
|
|
440
|
+
- Enhancing the user experience
|
|
441
|
+
|
|
442
|
+
Please feel free to submit a Pull Request.
|
|
443
|
+
|
|
444
|
+
---
|
|
445
|
+
|
|
446
|
+
## License
|
|
447
|
+
|
|
448
|
+
MIT License - see [LICENSE](LICENSE) for details.
|
|
449
|
+
|
|
450
|
+
---
|
|
451
|
+
|
|
452
|
+
<p align="center">
|
|
453
|
+
<sub>Built with security in mind. Powered by Claude Code.</sub>
|
|
454
|
+
</p>
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
cve_sentinel/__init__.py,sha256=HowscLA_5Sy5_ptiYrtKGLjAefEwi0mFpQzNt27EnEM,129
|
|
2
|
+
cve_sentinel/__main__.py,sha256=Vy6kHEjA5oh3SqGVNTzHchb60RBfrKXv4HCYN9Qlc_Y,418
|
|
3
|
+
cve_sentinel/cli.py,sha256=W8npIMXiITeu5Za9zTSGd3JiqFpohweCTASeDYJTfAI,15386
|
|
4
|
+
cve_sentinel/config.py,sha256=CrxwXp4kojy95JCu2wcCDEVRzchXT-A-ma-oqyhZw6Q,10728
|
|
5
|
+
cve_sentinel/matcher.py,sha256=YuYLf4Tl9kvt3-Y7eB00V2JOK7pz-2YVrZK8tb7OR_0,16208
|
|
6
|
+
cve_sentinel/reporter.py,sha256=3LfremgiTpcJ9Pl-FPgMKUwTWes24asnrURyWnZKdaU,17205
|
|
7
|
+
cve_sentinel/scanner.py,sha256=wcCDeOkMUvkNUhxwnIextDT-GMOs-9arXuS6M0yM_d4,16956
|
|
8
|
+
cve_sentinel/analyzers/__init__.py,sha256=tsT2Fdi5vCJ-uZBDMVRAJKlW3ogmiRRMP--XS4kMnAk,388
|
|
9
|
+
cve_sentinel/analyzers/base.py,sha256=UJE_G4gHv-vAjFOkZ7nt6jBgeue7I8zN_gqmCblfcEs,8500
|
|
10
|
+
cve_sentinel/analyzers/go.py,sha256=GTzAPmeh7Q2_mNf9YWhr8zMyut0C2Wlq8CM5hugJmbU,6232
|
|
11
|
+
cve_sentinel/analyzers/maven.py,sha256=cMd6tTJNp8GEeqp7YC65ThCnqnj6FbgvrwxY7lXsDdo,10209
|
|
12
|
+
cve_sentinel/analyzers/npm.py,sha256=i8e08omv9Wchz32QRnIhpteifoNA7h23Z2TfsTAvAdM,19100
|
|
13
|
+
cve_sentinel/analyzers/php.py,sha256=OBeytOrXumkZ6W5MiMHnhWZBFdV95mf3suooRScYP2k,7461
|
|
14
|
+
cve_sentinel/analyzers/python.py,sha256=MKBHJLuhr7ceMgTtT3xlTXl1xAIrpg7r_XqnxMX_vg4,15379
|
|
15
|
+
cve_sentinel/analyzers/ruby.py,sha256=zFwsUNavYaOBiD6MdDeFlyMg_TXSrJRkQ_4j1PAzNZk,6111
|
|
16
|
+
cve_sentinel/analyzers/rust.py,sha256=6IH4wqIgdMOGHoPowb4VXyFcM0X0GfdjFegX0hFR--g,6137
|
|
17
|
+
cve_sentinel/fetchers/__init__.py,sha256=lqAp52R6EyYC7MfgYo287Ymh_gtik8vAJ3dqLv327M8,485
|
|
18
|
+
cve_sentinel/fetchers/nvd.py,sha256=ovzzo1y0CR1QF5daEvwPeUqjgEPvPCdW3VTIpWyl6Fw,17618
|
|
19
|
+
cve_sentinel/fetchers/osv.py,sha256=cBvJVqY15ful94UvwWZ_l5fKfp1j4v2S12A8EtTQNfg,25061
|
|
20
|
+
cve_sentinel/scanners/__init__.py,sha256=htV1OmddHB-vEKSbCp3sN3zizXqI_Kqeg21jkiNKKsc,262
|
|
21
|
+
cve_sentinel/scanners/import_scanner.py,sha256=bXUjFptC63ah7BRbiY_JyPSvqvQ2GK3iSpPJRIy58AU,31249
|
|
22
|
+
cve_sentinel/utils/__init__.py,sha256=i6d_QBSU-o16PBsc8jf4SkbafpQgxLhxhTKyCmDk4bA,105
|
|
23
|
+
cve_sentinel/utils/cache.py,sha256=M5T0U4tsDXqYOLx1YBhTcOkrGPpWZMWkqa8AwGJhTV8,1884
|
|
24
|
+
cve_sentinel-0.1.2.dist-info/METADATA,sha256=N7XlhmseWWD68oClZ7YnopErkw8QHdxzFEHj1ipRfl8,13146
|
|
25
|
+
cve_sentinel-0.1.2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
26
|
+
cve_sentinel-0.1.2.dist-info/entry_points.txt,sha256=OCiZ0R3t_49TrRPZ0sjAifNLGZf_tX3t-XI6Mf8S7sM,55
|
|
27
|
+
cve_sentinel-0.1.2.dist-info/licenses/LICENSE,sha256=nKogRyhTBgdwgF4EvPOB_H4RPcUROXPDbhJr0UYmPdk,1074
|
|
28
|
+
cve_sentinel-0.1.2.dist-info/RECORD,,
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 CVE Sentinel Team
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|