CodeLock is a world-class, security-first AI coding assistant delivered as a VS Code extension. It provides secure-by-default code suggestions, real-time vulnerability detection, spec-based code generation, and an intelligent chat interface - all powered by a secure cloud architecture.
- Continuous vulnerability scanning as you code
- Detection of XSS, SQL injection, hardcoded secrets, and more
- CWE-mapped security issues with detailed explanations
- Inline diagnostics with severity-based highlighting
- Security-aware inline completions (like Cursor/Copilot)
- Context-aware suggestions based on project structure
- Secure-by-default coding patterns
- Debounced completions to optimize performance
- Dedicated sidebar chat for security questions
- Context-aware responses based on current file
- Code generation from natural language specs
- Security best practices guidance
- One-click vulnerability fixes
- Detailed vulnerability reports with CWE references
- Tree view of all security issues by severity
- Export and history tracking
- Usage analytics and performance metrics
- Security scan history with detailed logs
- Project-wide security health dashboard
- Opt-in telemetry for continuous improvement
- TypeScript-based extension with modular architecture
- Secure authentication via OAuth2 with token management
- API client for secure backend communication
- Context management for project-aware AI suggestions
- Telemetry system with privacy-first design
- Rust-based API (Axum/Actix-web) for performance and security
- ModelService abstraction supporting OpenAI GPT-4, Claude, Together AI
- PostgreSQL database for user data and analytics
- Secure token handling with JWT and refresh tokens
- Rate limiting and audit logging for enterprise security
- No local LLM inference - fully cloud-powered MVP
- Code sanitization - no sensitive data leaves your environment
- TLS encryption for all API communications
- Secure token storage using VS Code secrets and keytar
- Opt-in telemetry with data anonymization
- VS Code 1.74.0 or higher
- Node.js 16+ and npm
- TypeScript 4.8+
-
Clone the repository
git clone https://github.com/your-org/seguro-vscode.git cd codelock-vscode -
Install dependencies
npm install
-
Build the extension
npm run compile
-
Launch in development
- Press
F5in VS Code to open Extension Development Host - Or run:
npm run watchfor continuous compilation
- Press
-
Authenticate with Seguro
- Run command:
Seguro: Login - Complete OAuth2 flow in your browser
- Extension will securely store your authentication token
- Run command:
-
Configure your preferences
- Open VS Code settings (
Ctrl+,) - Search for "Seguro" to customize:
- Auto-scanning behavior
- Inline completion settings
- Telemetry preferences
- API endpoint (for enterprise users)
- Open VS Code settings (
-
Start coding securely
- Open any supported file (JS, TS, Python, etc.)
- See inline completions and security warnings
- Use
Ctrl+Shift+Pβ "Ask Seguro" for the chat panel
| Command | Description | Shortcut |
|---|---|---|
Seguro: Login |
Authenticate with Seguro cloud | - |
Seguro: Logout |
Sign out and clear tokens | - |
Seguro: Analyze Current File |
Scan active file for vulnerabilities | Ctrl+Shift+A |
Seguro: Scan Workspace |
Full workspace security scan | Ctrl+Shift+W |
Seguro: Generate Secure Code |
Generate code from comment spec | Ctrl+Shift+G |
Seguro: Fix Vulnerability |
Auto-fix detected security issue | Ctrl+Shift+F |
Seguro: Ask Seguro |
Open chat sidebar | Ctrl+Shift+S |
Seguro: Toggle Inline Completions |
Enable/disable AI completions | - |
Access via VS Code Settings (Ctrl+,) β Search "Seguro":
{
"seguro.apiEndpoint": "https://api.seguro.ai",
"seguro.enableAutoScan": true,
"seguro.enableInlineCompletions": true,
"seguro.enableTelemetry": false,
"seguro.maxContextLines": 50,
"seguro.securityRules": {
"severity": "medium",
"enabledRules": ["xss", "sqli", "secrets", "eval"]
}
}{
"codelock.completion.debounceMs": 300,
"codelock.completion.maxSuggestions": 3,
"codelock.scan.batchSize": 10,
"codelock.scan.excludePatterns": ["node_modules/**", "*.min.js"],
"seguro.telemetry.sessionTimeout": 3600000
}seguro-vscode/
βββ src/
β βββ extension.ts # Main extension entry point
β βββ auth/
β β βββ authManager.ts # OAuth2 authentication
β βββ api/
β β βββ apiClient.ts # Backend API communication
β βββ completion/
β β βββ inlineProvider.ts # AI-powered completions
β βββ security/
β β βββ securityAnalyzer.ts # Vulnerability detection
β βββ chat/
β β βββ chatProvider.ts # Chat sidebar webview
β βββ context/
β β βββ contextManager.ts # Project context tracking
β βββ telemetry/
β β βββ telemetryManager.ts # Analytics and metrics
β βββ views/
β βββ vulnerabilityProvider.ts # Security issues tree
β βββ historyProvider.ts # Action history tree
βββ package.json # Extension manifest
βββ tsconfig.json # TypeScript configuration
βββ README.md # This file
# Development build with watch mode
npm run watch
# Production build
npm run compile
# Run tests
npm test
# Lint code
npm run lint
# Package for distribution
npm run package- Update SecurityAnalyzer (
src/security/securityAnalyzer.ts) - Add rule patterns to the detection logic
- Update API client if backend changes needed
- Add tests for the new rule
- Update documentation
- Code Analysis: Only metadata and patterns sent to API, never full source
- Completions: Context-aware but sanitized before transmission
- Chat: Messages processed securely with no persistent storage
- Telemetry: Fully anonymized usage metrics (opt-in only)
- OAuth2 flow with secure token refresh
- Token storage via VS Code SecretStorage and keytar fallback
- Session management with automatic expiration
- Multi-factor authentication support (enterprise)
- SOC 2 Type II compliance (planned)
- GDPR compliant data processing
- Enterprise SSO integration available
- Audit logging for all security-sensitive operations
We welcome contributions! Please see our Contributing Guide for details.
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Make your changes and add tests
- Run the test suite:
npm test - Submit a pull request
- Security vulnerabilities: Please email [email protected]
- Bug reports: Use GitHub Issues with the bug template
- Feature requests: Use GitHub Issues with the feature template
This project is licensed under the MIT License - see the LICENSE file for details.
- Website: https://seguro.ai
- Documentation: https://docs.seguro.ai
- API Reference: https://api.seguro.ai/docs
- Support: [email protected]
- Security: [email protected]
Made with β€οΈ by the Seguro Team
Secure coding shouldn't be an afterthought. Make it your default.
src/
βββ extension.ts # Main extension entry point
βββ security/
βββ analyzer.ts # Core security analysis logic
βββ provider.ts # UI and diagnostic provider
npm run compile # Compile TypeScript
npm run watch # Watch mode for development- Fork the repository
- Create a feature branch
- Make your changes
- Add tests for new security rules
- Submit a pull request
MIT License - see LICENSE file for details
- Add more security rules
- Support for more programming languages
- Integration with external security tools
- Custom rule configuration
- Security report export
- CI/CD integration