Skip to content

Security: codebdbd/aiteprofiles

Security

docs/SECURITY.md

Security

AiteProfiles implements several security measures to protect user data and prevent unauthorized access.

Current Security Measures

Localhost-Only API

  • The HTTP API only binds to localhost addresses (127.0.0.1 and ::1)
  • Remote access is explicitly blocked at the network level
  • This prevents external attackers from accessing the API

Token-Based Access

  • All API requests require a valid token in the X-Token header
  • Tokens are generated randomly on first startup
  • Tokens are stored securely in Windows Credential Manager
  • Fallback to file storage only when Credential Manager is unavailable

URL Validation

  • All URLs are validated before being passed to Chrome
  • Command injection attempts are blocked through strict URL parsing
  • Only valid HTTP/HTTPS URLs are accepted

Origin Filtering

  • CORS policy restricts which web origins can access the API
  • Only trusted localhost origins are allowed
  • Other origins receive minimal CORS headers

Error Sanitization

  • Exception details are not leaked in API responses
  • Generic error messages are returned instead of technical details
  • Logging occurs separately and does not expose sensitive information

Input Validation

  • All API inputs are strictly validated
  • JSON payloads are parsed with type checking
  • Invalid payloads receive appropriate error responses

Content Length Limits

  • Maximum request body size limited to 64KB
  • Prevents potential memory exhaustion attacks
  • Large payloads are rejected before processing

Data Protection

Profile Data

  • Profile information is read-only
  • No profile data is modified through the application
  • Temporary copies are used for data extraction

Token Storage

  • Primary storage: Windows Credential Manager (secure OS storage)
  • Fallback storage: Plain-text file in AppData directory
  • Tokens are never logged or exposed in API responses

File Access

  • Application only accesses Chrome user data directories
  • No access to other user files or system directories
  • File operations are limited to known safe paths

Security Limitations

Local Privilege Escalation

  • Any user with local access to the machine can potentially access the API
  • The application assumes a trusted local environment
  • No additional authentication beyond token is implemented

Process Isolation

  • The application runs with user privileges
  • No sandboxing or additional process isolation
  • Relies on Windows user account separation

Network Exposure

  • While the API is localhost-only, any compromised local process could access it
  • No mutual TLS or additional network security is implemented

Credential Storage

  • When falling back to file storage, tokens are less secure
  • File-based tokens are not encrypted (though they're random strings)
  • Users should ensure their system isn't compromised

What Is Not Protected

Physical Access

  • Anyone with physical access to the machine can access the application
  • No screen lock or additional authentication is implemented

Browser-Level Security

  • The application doesn't enhance Chrome's built-in security
  • Profile isolation remains dependent on Chrome's implementation
  • No additional encryption of profile data

Network Traffic

  • Communication between the application and Chrome is not secured
  • Local inter-process communication relies on OS security

Best Practices for Users

  1. Secure Your System: Ensure your Windows account is password-protected
  2. Protect Your Token: Don't share your API token with untrusted applications
  3. Use Credential Manager: Ensure Windows Credential Manager is available for secure token storage
  4. Limit API Access: Only grant API access to trusted workflow automation tools
  5. Monitor Logs: Check application logs for suspicious activity
  6. Regular Updates: Keep the application updated with latest security patches

Reporting Security Issues

If you discover a security vulnerability, please report it through the project's issue tracker or contact the maintainers directly. Do not publicly disclose security issues until they have been addressed.

Source of truth

  • src/Api/LocalHttpServer.cs

There aren't any published security advisories