lucidscan 0.1.11__tar.gz → 0.5.4__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.
- lucidscan-0.5.4/PKG-INFO +302 -0
- lucidscan-0.5.4/README.md +258 -0
- lucidscan-0.5.4/pyproject.toml +123 -0
- {lucidscan-0.1.11 → lucidscan-0.5.4}/src/lucidscan/__init__.py +1 -1
- {lucidscan-0.1.11 → lucidscan-0.5.4}/src/lucidscan/bootstrap/paths.py +38 -11
- lucidscan-0.5.4/src/lucidscan/cli/arguments.py +360 -0
- {lucidscan-0.1.11 → lucidscan-0.5.4}/src/lucidscan/cli/commands/__init__.py +13 -1
- lucidscan-0.5.4/src/lucidscan/cli/commands/init.py +399 -0
- {lucidscan-0.1.11 → lucidscan-0.5.4}/src/lucidscan/cli/commands/list_scanners.py +7 -2
- lucidscan-0.5.4/src/lucidscan/cli/commands/scan.py +204 -0
- lucidscan-0.5.4/src/lucidscan/cli/commands/serve.py +142 -0
- lucidscan-0.5.4/src/lucidscan/cli/commands/setup.py +655 -0
- {lucidscan-0.1.11 → lucidscan-0.5.4}/src/lucidscan/cli/commands/status.py +10 -4
- {lucidscan-0.1.11 → lucidscan-0.5.4}/src/lucidscan/cli/config_bridge.py +47 -24
- lucidscan-0.5.4/src/lucidscan/cli/runner.py +244 -0
- {lucidscan-0.1.11 → lucidscan-0.5.4}/src/lucidscan/config/loader.py +114 -2
- {lucidscan-0.1.11 → lucidscan-0.5.4}/src/lucidscan/config/models.py +117 -2
- {lucidscan-0.1.11 → lucidscan-0.5.4}/src/lucidscan/config/validation.py +70 -13
- lucidscan-0.5.4/src/lucidscan/core/domain_runner.py +447 -0
- {lucidscan-0.1.11 → lucidscan-0.5.4}/src/lucidscan/core/models.py +22 -4
- lucidscan-0.5.4/src/lucidscan/detection/__init__.py +22 -0
- lucidscan-0.5.4/src/lucidscan/detection/ci.py +111 -0
- lucidscan-0.5.4/src/lucidscan/detection/detector.py +162 -0
- lucidscan-0.5.4/src/lucidscan/detection/frameworks.py +270 -0
- lucidscan-0.5.4/src/lucidscan/detection/languages.py +328 -0
- lucidscan-0.5.4/src/lucidscan/detection/tools.py +217 -0
- lucidscan-0.5.4/src/lucidscan/generation/__init__.py +18 -0
- lucidscan-0.5.4/src/lucidscan/generation/ci_generator.py +299 -0
- lucidscan-0.5.4/src/lucidscan/generation/config_generator.py +278 -0
- lucidscan-0.5.4/src/lucidscan/generation/package_installer.py +330 -0
- lucidscan-0.5.4/src/lucidscan/mcp/__init__.py +20 -0
- lucidscan-0.5.4/src/lucidscan/mcp/formatter.py +383 -0
- lucidscan-0.5.4/src/lucidscan/mcp/server.py +189 -0
- lucidscan-0.5.4/src/lucidscan/mcp/tools.py +341 -0
- lucidscan-0.5.4/src/lucidscan/mcp/watcher.py +237 -0
- {lucidscan-0.1.11 → lucidscan-0.5.4}/src/lucidscan/pipeline/executor.py +1 -1
- {lucidscan-0.1.11 → lucidscan-0.5.4}/src/lucidscan/pipeline/parallel.py +4 -4
- lucidscan-0.5.4/src/lucidscan/plugins/__init__.py +40 -0
- lucidscan-0.5.4/src/lucidscan/plugins/coverage/__init__.py +28 -0
- lucidscan-0.5.4/src/lucidscan/plugins/coverage/base.py +139 -0
- lucidscan-0.5.4/src/lucidscan/plugins/coverage/coverage_py.py +392 -0
- lucidscan-0.5.4/src/lucidscan/plugins/coverage/istanbul.py +408 -0
- {lucidscan-0.1.11 → lucidscan-0.5.4}/src/lucidscan/plugins/discovery.py +17 -3
- {lucidscan-0.1.11/src/lucidscan → lucidscan-0.5.4/src/lucidscan/plugins}/enrichers/__init__.py +1 -1
- {lucidscan-0.1.11/src/lucidscan → lucidscan-0.5.4/src/lucidscan/plugins}/enrichers/ai/__init__.py +3 -3
- {lucidscan-0.1.11/src/lucidscan → lucidscan-0.5.4/src/lucidscan/plugins}/enrichers/ai/prompts.py +4 -4
- {lucidscan-0.1.11/src/lucidscan → lucidscan-0.5.4/src/lucidscan/plugins}/enrichers/ai/providers.py +14 -0
- {lucidscan-0.1.11/src/lucidscan → lucidscan-0.5.4/src/lucidscan/plugins}/enrichers/ai_explainer.py +26 -12
- lucidscan-0.5.4/src/lucidscan/plugins/linters/__init__.py +26 -0
- lucidscan-0.5.4/src/lucidscan/plugins/linters/base.py +125 -0
- lucidscan-0.5.4/src/lucidscan/plugins/linters/biome.py +433 -0
- lucidscan-0.5.4/src/lucidscan/plugins/linters/checkstyle.py +391 -0
- lucidscan-0.5.4/src/lucidscan/plugins/linters/eslint.py +362 -0
- lucidscan-0.5.4/src/lucidscan/plugins/linters/ruff.py +487 -0
- {lucidscan-0.1.11/src/lucidscan → lucidscan-0.5.4/src/lucidscan/plugins}/reporters/__init__.py +5 -5
- {lucidscan-0.1.11/src/lucidscan → lucidscan-0.5.4/src/lucidscan/plugins}/reporters/json_reporter.py +1 -1
- {lucidscan-0.1.11/src/lucidscan → lucidscan-0.5.4/src/lucidscan/plugins}/reporters/sarif_reporter.py +1 -1
- {lucidscan-0.1.11/src/lucidscan → lucidscan-0.5.4/src/lucidscan/plugins}/reporters/summary_reporter.py +1 -1
- {lucidscan-0.1.11/src/lucidscan → lucidscan-0.5.4/src/lucidscan/plugins}/reporters/table_reporter.py +1 -1
- {lucidscan-0.1.11/src/lucidscan → lucidscan-0.5.4/src/lucidscan/plugins}/scanners/__init__.py +24 -8
- {lucidscan-0.1.11/src/lucidscan → lucidscan-0.5.4/src/lucidscan/plugins}/scanners/base.py +10 -1
- {lucidscan-0.1.11/src/lucidscan → lucidscan-0.5.4/src/lucidscan/plugins}/scanners/checkov.py +63 -5
- {lucidscan-0.1.11/src/lucidscan → lucidscan-0.5.4/src/lucidscan/plugins}/scanners/opengrep.py +20 -5
- {lucidscan-0.1.11/src/lucidscan → lucidscan-0.5.4/src/lucidscan/plugins}/scanners/trivy.py +33 -8
- lucidscan-0.5.4/src/lucidscan/plugins/test_runners/__init__.py +27 -0
- lucidscan-0.5.4/src/lucidscan/plugins/test_runners/base.py +111 -0
- lucidscan-0.5.4/src/lucidscan/plugins/test_runners/jest.py +375 -0
- lucidscan-0.5.4/src/lucidscan/plugins/test_runners/pytest.py +587 -0
- lucidscan-0.5.4/src/lucidscan/plugins/type_checkers/__init__.py +27 -0
- lucidscan-0.5.4/src/lucidscan/plugins/type_checkers/base.py +106 -0
- lucidscan-0.5.4/src/lucidscan/plugins/type_checkers/mypy.py +293 -0
- lucidscan-0.5.4/src/lucidscan/plugins/type_checkers/pyright.py +308 -0
- lucidscan-0.5.4/src/lucidscan/plugins/type_checkers/typescript.py +274 -0
- lucidscan-0.5.4/src/lucidscan.egg-info/PKG-INFO +302 -0
- lucidscan-0.5.4/src/lucidscan.egg-info/SOURCES.txt +93 -0
- lucidscan-0.5.4/src/lucidscan.egg-info/entry_points.txt +35 -0
- {lucidscan-0.1.11 → lucidscan-0.5.4}/src/lucidscan.egg-info/requires.txt +8 -0
- lucidscan-0.1.11/PKG-INFO +0 -176
- lucidscan-0.1.11/README.md +0 -140
- lucidscan-0.1.11/pyproject.toml +0 -81
- lucidscan-0.1.11/src/lucidscan/cli/arguments.py +0 -181
- lucidscan-0.1.11/src/lucidscan/cli/commands/scan.py +0 -181
- lucidscan-0.1.11/src/lucidscan/cli/runner.py +0 -130
- lucidscan-0.1.11/src/lucidscan/plugins/__init__.py +0 -28
- lucidscan-0.1.11/src/lucidscan.egg-info/PKG-INFO +0 -176
- lucidscan-0.1.11/src/lucidscan.egg-info/SOURCES.txt +0 -55
- lucidscan-0.1.11/src/lucidscan.egg-info/entry_points.txt +0 -16
- {lucidscan-0.1.11 → lucidscan-0.5.4}/LICENSE +0 -0
- {lucidscan-0.1.11 → lucidscan-0.5.4}/setup.cfg +0 -0
- {lucidscan-0.1.11 → lucidscan-0.5.4}/src/lucidscan/bootstrap/__init__.py +0 -0
- {lucidscan-0.1.11 → lucidscan-0.5.4}/src/lucidscan/bootstrap/platform.py +0 -0
- {lucidscan-0.1.11 → lucidscan-0.5.4}/src/lucidscan/bootstrap/validation.py +0 -0
- {lucidscan-0.1.11 → lucidscan-0.5.4}/src/lucidscan/cli/__init__.py +0 -0
- {lucidscan-0.1.11 → lucidscan-0.5.4}/src/lucidscan/cli/__main__.py +0 -0
- {lucidscan-0.1.11 → lucidscan-0.5.4}/src/lucidscan/cli/exit_codes.py +0 -0
- {lucidscan-0.1.11 → lucidscan-0.5.4}/src/lucidscan/config/__init__.py +0 -0
- {lucidscan-0.1.11 → lucidscan-0.5.4}/src/lucidscan/config/ignore.py +0 -0
- {lucidscan-0.1.11 → lucidscan-0.5.4}/src/lucidscan/core/__init__.py +0 -0
- {lucidscan-0.1.11 → lucidscan-0.5.4}/src/lucidscan/core/logging.py +0 -0
- {lucidscan-0.1.11 → lucidscan-0.5.4}/src/lucidscan/pipeline/__init__.py +0 -0
- {lucidscan-0.1.11/src/lucidscan → lucidscan-0.5.4/src/lucidscan/plugins}/enrichers/ai/cache.py +0 -0
- {lucidscan-0.1.11/src/lucidscan → lucidscan-0.5.4/src/lucidscan/plugins}/enrichers/base.py +0 -0
- {lucidscan-0.1.11/src/lucidscan → lucidscan-0.5.4/src/lucidscan/plugins}/reporters/base.py +0 -0
- {lucidscan-0.1.11 → lucidscan-0.5.4}/src/lucidscan.egg-info/dependency_links.txt +0 -0
- {lucidscan-0.1.11 → lucidscan-0.5.4}/src/lucidscan.egg-info/top_level.txt +0 -0
lucidscan-0.5.4/PKG-INFO
ADDED
|
@@ -0,0 +1,302 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: lucidscan
|
|
3
|
+
Version: 0.5.4
|
|
4
|
+
Summary: LucidScan - The trust layer for AI-assisted development
|
|
5
|
+
Author-email: Voldeq GmbH <toni.antunovic@voldeq.com>
|
|
6
|
+
License: Apache-2.0
|
|
7
|
+
Keywords: security,scanner,devsecops,sast,sca,iac,container,vulnerability,trivy,semgrep,checkov,cli,mcp,ai,claude,cursor,linting,type-checking,testing,coverage
|
|
8
|
+
Classifier: Development Status :: 4 - Beta
|
|
9
|
+
Classifier: Environment :: Console
|
|
10
|
+
Classifier: Intended Audience :: Developers
|
|
11
|
+
Classifier: Intended Audience :: Information Technology
|
|
12
|
+
Classifier: Intended Audience :: System Administrators
|
|
13
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
14
|
+
Classifier: Operating System :: MacOS
|
|
15
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
20
|
+
Classifier: Topic :: Security
|
|
21
|
+
Classifier: Topic :: Software Development :: Quality Assurance
|
|
22
|
+
Classifier: Topic :: Software Development :: Testing
|
|
23
|
+
Classifier: Typing :: Typed
|
|
24
|
+
Requires-Python: >=3.10
|
|
25
|
+
Description-Content-Type: text/markdown
|
|
26
|
+
License-File: LICENSE
|
|
27
|
+
Requires-Dist: PyYAML>=6.0
|
|
28
|
+
Requires-Dist: pathspec>=0.12.0
|
|
29
|
+
Requires-Dist: langchain-core>=0.3
|
|
30
|
+
Requires-Dist: langchain-openai>=0.2
|
|
31
|
+
Requires-Dist: langchain-anthropic>=0.2
|
|
32
|
+
Requires-Dist: langchain-ollama>=0.2
|
|
33
|
+
Requires-Dist: questionary>=2.0
|
|
34
|
+
Requires-Dist: Jinja2>=3.0
|
|
35
|
+
Requires-Dist: mcp>=1.0.0
|
|
36
|
+
Requires-Dist: watchdog>=4.0.0
|
|
37
|
+
Requires-Dist: defusedxml>=0.7.1
|
|
38
|
+
Provides-Extra: dev
|
|
39
|
+
Requires-Dist: pytest>=7.0; extra == "dev"
|
|
40
|
+
Requires-Dist: pytest-asyncio>=0.23.0; extra == "dev"
|
|
41
|
+
Requires-Dist: mypy>=1.0; extra == "dev"
|
|
42
|
+
Requires-Dist: pyright>=1.1; extra == "dev"
|
|
43
|
+
Dynamic: license-file
|
|
44
|
+
|
|
45
|
+
# LucidScan
|
|
46
|
+
|
|
47
|
+
[](https://github.com/voldeq/lucidscan/actions/workflows/ci.yml)
|
|
48
|
+
[](https://codecov.io/gh/voldeq/lucidscan)
|
|
49
|
+
[](https://pypi.org/project/lucidscan/)
|
|
50
|
+
[](https://pypi.org/project/lucidscan/)
|
|
51
|
+
[](https://github.com/voldeq/lucidscan/blob/main/LICENSE)
|
|
52
|
+
|
|
53
|
+
**The trust layer for AI-assisted development.**
|
|
54
|
+
|
|
55
|
+
LucidScan unifies linting, type checking, security scanning, testing, and coverage into a single pipeline that auto-configures for any project and integrates with AI coding tools like Claude Code and Cursor.
|
|
56
|
+
|
|
57
|
+
```
|
|
58
|
+
AI writes code → LucidScan checks → AI fixes → repeat
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## Quick Start
|
|
62
|
+
|
|
63
|
+
### Installation
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
pip install lucidscan
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
### Console Usage
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
# Initialize for your project (auto-detects languages and tools)
|
|
73
|
+
lucidscan init
|
|
74
|
+
|
|
75
|
+
# Run the full quality pipeline
|
|
76
|
+
lucidscan scan --all
|
|
77
|
+
|
|
78
|
+
# Run specific checks
|
|
79
|
+
lucidscan scan --lint # Linting (Ruff, ESLint, Biome)
|
|
80
|
+
lucidscan scan --type-check # Type checking (mypy, pyright, tsc)
|
|
81
|
+
lucidscan scan --sast # Security code analysis (OpenGrep)
|
|
82
|
+
lucidscan scan --sca # Dependency vulnerabilities (Trivy)
|
|
83
|
+
lucidscan scan --test # Run tests (pytest, Jest)
|
|
84
|
+
lucidscan scan --coverage # Coverage analysis
|
|
85
|
+
|
|
86
|
+
# Auto-fix linting issues
|
|
87
|
+
lucidscan scan --lint --fix
|
|
88
|
+
|
|
89
|
+
# Check tool status
|
|
90
|
+
lucidscan status
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
### Claude Code Integration
|
|
94
|
+
|
|
95
|
+
The easiest way to set up Claude Code:
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
lucidscan setup --claude-code
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
This command:
|
|
102
|
+
- Adds LucidScan to your Claude Code MCP configuration (`.mcp.json`)
|
|
103
|
+
- Creates `.claude/CLAUDE.md` with instructions for Claude on when and how to run scans (tiered workflow: fast scans after code changes, full scans before commits)
|
|
104
|
+
|
|
105
|
+
Restart Claude Code to activate.
|
|
106
|
+
|
|
107
|
+
**Manual setup** (if preferred):
|
|
108
|
+
|
|
109
|
+
Create `.mcp.json` in your project root:
|
|
110
|
+
|
|
111
|
+
```json
|
|
112
|
+
{
|
|
113
|
+
"mcpServers": {
|
|
114
|
+
"lucidscan": {
|
|
115
|
+
"command": ".venv/bin/lucidscan",
|
|
116
|
+
"args": ["serve", "--mcp"]
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
This project-scoped configuration uses a relative path to your venv, making it portable and suitable for version control. Adjust the path based on your virtual environment location.
|
|
123
|
+
|
|
124
|
+
Once configured, Claude Code can:
|
|
125
|
+
- Run quality checks on code it writes
|
|
126
|
+
- Get structured fix instructions with priorities
|
|
127
|
+
- Apply auto-fixes for linting issues
|
|
128
|
+
|
|
129
|
+
### Cursor Integration
|
|
130
|
+
|
|
131
|
+
```bash
|
|
132
|
+
lucidscan setup --cursor
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
This command:
|
|
136
|
+
- Adds LucidScan to Cursor's MCP configuration (`~/.cursor/mcp.json`)
|
|
137
|
+
- Creates `.cursor/rules/lucidscan.mdc` with rules that instruct Cursor to run scans automatically after code changes
|
|
138
|
+
|
|
139
|
+
Or manually add to `~/.cursor/mcp.json`:
|
|
140
|
+
|
|
141
|
+
```json
|
|
142
|
+
{
|
|
143
|
+
"mcpServers": {
|
|
144
|
+
"lucidscan": {
|
|
145
|
+
"command": "lucidscan",
|
|
146
|
+
"args": ["serve", "--mcp"]
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
### Configure All AI Tools
|
|
153
|
+
|
|
154
|
+
```bash
|
|
155
|
+
lucidscan setup --all
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
This configures both Claude Code and Cursor with their respective MCP configurations and instruction files.
|
|
159
|
+
|
|
160
|
+
## What It Checks
|
|
161
|
+
|
|
162
|
+
| Domain | Tools | What It Catches |
|
|
163
|
+
|--------|-------|-----------------|
|
|
164
|
+
| **Linting** | Ruff, ESLint, Biome, Checkstyle | Style issues, code smells |
|
|
165
|
+
| **Type Checking** | mypy, pyright, TypeScript | Type errors |
|
|
166
|
+
| **Security (SAST)** | OpenGrep | Code vulnerabilities |
|
|
167
|
+
| **Security (SCA)** | Trivy | Dependency vulnerabilities |
|
|
168
|
+
| **Security (IaC)** | Checkov | Infrastructure misconfigurations |
|
|
169
|
+
| **Testing** | pytest, Jest | Test failures |
|
|
170
|
+
| **Coverage** | coverage.py, Istanbul | Coverage gaps |
|
|
171
|
+
|
|
172
|
+
All results are normalized to a common format. One exit code for CI.
|
|
173
|
+
|
|
174
|
+
## CI Integration
|
|
175
|
+
|
|
176
|
+
### GitHub Actions
|
|
177
|
+
|
|
178
|
+
```yaml
|
|
179
|
+
name: Quality
|
|
180
|
+
|
|
181
|
+
on: [push, pull_request]
|
|
182
|
+
|
|
183
|
+
jobs:
|
|
184
|
+
quality:
|
|
185
|
+
runs-on: ubuntu-latest
|
|
186
|
+
steps:
|
|
187
|
+
- uses: actions/checkout@v4
|
|
188
|
+
- run: pip install lucidscan
|
|
189
|
+
- run: lucidscan scan --all
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
### With SARIF Upload (GitHub Code Scanning)
|
|
193
|
+
|
|
194
|
+
```yaml
|
|
195
|
+
- run: lucidscan scan --all --format sarif > results.sarif
|
|
196
|
+
- uses: github/codeql-action/upload-sarif@v3
|
|
197
|
+
with:
|
|
198
|
+
sarif_file: results.sarif
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
### GitLab CI
|
|
202
|
+
|
|
203
|
+
```yaml
|
|
204
|
+
lucidscan:
|
|
205
|
+
image: python:3.11
|
|
206
|
+
script:
|
|
207
|
+
- pip install lucidscan
|
|
208
|
+
- lucidscan scan --all
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
## Configuration
|
|
212
|
+
|
|
213
|
+
LucidScan auto-detects your project. For custom settings, create `lucidscan.yml`:
|
|
214
|
+
|
|
215
|
+
```yaml
|
|
216
|
+
version: 1
|
|
217
|
+
|
|
218
|
+
pipeline:
|
|
219
|
+
linting:
|
|
220
|
+
enabled: true
|
|
221
|
+
tools:
|
|
222
|
+
- name: ruff
|
|
223
|
+
|
|
224
|
+
type_checking:
|
|
225
|
+
enabled: true
|
|
226
|
+
tools:
|
|
227
|
+
- name: mypy
|
|
228
|
+
strict: true
|
|
229
|
+
|
|
230
|
+
security:
|
|
231
|
+
enabled: true
|
|
232
|
+
tools:
|
|
233
|
+
- name: trivy
|
|
234
|
+
- name: opengrep
|
|
235
|
+
|
|
236
|
+
testing:
|
|
237
|
+
enabled: true
|
|
238
|
+
tools:
|
|
239
|
+
- name: pytest
|
|
240
|
+
|
|
241
|
+
coverage:
|
|
242
|
+
enabled: true
|
|
243
|
+
threshold: 80
|
|
244
|
+
|
|
245
|
+
fail_on:
|
|
246
|
+
linting: error
|
|
247
|
+
security: high
|
|
248
|
+
testing: any
|
|
249
|
+
|
|
250
|
+
ignore:
|
|
251
|
+
- "**/node_modules/**"
|
|
252
|
+
- "**/.venv/**"
|
|
253
|
+
```
|
|
254
|
+
|
|
255
|
+
## CLI Reference
|
|
256
|
+
|
|
257
|
+
```bash
|
|
258
|
+
# Initialize project
|
|
259
|
+
lucidscan init [--ci github|gitlab|bitbucket] [--non-interactive]
|
|
260
|
+
|
|
261
|
+
# Run quality pipeline
|
|
262
|
+
lucidscan scan [--lint] [--type-check] [--sca] [--sast] [--iac] [--test] [--coverage] [--all]
|
|
263
|
+
lucidscan scan [--fix] [--format table|json|sarif|summary]
|
|
264
|
+
lucidscan scan [--fail-on critical|high|medium|low]
|
|
265
|
+
|
|
266
|
+
# AI tool integration
|
|
267
|
+
lucidscan serve --mcp # Run MCP server
|
|
268
|
+
lucidscan serve --watch # Watch mode with auto-checking
|
|
269
|
+
lucidscan setup --claude-code # Configure Claude Code
|
|
270
|
+
lucidscan setup --cursor # Configure Cursor
|
|
271
|
+
lucidscan setup --all # Configure all AI tools
|
|
272
|
+
|
|
273
|
+
# Show status
|
|
274
|
+
lucidscan status [--tools]
|
|
275
|
+
```
|
|
276
|
+
|
|
277
|
+
## Exit Codes
|
|
278
|
+
|
|
279
|
+
| Code | Meaning |
|
|
280
|
+
|------|---------|
|
|
281
|
+
| 0 | All checks passed |
|
|
282
|
+
| 1 | Issues found above threshold |
|
|
283
|
+
| 2 | Tool execution error |
|
|
284
|
+
| 3 | Configuration error |
|
|
285
|
+
|
|
286
|
+
## Development
|
|
287
|
+
|
|
288
|
+
```bash
|
|
289
|
+
git clone https://github.com/voldeq/lucidscan.git
|
|
290
|
+
cd lucidscan
|
|
291
|
+
pip install -e ".[dev]"
|
|
292
|
+
pytest tests/
|
|
293
|
+
```
|
|
294
|
+
|
|
295
|
+
## Documentation
|
|
296
|
+
|
|
297
|
+
- [Full Specification](docs/main.md)
|
|
298
|
+
- [Roadmap](docs/roadmap.md)
|
|
299
|
+
|
|
300
|
+
## License
|
|
301
|
+
|
|
302
|
+
Apache 2.0
|
|
@@ -0,0 +1,258 @@
|
|
|
1
|
+
# LucidScan
|
|
2
|
+
|
|
3
|
+
[](https://github.com/voldeq/lucidscan/actions/workflows/ci.yml)
|
|
4
|
+
[](https://codecov.io/gh/voldeq/lucidscan)
|
|
5
|
+
[](https://pypi.org/project/lucidscan/)
|
|
6
|
+
[](https://pypi.org/project/lucidscan/)
|
|
7
|
+
[](https://github.com/voldeq/lucidscan/blob/main/LICENSE)
|
|
8
|
+
|
|
9
|
+
**The trust layer for AI-assisted development.**
|
|
10
|
+
|
|
11
|
+
LucidScan unifies linting, type checking, security scanning, testing, and coverage into a single pipeline that auto-configures for any project and integrates with AI coding tools like Claude Code and Cursor.
|
|
12
|
+
|
|
13
|
+
```
|
|
14
|
+
AI writes code → LucidScan checks → AI fixes → repeat
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Quick Start
|
|
18
|
+
|
|
19
|
+
### Installation
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
pip install lucidscan
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
### Console Usage
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
# Initialize for your project (auto-detects languages and tools)
|
|
29
|
+
lucidscan init
|
|
30
|
+
|
|
31
|
+
# Run the full quality pipeline
|
|
32
|
+
lucidscan scan --all
|
|
33
|
+
|
|
34
|
+
# Run specific checks
|
|
35
|
+
lucidscan scan --lint # Linting (Ruff, ESLint, Biome)
|
|
36
|
+
lucidscan scan --type-check # Type checking (mypy, pyright, tsc)
|
|
37
|
+
lucidscan scan --sast # Security code analysis (OpenGrep)
|
|
38
|
+
lucidscan scan --sca # Dependency vulnerabilities (Trivy)
|
|
39
|
+
lucidscan scan --test # Run tests (pytest, Jest)
|
|
40
|
+
lucidscan scan --coverage # Coverage analysis
|
|
41
|
+
|
|
42
|
+
# Auto-fix linting issues
|
|
43
|
+
lucidscan scan --lint --fix
|
|
44
|
+
|
|
45
|
+
# Check tool status
|
|
46
|
+
lucidscan status
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
### Claude Code Integration
|
|
50
|
+
|
|
51
|
+
The easiest way to set up Claude Code:
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
lucidscan setup --claude-code
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
This command:
|
|
58
|
+
- Adds LucidScan to your Claude Code MCP configuration (`.mcp.json`)
|
|
59
|
+
- Creates `.claude/CLAUDE.md` with instructions for Claude on when and how to run scans (tiered workflow: fast scans after code changes, full scans before commits)
|
|
60
|
+
|
|
61
|
+
Restart Claude Code to activate.
|
|
62
|
+
|
|
63
|
+
**Manual setup** (if preferred):
|
|
64
|
+
|
|
65
|
+
Create `.mcp.json` in your project root:
|
|
66
|
+
|
|
67
|
+
```json
|
|
68
|
+
{
|
|
69
|
+
"mcpServers": {
|
|
70
|
+
"lucidscan": {
|
|
71
|
+
"command": ".venv/bin/lucidscan",
|
|
72
|
+
"args": ["serve", "--mcp"]
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
This project-scoped configuration uses a relative path to your venv, making it portable and suitable for version control. Adjust the path based on your virtual environment location.
|
|
79
|
+
|
|
80
|
+
Once configured, Claude Code can:
|
|
81
|
+
- Run quality checks on code it writes
|
|
82
|
+
- Get structured fix instructions with priorities
|
|
83
|
+
- Apply auto-fixes for linting issues
|
|
84
|
+
|
|
85
|
+
### Cursor Integration
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
lucidscan setup --cursor
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
This command:
|
|
92
|
+
- Adds LucidScan to Cursor's MCP configuration (`~/.cursor/mcp.json`)
|
|
93
|
+
- Creates `.cursor/rules/lucidscan.mdc` with rules that instruct Cursor to run scans automatically after code changes
|
|
94
|
+
|
|
95
|
+
Or manually add to `~/.cursor/mcp.json`:
|
|
96
|
+
|
|
97
|
+
```json
|
|
98
|
+
{
|
|
99
|
+
"mcpServers": {
|
|
100
|
+
"lucidscan": {
|
|
101
|
+
"command": "lucidscan",
|
|
102
|
+
"args": ["serve", "--mcp"]
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
### Configure All AI Tools
|
|
109
|
+
|
|
110
|
+
```bash
|
|
111
|
+
lucidscan setup --all
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
This configures both Claude Code and Cursor with their respective MCP configurations and instruction files.
|
|
115
|
+
|
|
116
|
+
## What It Checks
|
|
117
|
+
|
|
118
|
+
| Domain | Tools | What It Catches |
|
|
119
|
+
|--------|-------|-----------------|
|
|
120
|
+
| **Linting** | Ruff, ESLint, Biome, Checkstyle | Style issues, code smells |
|
|
121
|
+
| **Type Checking** | mypy, pyright, TypeScript | Type errors |
|
|
122
|
+
| **Security (SAST)** | OpenGrep | Code vulnerabilities |
|
|
123
|
+
| **Security (SCA)** | Trivy | Dependency vulnerabilities |
|
|
124
|
+
| **Security (IaC)** | Checkov | Infrastructure misconfigurations |
|
|
125
|
+
| **Testing** | pytest, Jest | Test failures |
|
|
126
|
+
| **Coverage** | coverage.py, Istanbul | Coverage gaps |
|
|
127
|
+
|
|
128
|
+
All results are normalized to a common format. One exit code for CI.
|
|
129
|
+
|
|
130
|
+
## CI Integration
|
|
131
|
+
|
|
132
|
+
### GitHub Actions
|
|
133
|
+
|
|
134
|
+
```yaml
|
|
135
|
+
name: Quality
|
|
136
|
+
|
|
137
|
+
on: [push, pull_request]
|
|
138
|
+
|
|
139
|
+
jobs:
|
|
140
|
+
quality:
|
|
141
|
+
runs-on: ubuntu-latest
|
|
142
|
+
steps:
|
|
143
|
+
- uses: actions/checkout@v4
|
|
144
|
+
- run: pip install lucidscan
|
|
145
|
+
- run: lucidscan scan --all
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
### With SARIF Upload (GitHub Code Scanning)
|
|
149
|
+
|
|
150
|
+
```yaml
|
|
151
|
+
- run: lucidscan scan --all --format sarif > results.sarif
|
|
152
|
+
- uses: github/codeql-action/upload-sarif@v3
|
|
153
|
+
with:
|
|
154
|
+
sarif_file: results.sarif
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
### GitLab CI
|
|
158
|
+
|
|
159
|
+
```yaml
|
|
160
|
+
lucidscan:
|
|
161
|
+
image: python:3.11
|
|
162
|
+
script:
|
|
163
|
+
- pip install lucidscan
|
|
164
|
+
- lucidscan scan --all
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
## Configuration
|
|
168
|
+
|
|
169
|
+
LucidScan auto-detects your project. For custom settings, create `lucidscan.yml`:
|
|
170
|
+
|
|
171
|
+
```yaml
|
|
172
|
+
version: 1
|
|
173
|
+
|
|
174
|
+
pipeline:
|
|
175
|
+
linting:
|
|
176
|
+
enabled: true
|
|
177
|
+
tools:
|
|
178
|
+
- name: ruff
|
|
179
|
+
|
|
180
|
+
type_checking:
|
|
181
|
+
enabled: true
|
|
182
|
+
tools:
|
|
183
|
+
- name: mypy
|
|
184
|
+
strict: true
|
|
185
|
+
|
|
186
|
+
security:
|
|
187
|
+
enabled: true
|
|
188
|
+
tools:
|
|
189
|
+
- name: trivy
|
|
190
|
+
- name: opengrep
|
|
191
|
+
|
|
192
|
+
testing:
|
|
193
|
+
enabled: true
|
|
194
|
+
tools:
|
|
195
|
+
- name: pytest
|
|
196
|
+
|
|
197
|
+
coverage:
|
|
198
|
+
enabled: true
|
|
199
|
+
threshold: 80
|
|
200
|
+
|
|
201
|
+
fail_on:
|
|
202
|
+
linting: error
|
|
203
|
+
security: high
|
|
204
|
+
testing: any
|
|
205
|
+
|
|
206
|
+
ignore:
|
|
207
|
+
- "**/node_modules/**"
|
|
208
|
+
- "**/.venv/**"
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
## CLI Reference
|
|
212
|
+
|
|
213
|
+
```bash
|
|
214
|
+
# Initialize project
|
|
215
|
+
lucidscan init [--ci github|gitlab|bitbucket] [--non-interactive]
|
|
216
|
+
|
|
217
|
+
# Run quality pipeline
|
|
218
|
+
lucidscan scan [--lint] [--type-check] [--sca] [--sast] [--iac] [--test] [--coverage] [--all]
|
|
219
|
+
lucidscan scan [--fix] [--format table|json|sarif|summary]
|
|
220
|
+
lucidscan scan [--fail-on critical|high|medium|low]
|
|
221
|
+
|
|
222
|
+
# AI tool integration
|
|
223
|
+
lucidscan serve --mcp # Run MCP server
|
|
224
|
+
lucidscan serve --watch # Watch mode with auto-checking
|
|
225
|
+
lucidscan setup --claude-code # Configure Claude Code
|
|
226
|
+
lucidscan setup --cursor # Configure Cursor
|
|
227
|
+
lucidscan setup --all # Configure all AI tools
|
|
228
|
+
|
|
229
|
+
# Show status
|
|
230
|
+
lucidscan status [--tools]
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
## Exit Codes
|
|
234
|
+
|
|
235
|
+
| Code | Meaning |
|
|
236
|
+
|------|---------|
|
|
237
|
+
| 0 | All checks passed |
|
|
238
|
+
| 1 | Issues found above threshold |
|
|
239
|
+
| 2 | Tool execution error |
|
|
240
|
+
| 3 | Configuration error |
|
|
241
|
+
|
|
242
|
+
## Development
|
|
243
|
+
|
|
244
|
+
```bash
|
|
245
|
+
git clone https://github.com/voldeq/lucidscan.git
|
|
246
|
+
cd lucidscan
|
|
247
|
+
pip install -e ".[dev]"
|
|
248
|
+
pytest tests/
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
## Documentation
|
|
252
|
+
|
|
253
|
+
- [Full Specification](docs/main.md)
|
|
254
|
+
- [Roadmap](docs/roadmap.md)
|
|
255
|
+
|
|
256
|
+
## License
|
|
257
|
+
|
|
258
|
+
Apache 2.0
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
["build-system"]
|
|
2
|
+
requires = ["setuptools>=64", "wheel"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "lucidscan"
|
|
7
|
+
version = "0.5.4"
|
|
8
|
+
description = "LucidScan - The trust layer for AI-assisted development"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.10"
|
|
11
|
+
license = { text = "Apache-2.0" }
|
|
12
|
+
authors = [
|
|
13
|
+
{ name = "Voldeq GmbH", email = "toni.antunovic@voldeq.com" }
|
|
14
|
+
]
|
|
15
|
+
keywords = [
|
|
16
|
+
"security",
|
|
17
|
+
"scanner",
|
|
18
|
+
"devsecops",
|
|
19
|
+
"sast",
|
|
20
|
+
"sca",
|
|
21
|
+
"iac",
|
|
22
|
+
"container",
|
|
23
|
+
"vulnerability",
|
|
24
|
+
"trivy",
|
|
25
|
+
"semgrep",
|
|
26
|
+
"checkov",
|
|
27
|
+
"cli",
|
|
28
|
+
"mcp",
|
|
29
|
+
"ai",
|
|
30
|
+
"claude",
|
|
31
|
+
"cursor",
|
|
32
|
+
"linting",
|
|
33
|
+
"type-checking",
|
|
34
|
+
"testing",
|
|
35
|
+
"coverage",
|
|
36
|
+
]
|
|
37
|
+
classifiers = [
|
|
38
|
+
"Development Status :: 4 - Beta",
|
|
39
|
+
"Environment :: Console",
|
|
40
|
+
"Intended Audience :: Developers",
|
|
41
|
+
"Intended Audience :: Information Technology",
|
|
42
|
+
"Intended Audience :: System Administrators",
|
|
43
|
+
"License :: OSI Approved :: Apache Software License",
|
|
44
|
+
"Operating System :: MacOS",
|
|
45
|
+
"Operating System :: POSIX :: Linux",
|
|
46
|
+
"Programming Language :: Python :: 3",
|
|
47
|
+
"Programming Language :: Python :: 3.10",
|
|
48
|
+
"Programming Language :: Python :: 3.11",
|
|
49
|
+
"Programming Language :: Python :: 3.12",
|
|
50
|
+
"Topic :: Security",
|
|
51
|
+
"Topic :: Software Development :: Quality Assurance",
|
|
52
|
+
"Topic :: Software Development :: Testing",
|
|
53
|
+
"Typing :: Typed",
|
|
54
|
+
]
|
|
55
|
+
dependencies = [
|
|
56
|
+
"PyYAML>=6.0",
|
|
57
|
+
"pathspec>=0.12.0",
|
|
58
|
+
"langchain-core>=0.3",
|
|
59
|
+
"langchain-openai>=0.2",
|
|
60
|
+
"langchain-anthropic>=0.2",
|
|
61
|
+
"langchain-ollama>=0.2",
|
|
62
|
+
"questionary>=2.0",
|
|
63
|
+
"Jinja2>=3.0",
|
|
64
|
+
"mcp>=1.0.0",
|
|
65
|
+
"watchdog>=4.0.0",
|
|
66
|
+
"defusedxml>=0.7.1",
|
|
67
|
+
]
|
|
68
|
+
|
|
69
|
+
[project.optional-dependencies]
|
|
70
|
+
dev = [
|
|
71
|
+
"pytest>=7.0",
|
|
72
|
+
"pytest-asyncio>=0.23.0",
|
|
73
|
+
"mypy>=1.0",
|
|
74
|
+
"pyright>=1.1",
|
|
75
|
+
]
|
|
76
|
+
|
|
77
|
+
[project.scripts]
|
|
78
|
+
lucidscan = "lucidscan.cli:main"
|
|
79
|
+
|
|
80
|
+
[project.entry-points."lucidscan.scanners"]
|
|
81
|
+
trivy = "lucidscan.plugins.scanners.trivy:TrivyScanner"
|
|
82
|
+
opengrep = "lucidscan.plugins.scanners.opengrep:OpenGrepScanner"
|
|
83
|
+
checkov = "lucidscan.plugins.scanners.checkov:CheckovScanner"
|
|
84
|
+
|
|
85
|
+
[project.entry-points."lucidscan.reporters"]
|
|
86
|
+
json = "lucidscan.plugins.reporters.json_reporter:JSONReporter"
|
|
87
|
+
table = "lucidscan.plugins.reporters.table_reporter:TableReporter"
|
|
88
|
+
summary = "lucidscan.plugins.reporters.summary_reporter:SummaryReporter"
|
|
89
|
+
sarif = "lucidscan.plugins.reporters.sarif_reporter:SARIFReporter"
|
|
90
|
+
|
|
91
|
+
[project.entry-points."lucidscan.enrichers"]
|
|
92
|
+
ai_explainer = "lucidscan.plugins.enrichers.ai_explainer:AIExplainerEnricher"
|
|
93
|
+
|
|
94
|
+
[project.entry-points."lucidscan.linters"]
|
|
95
|
+
ruff = "lucidscan.plugins.linters.ruff:RuffLinter"
|
|
96
|
+
eslint = "lucidscan.plugins.linters.eslint:ESLintLinter"
|
|
97
|
+
biome = "lucidscan.plugins.linters.biome:BiomeLinter"
|
|
98
|
+
checkstyle = "lucidscan.plugins.linters.checkstyle:CheckstyleLinter"
|
|
99
|
+
|
|
100
|
+
[project.entry-points."lucidscan.type_checkers"]
|
|
101
|
+
mypy = "lucidscan.plugins.type_checkers.mypy:MypyChecker"
|
|
102
|
+
pyright = "lucidscan.plugins.type_checkers.pyright:PyrightChecker"
|
|
103
|
+
typescript = "lucidscan.plugins.type_checkers.typescript:TypeScriptChecker"
|
|
104
|
+
|
|
105
|
+
[project.entry-points."lucidscan.test_runners"]
|
|
106
|
+
pytest = "lucidscan.plugins.test_runners.pytest:PytestRunner"
|
|
107
|
+
jest = "lucidscan.plugins.test_runners.jest:JestRunner"
|
|
108
|
+
|
|
109
|
+
[project.entry-points."lucidscan.coverage"]
|
|
110
|
+
coverage_py = "lucidscan.plugins.coverage.coverage_py:CoveragePyPlugin"
|
|
111
|
+
istanbul = "lucidscan.plugins.coverage.istanbul:IstanbulPlugin"
|
|
112
|
+
|
|
113
|
+
# Pytest configuration
|
|
114
|
+
[tool.pytest.ini_options]
|
|
115
|
+
asyncio_mode = "auto"
|
|
116
|
+
asyncio_default_fixture_loop_scope = "function"
|
|
117
|
+
|
|
118
|
+
# Default scanner plugin versions
|
|
119
|
+
# These are the source of truth for the build process
|
|
120
|
+
[tool.lucidscan.scanners]
|
|
121
|
+
trivy = "0.68.1"
|
|
122
|
+
opengrep = "1.12.1"
|
|
123
|
+
checkov = "3.2.495"
|