Skip to content

refactor(security): Remove hardcoded API keys and secure configuration#1

Merged
Vansh5632 merged 2 commits intomainfrom
refactor/clean-up
Feb 9, 2026
Merged

refactor(security): Remove hardcoded API keys and secure configuration#1
Vansh5632 merged 2 commits intomainfrom
refactor/clean-up

Conversation

@Vansh5632
Copy link
Collaborator

Foundation Cleanup -

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

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
- 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)
@Vansh5632 Vansh5632 merged commit 08a980c into main Feb 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant