Skip to content

Security: pascalx-git/SketchPrompt

SECURITY.md

SketchPrompt Security

Extension: SketchPrompt - Visual thinking tool for coding with AI
Last Updated: July 31 2025
Security Status: 🟡 PRODUCTION READY WITH CAVEATS
Security Process: Iterative review and improvement


Security Commitment

SketchPrompt follows a security-first development approach with iterative security reviews. We ensure no release ships with major security issues by conducting regular security assessments and addressing vulnerabilities promptly.

Our current architecture prioritizes local processing and user privacy while maintaining the flexibility to add secure cloud features in the future.

Security Features

  • Content Security Policy (CSP): Hardened against XSS attacks
  • Input Validation: All sketch data validated with JSON schema
  • Path Traversal Protection: Secure file operations
  • Error Sanitization: No information leakage in error messages
  • Local Bundling: Minimal external dependencies

Security Process

Pre-Release Security Review

  • Security assessment before each version release
  • Vulnerability identification and remediation
  • Security testing and validation

Ongoing Security Measures

  • Iterative Security Reviews: Regular assessments before each release
  • Vulnerability Monitoring: Prompt identification and remediation
  • Dependency Audits: Regular npm audit and security scanning
  • CSP Violation Monitoring: Continuous Content Security Policy oversight
  • User Feedback: Collection and analysis of security-related issues

Security Timeline

  • Pre-Release: Security assessment before each version
  • Vulnerability Remediation: Prompt fixes for identified issues
  • Quarterly Deep Review: Comprehensive security assessment
  • Continuous Monitoring: Ongoing security oversight

Testing & Validation

Security Tests

  • CSP violations blocked
  • Input validation working
  • Path traversal prevented
  • Error sanitization active

Functionality Tests

  • TLDraw fully operational
  • All drawing tools working
  • Auto-save functioning
  • File operations secure

Performance Tests

  • Extension size: 3.0MB (acceptable)
  • Build time: < 10 seconds
  • Memory usage: Normal

⚠️ Dependency Tests

  • 2 moderate vulnerabilities in development dependencies
  • xml2js prototype pollution (CVSS 6.5) - development only
  • vsce dependency chain vulnerability - build tool only

⚠️ Privacy & User Experience Tests

  • Feedback system uses external Typeform URL (user-initiated only)
  • Local usage tracking for future features (no external transmission)
  • Privacy controls being enhanced for user consent

Risk Assessment

Current Security Posture: 🟡 MEDIUM RISK

  • ✅ CSP hardened (no unsafe directives)
  • ✅ All dependencies bundled locally
  • ✅ Input validation implemented
  • ✅ Path traversal protection active
  • ✅ Error information leakage prevented
  • ✅ TLDraw functionality fully operational
  • ⚠️ Development dependency vulnerabilities (xml2js, vsce)
  • ⚠️ Supply chain risks in build tools
  • ⚠️ Privacy controls being enhanced

Production Readiness

Status: 🟡 READY WITH CAVEATS

The extension is secure for production deployment, but development dependencies should be updated in the next release cycle. The vulnerabilities are in build tools only and do not affect the runtime security of the extension.

Recommendation: Safe to deploy to users, but address dependency vulnerabilities in next release.


Security Reporting

For security questions or vulnerability reports:

  • Use the GitHub issues page
  • Include detailed reproduction steps
  • We respond to security reports promptly

Security Contact: GitHub issues or discussions

For Developers: See .steer/SECURITY_ANALYSIS_REPORT.md for detailed technical analysis and security implementation details.


Privacy & Data Handling

SketchPrompt is designed with privacy as a fundamental principle. Here's how we handle data:

Current Privacy Features

  • Local processing: All sketches and data stay on your machine
  • Minimal usage tracking: Anonymous usage counters for future analytics (local storage only)
  • No cloud dependencies: No external services required for core functionality
  • Manual feedback: User-initiated feedback collection via Typeform
  • No automatic prompts: Users control when to provide feedback

Privacy Enhancements in Progress

We're continuously improving our privacy controls:

  • User consent mechanisms: Adding opt-out options for usage tracking
  • Feedback system improvements: Enhanced URL validation and user controls
  • Privacy-first design: All new features prioritize user privacy

Future Privacy Considerations

As we add AI and collaboration features, we will:

  • Maintain transparency: Clear documentation of any data handling
  • Provide opt-out options: Users can choose not to use cloud features
  • Use secure protocols: Any future cloud features will use encryption and secure APIs
  • Minimize data collection: Only collect what's absolutely necessary for functionality

Privacy Commitment

  • User control: You decide what data to share
  • Transparent practices: Clear documentation of all data handling
  • Security-first: Privacy and security are core design principles

Version Comparison

v0.2.0 → v0.2.4 Security Improvements

  • CSP Hardened: Removed unsafe directives
  • Input Validation: AJV schema validation implemented
  • Path Security: Traversal protection active
  • Error Handling: Sanitized error messages
  • Local Bundling: Minimal external dependencies

Current Concerns

  • ⚠️ xml2js prototype pollution (moderate, development only)
  • ⚠️ vsce dependency chain vulnerability (build tool only)
  • ⚠️ Development toolchain security
  • ⚠️ Privacy controls being enhanced (low priority)

Immediate Actions Needed

  1. Monitor vsce updates for xml2js dependency fix
  2. Consider alternative packaging methods if needed
  3. Implement automated security scanning in CI/CD
  4. Enhance privacy controls for user consent and feedback system

Last Updated: July 31 2025
Next Security Review: As part of next release

There aren’t any published security advisories