Local Authorization and File Security
LanMate provides local folder authorization plus system-level blacklist protection, ensuring the AI assistant reads and writes files safely within the scope you authorize. File access uses a dual-layer security mechanism of whitelist plus blacklist: the whitelist decides which directories the AI assistant can access, while the blacklist provides backstop protection for system-sensitive paths. Both layers take effect at the same time — neither can be bypassed.
Under this mechanism, only folders you explicitly authorize can be read and written by the AI assistant; unauthorized directories are completely inaccessible. Authorization configuration is stored only on your machine. All permission settings constrain only the AI assistant’s behavior — they don’t affect any of your own file operations.
Local Folder Authorization (Whitelist)
The whitelist is the list of folders the AI assistant can access. Only directories on the whitelist can be read and written; unauthorized directories are completely invisible to the AI assistant.
On first launch, the system automatically presets the default working directory as a whitelist entry — usable out of the box. Preset entries aren’t shown in the authorization list; you can add other folders on top of the preset as needed.
Adding an Authorized Folder
- Open “Settings” and go to the “Local Authorization” page.
- Click “Add Folder” to open the form.
- Enter the folder path and click “Add” to confirm.
- Once validation passes, the folder appears in the authorization list and the AI assistant can access that directory.
When adding, the system validates the path item by item; if any check fails, the addition is rejected with a specific reason:
| Check | What’s Validated | Message on Failure |
|---|---|---|
| Non-empty check | Path cannot be empty | Please enter a folder path |
| Format check | Whether it’s a valid absolute path without illegal characters | Incorrect path format — check and retry |
| Duplicate check | Whether the path has already been added | This folder has already been added — no need to add it again |
| System directory check | Whether it’s a critical system directory or hits the blacklist | This is a system-protected directory — authorization is forbidden |
Note that path validation only checks whether the format is valid, not whether the path actually exists. If you enter a path that doesn’t exist yet, it’s recommended to confirm the path is correct after adding, so the AI assistant can find the target folder.
Removing an Authorized Folder
In the authorization list, hover over the target folder card and click the delete button that appears to remove the authorization. The AI assistant immediately loses access to that directory.
File Access Blacklist
On top of the whitelist, LanMate has a system-level file access blacklist that forbids the AI assistant from reading or writing sensitive directories that could affect system security. The blacklist is preset by the client per system platform (macOS, Windows, Linux); there’s no editing entry, and users cannot modify it.
Protection Scope
The blacklist covers these categories of sensitive paths:
| Category | Typical Path Examples | Protection |
|---|---|---|
| Core system directories | /System on macOS, C:\Windows on Windows, /etc and /boot on Linux | Read and write forbidden |
| Key and credential directories | ~/.ssh, ~/.gnupg, cloud platform credential directories, system keychain and certificate directories | Read and write forbidden |
| System command and program directories | System command directories, installed program directories | Read and write forbidden; some are write-only forbidden |
| Temporary directories | /tmp, system temp folders | Write forbidden only |
For blacklisted paths, both reading (file contents, file name lists, metadata) and writing (create, modify, delete, rename) are forbidden.
Dual Interception Mechanism
The blacklist takes effect at two layers, ensuring sensitive paths can never be accessed by the AI assistant under any circumstances:
- Interception at add time: Paths are validated when adding to the whitelist; hitting the blacklist rejects the addition outright. Path matching uses exact match plus prefix match, and resolves the real path behind symbolic links — authorizing a subdirectory of a blacklisted directory is likewise rejected.
- Runtime backstop: Even if a path passes add-time validation, the AI assistant re-validates when performing file operations, preventing indirect bypasses.
The runtime backstop mainly intercepts these scenarios:
| Bypass Method | How It’s Intercepted |
|---|---|
| Path traversal | Breaking out of the authorized directory via forms like ../../ — if the resolved real path hits the blacklist, it’s intercepted |
| Symbolic links | A link inside an authorized folder points to a blacklisted path — after following and resolving, a hit is intercepted |
| Command line or scripts | Indirect access to blacklisted paths via shell commands or other tools is likewise intercepted |
| Temporary directory writes | Writing scripts and other files to temporary directories is forbidden |
When access is intercepted, the AI assistant receives a rejection notice and explains to you in the conversation why it couldn’t complete the task; the client doesn’t interrupt you with popups. The AI assistant must not bypass blacklist restrictions by any means, such as privilege escalation or permission modification. When uploading attachments, the file picker also automatically filters blacklisted paths to avoid selecting sensitive files by mistake.
FAQ and Security Advice
FAQ
After authorizing a parent directory, can blacklisted subdirectories inside it still be accessed?
No. Authorizing a parent directory (such as the user home directory) is allowed, but the AI assistant automatically skips blacklisted subdirectories inside it (such as ~/.ssh) when traversing files — those directories remain inaccessible at all times.
What if a previously authorized folder gets blacklisted after a system upgrade?
The authorization entry stays in the list, with a warning icon next to it indicating the directory has been listed as a system-protected directory. The AI assistant likewise intercepts access to it at runtime — no manual handling needed from you.
Does authorization configuration restrict my own file operations?
No. File authorization configuration applies only to the LanMate AI assistant — it doesn’t restrict any of your own file operations.
Security Advice
- Authorize on demand, with minimal scope: Add only the folders the AI assistant needs to do its work; avoid authorizing entire disks or directories too high in the hierarchy.
- Confirm contents before authorizing: Before adding a folder, confirm it contains nothing unsuitable for the AI assistant to process; don’t add directories with sensitive materials to the whitelist.
- Clean up idle authorizations promptly: Delete authorized folders you no longer need in time to shrink the accessible scope.
- Review the authorization list regularly: Make a habit of checking the “Local Authorization” list to confirm everything in it is a path you approve of.
- Watch for top-of-page notices: When a license status notice appears at the top of the home page or other pages (e.g., license expired, unable to retrieve license information), contact your administrator promptly.