Ollama Dev Companion takes security seriously. This document outlines our security practices, vulnerability reporting process, and security considerations for users and developers.
| Version | Supported |
|---|---|
| 0.1.x | ✅ |
| < 0.1 | ❌ |
If you discover a security vulnerability, please follow these steps:
- DO NOT create a public issue
- Email security concerns to: [maintainer email]
- Include:
- Description of the vulnerability
- Steps to reproduce
- Potential impact
- Suggested fix (if any)
- Acknowledgment: Within 48 hours
- Initial Assessment: Within 1 week
- Fix Development: Depends on severity
- Public Disclosure: After fix is released
All user inputs are validated to prevent:
- Command Injection: Sanitized before execution
- Path Traversal: Restricted to workspace boundaries
- Code Injection: Escaped in webviews
- Size Limits: Enforced on all inputs
// Example validation
const validatedPath = validationService.validateFilePath(userPath);
if (!validatedPath.isValid) {
throw new ValidationError(validatedPath.error);
}- Validates all file paths
- Prevents access outside workspace
- Resolves symbolic links
- Logs all file operations
// File access is always validated
const result = await secureFileAccess.readFile(path);
if (!result.success) {
// Access denied
}- Canonical path resolution
- Workspace boundary enforcement
- Symbolic link detection
- Hidden file protection
- Local-only by default (localhost:11434)
- No external API calls without user consent
- Configurable timeout limits
- Request size limits
- Currently relies on local Ollama instance
- No credentials stored
- No cloud services used
const csp = [
`default-src 'none'`,
`style-src ${webview.cspSource} 'unsafe-inline'`,
`script-src 'nonce-${nonce}'`,
`img-src ${webview.cspSource} https: data:`,
`font-src ${webview.cspSource}`
].join('; ');- Nonce-based script execution
- No eval() or inline scripts
- Restricted resource loading
- Message validation
- No telemetry collection
- No usage analytics
- No cloud storage
- No external API calls (except Ollama)
- No credential storage
- All data stays on user's machine
- Chat history stored locally
- Cache stored in workspace
- Settings in VS Code configuration
- System prompts are isolated
- User input is clearly delineated
- No execution of generated code
- Clear marking of AI-generated content
- HTML escaping in webviews
- Markdown rendering restrictions
- No script execution from AI output
- Keep Ollama Updated: Use latest Ollama version
- Local Models Only: Don't expose Ollama to network
- Review Generated Code: Always review AI suggestions
- Workspace Isolation: Use separate workspaces for sensitive projects
- Extension Updates: Keep extension updated
- Input Validation: Always validate user input
- Use Type Guards: Runtime type checking
- Dependency Injection: Use DI for testability
- Error Handling: Don't expose internal errors
- Logging: Log security events
- All inputs validated
- File paths checked against workspace
- No use of
eval()orFunction() - CSP implemented in webviews
- Errors don't leak sensitive info
- Dependencies up to date
- Security scan completed
- Dependencies audited
- No debug code in release
- Permissions minimized
- Documentation updated
- Models run locally via Ollama
- Model behavior depends on training
- No guarantees on model output safety
- Extension has file system access
- Limited to workspace by default
- User can grant broader access
- Extension doesn't execute generated code
- User responsible for reviewing suggestions
- No automatic code execution
# TypeScript strict mode
npm run build
# ESLint security rules
npm run lint
# Dependency audit
npm audit- Input validation service
- Secure file access service
- Rate limiting
- Memory monitoring
- Isolate: Disable affected functionality
- Assess: Determine scope and impact
- Fix: Develop and test patch
- Release: Deploy fix quickly
- Disclose: Inform users appropriately
Security fixes are released as:
- Critical: Immediate patch release
- High: Within 1 week
- Medium: Within 2 weeks
- Low: Next regular release
- Weekly automated dependency scans
- Manual review of critical updates
- Automated PR for updates
ollama: Official Ollama clientvscode: VS Code extension API- Build tools (dev dependencies only)
- Follows VS Code security guidelines
- Regular marketplace security scans
- Permission declarations accurate
- MIT licensed
- Security issues tracked publicly (after fix)
- Community security contributions welcome
For security concerns:
- Email: [security contact]
- GitHub Security Advisories
- Private vulnerability reporting
We thank security researchers who responsibly disclose vulnerabilities and help make Ollama Dev Companion more secure.