Security & Privacy
Viscribe takes data protection seriously. This page explains exactly what data leaves your server, how it is protected, and what security measures are in place.
What Data Is Sent to Groq
When you upload an image, two things are sent to the Groq API:
- The image data itself — encoded as base64 and sent as part of the request body.
- A text prompt — instructions telling the AI how to analyze the image and what format to return.
No other data is transmitted. Viscribe does not send:
- Visitor information or cookies
- User names, emails, or IP addresses
- Other files from your Media Library
- Post content or page data
- Site credentials or database information
The API request is made over HTTPS. The response is discarded after the filename is generated.
API Key Encryption
Your Groq API key is the most sensitive credential Viscribe handles. It is protected by:
Encryption at Rest
The key is encrypted using the defuse/php-encryption library before being stored in the WordPress options table (wp_options). The plaintext key never touches the database.
$encrypted = $this->encryption_service->encrypt( $plaintext_key );
update_option( 'viscribe_options', [ 'api_key' => $encrypted ] );Key Masking in the UI
When the settings page loads, the encrypted key is decrypted and then masked for display — only the first four and last three characters are shown (gsk_ab9...xyz). The masked value cannot be used to make API calls.
Two-Layer Key Security
Viscribe uses two separate cryptographic keys:
| Key | Purpose | Storage |
|---|---|---|
API Key (gsk_...) | Authenticates with Groq's API | Encrypted in wp_options or wp-config.php |
| Encryption Key | Encrypts/decrypts the API key | In wp_options or ideally wp-config.php |
Recommended: Store Keys in wp-config.php
For maximum security, define both keys in your wp-config.php file. This keeps them out of the database entirely:
define( 'VISCRIBE_API_KEY', 'gsk_your_api_key_here' );
define( 'VISCRIBE_ENCRYPTION_KEY', 'def00000_your_defuse_key_here' );When these constants are detected, Viscribe uses them directly and ignores any values stored in the database.
Input Validation & Sanitization
| Area | Method |
|---|---|
| API key format | Validated with API_Key_Validator::validate_groq_key() before encryption |
| Settings input | Sanitized via Settings_Page::sanitize_settings() with allowed-lists |
| File types | Intersected against a hard-coded list of allowed MIME types |
| AI models | Checked against a list of known valid model IDs |
| Filenames | Sanitized through sanitize_file_name() + custom File_Sanitizer |
| Alt text | Run through sanitize_text_field() and wp_strip_all_tags() |
AJAX Security
Every AJAX endpoint in Viscribe is protected by:
- Nonce verification — each request includes a one-time token generated by
wp_create_nonce() - Capability checks —
manage_optionsis required for settings operations
File Upload Limits
To prevent abuse and timeout issues, Viscribe enforces a 10 MB maximum file size for AI processing. Files larger than this are uploaded normally without renaming. This limit can be increased with the viscribe_max_file_size filter.
The Pro Add-on
The Pro version adds support for OpenAI, Anthropic, Google Gemini, and custom OpenAI-compatible providers. Each provider has its own API key storage, following the same encryption model.
Privacy Policy Note
The image data sent to Groq is processed temporarily and is not stored by Groq beyond what is necessary to fulfill the request. See the Groq Privacy Policy for their data handling practices.