Commit 08a980c
authored
refactor(security): Remove hardcoded API keys and secure configuration (#1)
* refactor(security): Remove hardcoded API keys and secure configuration
Foundation Cleanup - Step 1 Complete ✅
Security improvements:
- Removed hardcoded Google API key from state_llm_integration.py
- All API keys now managed via .env file through SecureConfig
- Added support for OpenAI, Anthropic, DeepSeek API keys in .env.example
- Added detect-secrets pre-commit hook to prevent future leaks
- Added detect-private-key hook for additional protection
Configuration improvements:
- Updated config.yaml with FreeCAD AppImage path configuration
- Documented FreeCAD path for AppImage location
- Prepared for multi-provider LLM architecture (litellm)
Files modified:
- src/ai_designer/core/state_llm_integration.py
- .env.example
- config/config.yaml
- .pre-commit-config.yaml
- docs/EXECUTION_PLAN.md
- docs/IMPLEMENTATION_PLAN.md
Next: Step 2 - Replace exec() with safe execution sandbox
* refactor: consolidate documentation and improve linting setup
- Remove CI/CD workflows (.github/workflows/)
- Re-enable mypy in pre-commit configuration
- Consolidate 28 docs into 14 organized files (50% reduction)
- Create docs/guides/ and docs/advanced/ structure
- Preserve EXECUTION_PLAN.md as requested
- Delete IMPLEMENTATION_PLAN.md and redundant summaries
- Update README.md with new documentation structure
Consolidated docs:
- DeepSeek R1: 3 files → DEEPSEEK_R1_GUIDE.md
- Complex Shapes: 3 files → COMPLEX_SHAPES_GUIDE.md
- State Management: 2 files → STATE_GUIDE.md
- Security: 2 files → SECURITY_GUIDE.md
- Summaries: 5 files → PROJECT_STATUS.md
Linting improvements:
- mypy type checking re-enabled
- All security checks maintained (bandit, detect-secrets)
- Code formatting preserved (black, isort, flake8)1 parent 49f843d commit 08a980c
36 files changed
Lines changed: 5344 additions & 5568 deletions
File tree
- .github/workflows
- config
- docs
- advanced
- guides
- src/ai_designer/core
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
5 | 9 | | |
6 | 10 | | |
7 | 11 | | |
8 | 12 | | |
9 | | - | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
10 | 28 | | |
11 | 29 | | |
12 | 30 | | |
| 31 | + | |
13 | 32 | | |
| 33 | + | |
14 | 34 | | |
15 | | - | |
16 | | - | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
17 | 42 | | |
18 | 43 | | |
19 | 44 | | |
| |||
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
15 | 24 | | |
16 | 25 | | |
17 | 26 | | |
| |||
31 | 40 | | |
32 | 41 | | |
33 | 42 | | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
45 | 53 | | |
46 | 54 | | |
47 | 55 | | |
| |||
File renamed without changes.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| 2 | + | |
2 | 3 | | |
3 | 4 | | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
4 | 14 | | |
5 | 15 | | |
6 | 16 | | |
| |||
0 commit comments