licit-ai-cli 0.1.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.
- licit_ai_cli-0.1.0/.gitignore +45 -0
- licit_ai_cli-0.1.0/CHANGELOG.md +46 -0
- licit_ai_cli-0.1.0/LICENSE +21 -0
- licit_ai_cli-0.1.0/PKG-INFO +267 -0
- licit_ai_cli-0.1.0/README.md +246 -0
- licit_ai_cli-0.1.0/SECURITY.md +93 -0
- licit_ai_cli-0.1.0/SEGUIMIENTO-V0.md +271 -0
- licit_ai_cli-0.1.0/pyproject.toml +52 -0
- licit_ai_cli-0.1.0/src/licit/__init__.py +3 -0
- licit_ai_cli-0.1.0/src/licit/__main__.py +5 -0
- licit_ai_cli-0.1.0/src/licit/changelog/__init__.py +0 -0
- licit_ai_cli-0.1.0/src/licit/cli.py +555 -0
- licit_ai_cli-0.1.0/src/licit/config/__init__.py +0 -0
- licit_ai_cli-0.1.0/src/licit/config/defaults.py +12 -0
- licit_ai_cli-0.1.0/src/licit/config/loader.py +80 -0
- licit_ai_cli-0.1.0/src/licit/config/schema.py +116 -0
- licit_ai_cli-0.1.0/src/licit/connectors/__init__.py +0 -0
- licit_ai_cli-0.1.0/src/licit/core/__init__.py +0 -0
- licit_ai_cli-0.1.0/src/licit/core/evidence.py +213 -0
- licit_ai_cli-0.1.0/src/licit/core/models.py +118 -0
- licit_ai_cli-0.1.0/src/licit/core/project.py +307 -0
- licit_ai_cli-0.1.0/src/licit/frameworks/__init__.py +0 -0
- licit_ai_cli-0.1.0/src/licit/frameworks/eu_ai_act/__init__.py +0 -0
- licit_ai_cli-0.1.0/src/licit/frameworks/owasp_agentic/__init__.py +0 -0
- licit_ai_cli-0.1.0/src/licit/logging/__init__.py +0 -0
- licit_ai_cli-0.1.0/src/licit/logging/setup.py +29 -0
- licit_ai_cli-0.1.0/src/licit/provenance/__init__.py +0 -0
- licit_ai_cli-0.1.0/src/licit/provenance/session_readers/__init__.py +0 -0
- licit_ai_cli-0.1.0/src/licit/py.typed +0 -0
- licit_ai_cli-0.1.0/src/licit/reports/__init__.py +0 -0
- licit_ai_cli-0.1.0/tests/__init__.py +0 -0
- licit_ai_cli-0.1.0/tests/conftest.py +128 -0
- licit_ai_cli-0.1.0/tests/test_cli.py +228 -0
- licit_ai_cli-0.1.0/tests/test_config/__init__.py +0 -0
- licit_ai_cli-0.1.0/tests/test_config/test_loader.py +94 -0
- licit_ai_cli-0.1.0/tests/test_config/test_schema.py +64 -0
- licit_ai_cli-0.1.0/tests/test_core/__init__.py +0 -0
- licit_ai_cli-0.1.0/tests/test_core/test_evidence.py +176 -0
- licit_ai_cli-0.1.0/tests/test_core/test_project.py +155 -0
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# Python
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*$py.class
|
|
5
|
+
*.egg-info/
|
|
6
|
+
*.egg
|
|
7
|
+
dist/
|
|
8
|
+
build/
|
|
9
|
+
.eggs/
|
|
10
|
+
*.whl
|
|
11
|
+
|
|
12
|
+
# Virtual environments
|
|
13
|
+
.venv/
|
|
14
|
+
venv/
|
|
15
|
+
env/
|
|
16
|
+
|
|
17
|
+
# Testing
|
|
18
|
+
.pytest_cache/
|
|
19
|
+
.coverage
|
|
20
|
+
htmlcov/
|
|
21
|
+
.tox/
|
|
22
|
+
|
|
23
|
+
# IDE
|
|
24
|
+
.vscode/
|
|
25
|
+
.idea/
|
|
26
|
+
*.swp
|
|
27
|
+
*.swo
|
|
28
|
+
*~
|
|
29
|
+
|
|
30
|
+
# OS
|
|
31
|
+
.DS_Store
|
|
32
|
+
Thumbs.db
|
|
33
|
+
|
|
34
|
+
# vigil cache
|
|
35
|
+
.cache/
|
|
36
|
+
|
|
37
|
+
# Type checking
|
|
38
|
+
.mypy_cache/
|
|
39
|
+
.pytype/
|
|
40
|
+
|
|
41
|
+
# Config (user-specific)
|
|
42
|
+
.vigil.yaml
|
|
43
|
+
|
|
44
|
+
tmp/
|
|
45
|
+
.claude/
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [Unreleased]
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
#### Phase 1 — Foundation
|
|
13
|
+
|
|
14
|
+
- **Project structure** — Complete project scaffolding with `pyproject.toml`, editable install via hatchling, and full directory layout for all V0 modules.
|
|
15
|
+
- **Configuration system** (`src/licit/config/`)
|
|
16
|
+
- Pydantic v2 schema with 9 config models covering provenance, changelog, frameworks, connectors, FRIA, Annex IV, and report settings.
|
|
17
|
+
- YAML config loader with 3-level resolution: explicit path → `.licit.yaml` in cwd → defaults.
|
|
18
|
+
- `save_config()` for persisting configuration changes.
|
|
19
|
+
- **Core data models** (`src/licit/core/models.py`)
|
|
20
|
+
- 3 enums: `ComplianceStatus`, `ChangeSeverity`, `ProvenanceSource` (using `StrEnum`).
|
|
21
|
+
- 6 dataclasses: `ProvenanceRecord`, `ConfigChange`, `ControlRequirement`, `ControlResult`, `ComplianceSummary`, `GapItem`.
|
|
22
|
+
- **Project auto-detection** (`src/licit/core/project.py`)
|
|
23
|
+
- `ProjectDetector` with 8 detection methods: name, languages (Python/JS/TS/Go/Rust/Java), frameworks (FastAPI/Flask/Django/React/Next/Express), agent configs (10 patterns), CI/CD (GitHub Actions/GitLab CI/Jenkins/CircleCI), testing, security tools, git info.
|
|
24
|
+
- `ProjectContext` dataclass with 20+ fields across 6 categories.
|
|
25
|
+
- **Evidence collection** (`src/licit/core/evidence.py`)
|
|
26
|
+
- `EvidenceBundle` with 18 fields covering provenance, changelog, FRIA, guardrails, audit trail, human oversight, and security findings.
|
|
27
|
+
- `EvidenceCollector` gathers evidence from `.licit/` data, project configs (architect guardrails, quality gates, budget), CI/CD, architect reports, and SARIF files.
|
|
28
|
+
- **CLI with 10 commands** (`src/licit/cli.py`)
|
|
29
|
+
- `licit init` — Initialize project with auto-detection and `.licit.yaml` creation.
|
|
30
|
+
- `licit trace` — Track code provenance (skeleton, Phase 2).
|
|
31
|
+
- `licit changelog` — Agent config changelog (skeleton, Phase 3).
|
|
32
|
+
- `licit fria` — FRIA questionnaire (skeleton, Phase 4).
|
|
33
|
+
- `licit annex-iv` — Annex IV documentation (skeleton, Phase 4).
|
|
34
|
+
- `licit report` — Unified compliance report (skeleton, Phase 6).
|
|
35
|
+
- `licit gaps` — Gap analysis (skeleton, Phase 6).
|
|
36
|
+
- `licit verify` — CI/CD gate with exit codes 0/1/2 (skeleton, Phase 4-6).
|
|
37
|
+
- `licit status` — Show project compliance status.
|
|
38
|
+
- `licit connect` — Enable/disable optional connectors.
|
|
39
|
+
- **Logging** (`src/licit/logging/setup.py`) — structlog configuration with WARNING default level, verbose mode support.
|
|
40
|
+
- **Test suite** — 52 tests across 5 test files covering config schema, config loading, project detection, evidence collection, and all CLI commands.
|
|
41
|
+
- **Type safety** — Full mypy strict mode compliance across all 21 source files.
|
|
42
|
+
- **Code quality** — ruff linting with zero errors.
|
|
43
|
+
|
|
44
|
+
## [0.1.0] — Unreleased
|
|
45
|
+
|
|
46
|
+
Initial release target. V0 MVP with full compliance evaluation capabilities.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Diego Alba Ruiz
|
|
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.
|
|
@@ -0,0 +1,267 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: licit-ai-cli
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Regulatory compliance for AI-powered development teams
|
|
5
|
+
License: MIT
|
|
6
|
+
License-File: LICENSE
|
|
7
|
+
Keywords: ai,audit,compliance,eu-ai-act,owasp,provenance
|
|
8
|
+
Requires-Python: >=3.12
|
|
9
|
+
Requires-Dist: click>=8.1
|
|
10
|
+
Requires-Dist: cryptography>=42.0
|
|
11
|
+
Requires-Dist: jinja2>=3.1
|
|
12
|
+
Requires-Dist: pydantic>=2.0
|
|
13
|
+
Requires-Dist: pyyaml>=6.0
|
|
14
|
+
Requires-Dist: structlog>=24.1
|
|
15
|
+
Provides-Extra: dev
|
|
16
|
+
Requires-Dist: mypy>=1.9; extra == 'dev'
|
|
17
|
+
Requires-Dist: pytest-cov>=5.0; extra == 'dev'
|
|
18
|
+
Requires-Dist: pytest>=8.0; extra == 'dev'
|
|
19
|
+
Requires-Dist: ruff>=0.4; extra == 'dev'
|
|
20
|
+
Description-Content-Type: text/markdown
|
|
21
|
+
|
|
22
|
+
# licit
|
|
23
|
+
|
|
24
|
+
**Regulatory compliance for AI-powered development teams.**
|
|
25
|
+
|
|
26
|
+
licit is a standalone CLI tool that tracks AI-generated code provenance, evaluates compliance against regulatory frameworks (EU AI Act, OWASP Agentic Top 10), generates required documentation (FRIA, Annex IV), and works as a CI/CD gate — all without requiring external services or infrastructure.
|
|
27
|
+
|
|
28
|
+
[](https://www.python.org/downloads/)
|
|
29
|
+
[](https://opensource.org/licenses/MIT)
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## The Problem
|
|
34
|
+
|
|
35
|
+
Teams using AI coding assistants (Claude Code, Cursor, Copilot, Codex) face three gaps:
|
|
36
|
+
|
|
37
|
+
1. **No provenance tracking** — Can't distinguish AI-generated code from human-written code at scale.
|
|
38
|
+
2. **Regulatory requirements** — The EU AI Act mandates documentation (FRIA, Annex IV), risk management, and transparency that no existing tool automates.
|
|
39
|
+
3. **Agentic security risks** — Autonomous AI agents introduce risks (prompt injection, privilege escalation) not covered by traditional security tools.
|
|
40
|
+
|
|
41
|
+
## The Solution
|
|
42
|
+
|
|
43
|
+
```
|
|
44
|
+
licit init → Auto-detect project: languages, frameworks, CI/CD, agent configs
|
|
45
|
+
licit trace → Track code provenance (human vs AI) from git history
|
|
46
|
+
licit changelog → Monitor agent config changes (CLAUDE.md, .cursorrules, etc.)
|
|
47
|
+
licit fria → Generate Fundamental Rights Impact Assessment (EU AI Act Art. 27)
|
|
48
|
+
licit annex-iv → Generate Annex IV Technical Documentation
|
|
49
|
+
licit report → Unified compliance report (Markdown, JSON, HTML)
|
|
50
|
+
licit gaps → Find compliance gaps with actionable recommendations
|
|
51
|
+
licit verify → CI/CD gate: exit 0 (pass) or exit 1 (fail)
|
|
52
|
+
licit status → Quick compliance overview
|
|
53
|
+
licit connect → Configure optional connectors (architect, vigil)
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## Quick Start
|
|
57
|
+
|
|
58
|
+
### Installation
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
pip install licit-ai-cli
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
Or from source:
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
git clone https://github.com/your-org/licit-cli.git
|
|
68
|
+
cd licit-cli
|
|
69
|
+
pip install -e ".[dev]"
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
> **Requires Python 3.12+**
|
|
73
|
+
|
|
74
|
+
### Initialize
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
cd your-project
|
|
78
|
+
licit init
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
This auto-detects your project and creates `.licit.yaml`:
|
|
82
|
+
|
|
83
|
+
```
|
|
84
|
+
Project: my-app
|
|
85
|
+
Languages: python, typescript
|
|
86
|
+
Agent configs: 2 detected
|
|
87
|
+
CI/CD: github-actions
|
|
88
|
+
Testing: pytest
|
|
89
|
+
Security tools: vigil, semgrep
|
|
90
|
+
|
|
91
|
+
Agent configurations found:
|
|
92
|
+
- CLAUDE.md (claude-code)
|
|
93
|
+
- .cursorrules (cursor)
|
|
94
|
+
|
|
95
|
+
Created .licit.yaml
|
|
96
|
+
Created .licit/ directory
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
### Track Provenance
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
licit trace # Analyze full git history
|
|
103
|
+
licit trace --since 2026-01-01 # Since specific date
|
|
104
|
+
licit trace --stats # Show AI vs human stats
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
### Evaluate Compliance
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
licit report # Full compliance report
|
|
111
|
+
licit report --framework eu-ai-act # EU AI Act only
|
|
112
|
+
licit report --format html -o r.html # HTML output
|
|
113
|
+
licit gaps # What's missing?
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
### CI/CD Integration
|
|
117
|
+
|
|
118
|
+
```yaml
|
|
119
|
+
# .github/workflows/compliance.yml
|
|
120
|
+
- name: Compliance check
|
|
121
|
+
run: |
|
|
122
|
+
pip install licit-ai-cli
|
|
123
|
+
licit verify
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
Exit codes: `0` = compliant, `1` = non-compliant, `2` = partially compliant.
|
|
127
|
+
|
|
128
|
+
## Frameworks Supported
|
|
129
|
+
|
|
130
|
+
| Framework | Version | Status |
|
|
131
|
+
|-----------|---------|--------|
|
|
132
|
+
| EU AI Act | Regulation (EU) 2024/1689 | V0 |
|
|
133
|
+
| OWASP Agentic Top 10 | 2026 | V0 |
|
|
134
|
+
| NIST AI RMF | AI 100-1 | Planned (V1) |
|
|
135
|
+
| ISO/IEC 42001 | 2023 | Planned (V1) |
|
|
136
|
+
|
|
137
|
+
### EU AI Act Coverage
|
|
138
|
+
|
|
139
|
+
licit evaluates deployer obligations across key articles:
|
|
140
|
+
|
|
141
|
+
- **Art. 9** — Risk management (guardrails, quality gates, security scanning)
|
|
142
|
+
- **Art. 12** — Record keeping (git history, audit trails, provenance)
|
|
143
|
+
- **Art. 13** — Transparency (technical documentation, config changelog)
|
|
144
|
+
- **Art. 14** — Human oversight (review gates, dry-run, intervention capability)
|
|
145
|
+
- **Art. 26** — Deployer obligations (agent configuration, monitoring)
|
|
146
|
+
- **Art. 27** — FRIA (interactive 5-step questionnaire)
|
|
147
|
+
- **Annex IV** — Technical documentation (auto-generated from project metadata)
|
|
148
|
+
|
|
149
|
+
### OWASP Agentic Top 10 Coverage
|
|
150
|
+
|
|
151
|
+
Maps project security posture against all 10 agentic AI risks including prompt injection, unauthorized code execution, data exfiltration, and privilege escalation.
|
|
152
|
+
|
|
153
|
+
## Agent Configs Detected
|
|
154
|
+
|
|
155
|
+
licit monitors configuration files for AI coding agents:
|
|
156
|
+
|
|
157
|
+
| File | Agent |
|
|
158
|
+
|------|-------|
|
|
159
|
+
| `CLAUDE.md` | Claude Code |
|
|
160
|
+
| `.claude/settings.json` | Claude Code |
|
|
161
|
+
| `.cursorrules` | Cursor |
|
|
162
|
+
| `.cursor/rules` | Cursor |
|
|
163
|
+
| `AGENTS.md` | GitHub Agents |
|
|
164
|
+
| `.github/copilot-instructions.md` | GitHub Copilot |
|
|
165
|
+
| `.architect/config.yaml` | architect |
|
|
166
|
+
| `.prompts/**/*.md` | Generic |
|
|
167
|
+
|
|
168
|
+
## Configuration
|
|
169
|
+
|
|
170
|
+
All configuration lives in `.licit.yaml`:
|
|
171
|
+
|
|
172
|
+
```yaml
|
|
173
|
+
provenance:
|
|
174
|
+
enabled: true
|
|
175
|
+
methods: [git-infer]
|
|
176
|
+
confidence_threshold: 0.6
|
|
177
|
+
store_path: .licit/provenance.jsonl
|
|
178
|
+
|
|
179
|
+
changelog:
|
|
180
|
+
enabled: true
|
|
181
|
+
watch_files:
|
|
182
|
+
- CLAUDE.md
|
|
183
|
+
- .cursorrules
|
|
184
|
+
- AGENTS.md
|
|
185
|
+
- .architect/config.yaml
|
|
186
|
+
|
|
187
|
+
frameworks:
|
|
188
|
+
eu_ai_act: true
|
|
189
|
+
owasp_agentic: true
|
|
190
|
+
|
|
191
|
+
connectors:
|
|
192
|
+
architect:
|
|
193
|
+
enabled: false
|
|
194
|
+
vigil:
|
|
195
|
+
enabled: false
|
|
196
|
+
|
|
197
|
+
reports:
|
|
198
|
+
default_format: markdown
|
|
199
|
+
include_evidence: true
|
|
200
|
+
include_recommendations: true
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
## Optional Connectors
|
|
204
|
+
|
|
205
|
+
licit is **fully standalone** — connectors enrich, they don't enable.
|
|
206
|
+
|
|
207
|
+
| Connector | What it reads | Value added |
|
|
208
|
+
|-----------|--------------|-------------|
|
|
209
|
+
| **architect** | `.architect/reports/`, config | Guardrails, quality gates, budget limits, audit trail |
|
|
210
|
+
| **vigil** | SARIF files | Security findings with severity levels |
|
|
211
|
+
|
|
212
|
+
```bash
|
|
213
|
+
licit connect architect --enable
|
|
214
|
+
licit connect vigil --enable
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
## Project Structure
|
|
218
|
+
|
|
219
|
+
```
|
|
220
|
+
src/licit/
|
|
221
|
+
├── cli.py # 10 CLI commands
|
|
222
|
+
├── config/ # Pydantic v2 config schema + YAML loader
|
|
223
|
+
├── core/ # Models, project detection, evidence collection
|
|
224
|
+
├── provenance/ # Git analysis, heuristics, JSONL store, attestation
|
|
225
|
+
├── changelog/ # Agent config monitoring, diff, classification
|
|
226
|
+
├── frameworks/ # EU AI Act evaluator, FRIA, Annex IV, OWASP
|
|
227
|
+
├── connectors/ # architect + vigil integrations
|
|
228
|
+
├── reports/ # Unified reports, gap analysis, formatters
|
|
229
|
+
└── logging/ # structlog configuration
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
## Development
|
|
233
|
+
|
|
234
|
+
```bash
|
|
235
|
+
# Install with dev dependencies
|
|
236
|
+
pip install -e ".[dev]"
|
|
237
|
+
|
|
238
|
+
# Run tests
|
|
239
|
+
pytest tests/ -q
|
|
240
|
+
|
|
241
|
+
# Lint
|
|
242
|
+
ruff check src/licit/
|
|
243
|
+
|
|
244
|
+
# Type check
|
|
245
|
+
mypy src/licit/ --strict
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
## Philosophy
|
|
249
|
+
|
|
250
|
+
- **Standalone** — Works without any external tools. Connectors are optional.
|
|
251
|
+
- **Filesystem-first** — Everything is files in `.licit/`. No database, no server.
|
|
252
|
+
- **Developer-first** — CLI that fits into existing git/CI workflows.
|
|
253
|
+
- **Language-agnostic** — Detects Python, JS/TS, Go, Rust, Java projects.
|
|
254
|
+
- **Provenance-first** — Understands code origin (AI vs human) for more accurate evaluations.
|
|
255
|
+
|
|
256
|
+
## Roadmap
|
|
257
|
+
|
|
258
|
+
| Version | Key Features |
|
|
259
|
+
|---------|-------------|
|
|
260
|
+
| **V0** (current) | CLI, EU AI Act, OWASP, provenance, FRIA, Annex IV, CI/CD gate |
|
|
261
|
+
| **V0.x** | Cursor/Codex session readers, PDF reports, GitHub Action |
|
|
262
|
+
| **V1** | NIST AI RMF, ISO 42001, plugin system, Sigstore, MCP Server |
|
|
263
|
+
| **V2** | Web dashboard, multi-project, trend analysis, AI remediation |
|
|
264
|
+
|
|
265
|
+
## License
|
|
266
|
+
|
|
267
|
+
[MIT](LICENSE) — Copyright (c) 2026 Diego Alba Ruiz
|
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
# licit
|
|
2
|
+
|
|
3
|
+
**Regulatory compliance for AI-powered development teams.**
|
|
4
|
+
|
|
5
|
+
licit is a standalone CLI tool that tracks AI-generated code provenance, evaluates compliance against regulatory frameworks (EU AI Act, OWASP Agentic Top 10), generates required documentation (FRIA, Annex IV), and works as a CI/CD gate — all without requiring external services or infrastructure.
|
|
6
|
+
|
|
7
|
+
[](https://www.python.org/downloads/)
|
|
8
|
+
[](https://opensource.org/licenses/MIT)
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## The Problem
|
|
13
|
+
|
|
14
|
+
Teams using AI coding assistants (Claude Code, Cursor, Copilot, Codex) face three gaps:
|
|
15
|
+
|
|
16
|
+
1. **No provenance tracking** — Can't distinguish AI-generated code from human-written code at scale.
|
|
17
|
+
2. **Regulatory requirements** — The EU AI Act mandates documentation (FRIA, Annex IV), risk management, and transparency that no existing tool automates.
|
|
18
|
+
3. **Agentic security risks** — Autonomous AI agents introduce risks (prompt injection, privilege escalation) not covered by traditional security tools.
|
|
19
|
+
|
|
20
|
+
## The Solution
|
|
21
|
+
|
|
22
|
+
```
|
|
23
|
+
licit init → Auto-detect project: languages, frameworks, CI/CD, agent configs
|
|
24
|
+
licit trace → Track code provenance (human vs AI) from git history
|
|
25
|
+
licit changelog → Monitor agent config changes (CLAUDE.md, .cursorrules, etc.)
|
|
26
|
+
licit fria → Generate Fundamental Rights Impact Assessment (EU AI Act Art. 27)
|
|
27
|
+
licit annex-iv → Generate Annex IV Technical Documentation
|
|
28
|
+
licit report → Unified compliance report (Markdown, JSON, HTML)
|
|
29
|
+
licit gaps → Find compliance gaps with actionable recommendations
|
|
30
|
+
licit verify → CI/CD gate: exit 0 (pass) or exit 1 (fail)
|
|
31
|
+
licit status → Quick compliance overview
|
|
32
|
+
licit connect → Configure optional connectors (architect, vigil)
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Quick Start
|
|
36
|
+
|
|
37
|
+
### Installation
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
pip install licit-ai-cli
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Or from source:
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
git clone https://github.com/your-org/licit-cli.git
|
|
47
|
+
cd licit-cli
|
|
48
|
+
pip install -e ".[dev]"
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
> **Requires Python 3.12+**
|
|
52
|
+
|
|
53
|
+
### Initialize
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
cd your-project
|
|
57
|
+
licit init
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
This auto-detects your project and creates `.licit.yaml`:
|
|
61
|
+
|
|
62
|
+
```
|
|
63
|
+
Project: my-app
|
|
64
|
+
Languages: python, typescript
|
|
65
|
+
Agent configs: 2 detected
|
|
66
|
+
CI/CD: github-actions
|
|
67
|
+
Testing: pytest
|
|
68
|
+
Security tools: vigil, semgrep
|
|
69
|
+
|
|
70
|
+
Agent configurations found:
|
|
71
|
+
- CLAUDE.md (claude-code)
|
|
72
|
+
- .cursorrules (cursor)
|
|
73
|
+
|
|
74
|
+
Created .licit.yaml
|
|
75
|
+
Created .licit/ directory
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
### Track Provenance
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
licit trace # Analyze full git history
|
|
82
|
+
licit trace --since 2026-01-01 # Since specific date
|
|
83
|
+
licit trace --stats # Show AI vs human stats
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
### Evaluate Compliance
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
licit report # Full compliance report
|
|
90
|
+
licit report --framework eu-ai-act # EU AI Act only
|
|
91
|
+
licit report --format html -o r.html # HTML output
|
|
92
|
+
licit gaps # What's missing?
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
### CI/CD Integration
|
|
96
|
+
|
|
97
|
+
```yaml
|
|
98
|
+
# .github/workflows/compliance.yml
|
|
99
|
+
- name: Compliance check
|
|
100
|
+
run: |
|
|
101
|
+
pip install licit-ai-cli
|
|
102
|
+
licit verify
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
Exit codes: `0` = compliant, `1` = non-compliant, `2` = partially compliant.
|
|
106
|
+
|
|
107
|
+
## Frameworks Supported
|
|
108
|
+
|
|
109
|
+
| Framework | Version | Status |
|
|
110
|
+
|-----------|---------|--------|
|
|
111
|
+
| EU AI Act | Regulation (EU) 2024/1689 | V0 |
|
|
112
|
+
| OWASP Agentic Top 10 | 2026 | V0 |
|
|
113
|
+
| NIST AI RMF | AI 100-1 | Planned (V1) |
|
|
114
|
+
| ISO/IEC 42001 | 2023 | Planned (V1) |
|
|
115
|
+
|
|
116
|
+
### EU AI Act Coverage
|
|
117
|
+
|
|
118
|
+
licit evaluates deployer obligations across key articles:
|
|
119
|
+
|
|
120
|
+
- **Art. 9** — Risk management (guardrails, quality gates, security scanning)
|
|
121
|
+
- **Art. 12** — Record keeping (git history, audit trails, provenance)
|
|
122
|
+
- **Art. 13** — Transparency (technical documentation, config changelog)
|
|
123
|
+
- **Art. 14** — Human oversight (review gates, dry-run, intervention capability)
|
|
124
|
+
- **Art. 26** — Deployer obligations (agent configuration, monitoring)
|
|
125
|
+
- **Art. 27** — FRIA (interactive 5-step questionnaire)
|
|
126
|
+
- **Annex IV** — Technical documentation (auto-generated from project metadata)
|
|
127
|
+
|
|
128
|
+
### OWASP Agentic Top 10 Coverage
|
|
129
|
+
|
|
130
|
+
Maps project security posture against all 10 agentic AI risks including prompt injection, unauthorized code execution, data exfiltration, and privilege escalation.
|
|
131
|
+
|
|
132
|
+
## Agent Configs Detected
|
|
133
|
+
|
|
134
|
+
licit monitors configuration files for AI coding agents:
|
|
135
|
+
|
|
136
|
+
| File | Agent |
|
|
137
|
+
|------|-------|
|
|
138
|
+
| `CLAUDE.md` | Claude Code |
|
|
139
|
+
| `.claude/settings.json` | Claude Code |
|
|
140
|
+
| `.cursorrules` | Cursor |
|
|
141
|
+
| `.cursor/rules` | Cursor |
|
|
142
|
+
| `AGENTS.md` | GitHub Agents |
|
|
143
|
+
| `.github/copilot-instructions.md` | GitHub Copilot |
|
|
144
|
+
| `.architect/config.yaml` | architect |
|
|
145
|
+
| `.prompts/**/*.md` | Generic |
|
|
146
|
+
|
|
147
|
+
## Configuration
|
|
148
|
+
|
|
149
|
+
All configuration lives in `.licit.yaml`:
|
|
150
|
+
|
|
151
|
+
```yaml
|
|
152
|
+
provenance:
|
|
153
|
+
enabled: true
|
|
154
|
+
methods: [git-infer]
|
|
155
|
+
confidence_threshold: 0.6
|
|
156
|
+
store_path: .licit/provenance.jsonl
|
|
157
|
+
|
|
158
|
+
changelog:
|
|
159
|
+
enabled: true
|
|
160
|
+
watch_files:
|
|
161
|
+
- CLAUDE.md
|
|
162
|
+
- .cursorrules
|
|
163
|
+
- AGENTS.md
|
|
164
|
+
- .architect/config.yaml
|
|
165
|
+
|
|
166
|
+
frameworks:
|
|
167
|
+
eu_ai_act: true
|
|
168
|
+
owasp_agentic: true
|
|
169
|
+
|
|
170
|
+
connectors:
|
|
171
|
+
architect:
|
|
172
|
+
enabled: false
|
|
173
|
+
vigil:
|
|
174
|
+
enabled: false
|
|
175
|
+
|
|
176
|
+
reports:
|
|
177
|
+
default_format: markdown
|
|
178
|
+
include_evidence: true
|
|
179
|
+
include_recommendations: true
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
## Optional Connectors
|
|
183
|
+
|
|
184
|
+
licit is **fully standalone** — connectors enrich, they don't enable.
|
|
185
|
+
|
|
186
|
+
| Connector | What it reads | Value added |
|
|
187
|
+
|-----------|--------------|-------------|
|
|
188
|
+
| **architect** | `.architect/reports/`, config | Guardrails, quality gates, budget limits, audit trail |
|
|
189
|
+
| **vigil** | SARIF files | Security findings with severity levels |
|
|
190
|
+
|
|
191
|
+
```bash
|
|
192
|
+
licit connect architect --enable
|
|
193
|
+
licit connect vigil --enable
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
## Project Structure
|
|
197
|
+
|
|
198
|
+
```
|
|
199
|
+
src/licit/
|
|
200
|
+
├── cli.py # 10 CLI commands
|
|
201
|
+
├── config/ # Pydantic v2 config schema + YAML loader
|
|
202
|
+
├── core/ # Models, project detection, evidence collection
|
|
203
|
+
├── provenance/ # Git analysis, heuristics, JSONL store, attestation
|
|
204
|
+
├── changelog/ # Agent config monitoring, diff, classification
|
|
205
|
+
├── frameworks/ # EU AI Act evaluator, FRIA, Annex IV, OWASP
|
|
206
|
+
├── connectors/ # architect + vigil integrations
|
|
207
|
+
├── reports/ # Unified reports, gap analysis, formatters
|
|
208
|
+
└── logging/ # structlog configuration
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
## Development
|
|
212
|
+
|
|
213
|
+
```bash
|
|
214
|
+
# Install with dev dependencies
|
|
215
|
+
pip install -e ".[dev]"
|
|
216
|
+
|
|
217
|
+
# Run tests
|
|
218
|
+
pytest tests/ -q
|
|
219
|
+
|
|
220
|
+
# Lint
|
|
221
|
+
ruff check src/licit/
|
|
222
|
+
|
|
223
|
+
# Type check
|
|
224
|
+
mypy src/licit/ --strict
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
## Philosophy
|
|
228
|
+
|
|
229
|
+
- **Standalone** — Works without any external tools. Connectors are optional.
|
|
230
|
+
- **Filesystem-first** — Everything is files in `.licit/`. No database, no server.
|
|
231
|
+
- **Developer-first** — CLI that fits into existing git/CI workflows.
|
|
232
|
+
- **Language-agnostic** — Detects Python, JS/TS, Go, Rust, Java projects.
|
|
233
|
+
- **Provenance-first** — Understands code origin (AI vs human) for more accurate evaluations.
|
|
234
|
+
|
|
235
|
+
## Roadmap
|
|
236
|
+
|
|
237
|
+
| Version | Key Features |
|
|
238
|
+
|---------|-------------|
|
|
239
|
+
| **V0** (current) | CLI, EU AI Act, OWASP, provenance, FRIA, Annex IV, CI/CD gate |
|
|
240
|
+
| **V0.x** | Cursor/Codex session readers, PDF reports, GitHub Action |
|
|
241
|
+
| **V1** | NIST AI RMF, ISO 42001, plugin system, Sigstore, MCP Server |
|
|
242
|
+
| **V2** | Web dashboard, multi-project, trend analysis, AI remediation |
|
|
243
|
+
|
|
244
|
+
## License
|
|
245
|
+
|
|
246
|
+
[MIT](LICENSE) — Copyright (c) 2026 Diego Alba Ruiz
|