⚠️ WORK IN PROGRESS — SaveAsPDF is under active development and has no release package yet. The security policy below reflects the current state of the source code.
As there are no official releases yet, security fixes are applied directly to the master branch. Once versioned releases are published, this table will be updated.
| Version | Supported |
|---|---|
| master (pre-release) | ✅ Active development |
| Any tagged release | None yet |
The following security controls are already implemented and active in the source:
- Project ID validation (
FileFoldersHelper.SafeProjectID): All project IDs are validated against a strict regex before being used in any file-system path. Invalid IDs are rejected at both the UI and helper layers. - Folder/file name sanitization (
FileFoldersHelper.SafeFolderName): All folder and file names derived from user input or email metadata are scrubbed of invalid Windows file-system characters. Windows reserved device names (CON,PRN,AUX,NUL,COM1–COM3,LPT1–LPT3) are automatically renamed to avoid collisions. - Path normalization: All file-system paths are resolved to their canonical form using
Path.GetFullPathbefore use, preventing path traversal via relative components such as...
- All user-supplied and email-derived data written into generated HTML files is encoded with
WebUtility.HtmlEncodebefore insertion. This covers: project name, project ID, notes, user name, employee names, email addresses, and attachment file names. - File paths embedded as
file:///hyperlinks in generated HTML havespace,#,?, and%percent-encoded to prevent link injection.
- Unique file/folder name generation prevents silent overwrites when a target already exists.
- Attachment file names are sanitized (invalid characters stripped) before being written to disk.
- Password-protected Word documents are detected before conversion is attempted.
- Configuration metadata is stored in a hidden directory (
.SaveAsPDF) to reduce accidental modification. - Read-only/hidden file attributes on existing XML configuration files are cleared before overwriting to prevent silent write failures.
UnauthorizedAccessExceptionis explicitly caught on all file and directory operations and surfaced to the user without crashing the add-in.- All Outlook COM objects (folders, items, stores) are released in
finallyblocks viaMarshal.ReleaseComObject, preventing use-after-free and memory leaks. - MAPI contact search filter strings escape single-quotes to prevent filter injection.
- Startup and selection-change exceptions are logged to
C:\Temp\SaveAsPDF_error.txtfor post-mortem debugging without exposing sensitive information in the UI.
- All user data (project metadata, employee lists, preferences) is stored locally on the user's machine in XML files. No data is transmitted to any remote server.
- XML serialization uses
XmlReader/XmlWriterwith explicit UTF-8 encoding.
The following are known gaps that are expected to be addressed before a stable release:
- The SMTP credentials in
MailLogic.csare placeholder strings ("senderEmail","senderDisplayName") marked with//TODO3. Email sending is not functional and should not be used in production. - Temporary conversion artifacts may persist if Outlook or Word crashes during export. Automatic cleanup retries and temp-folder health checks should be expanded.
- PDF conversion still relies on Microsoft Word Interop; sandboxing and stricter process isolation are not yet implemented.
- Unit and integration tests for malformed XML/JSON and hostile path inputs are incomplete.
- No code-signing/notarization process has been established yet for distributed builds.
If you discover a security vulnerability, please report it privately:
- Open a private security advisory via GitHub Security tab (preferred), or
- Email the maintainer directly (if contact information is available in the repository profile).
Please include:
- A clear description of the issue
- Steps to reproduce
- Potential impact
- Suggested remediation (if known)
We will acknowledge receipt as soon as possible and work on a fix in master.