LLM File Protection
Security Requirement
Large Language Models are composed of files (weights, configuration, tokenizer, etc.) loaded by the inference engine. These files MUST be protected against unauthorized access and modification.
Risks of Unprotected Model Files
| Risk | Impact |
|---|---|
| Unauthorized access | Model theft, intellectual property loss |
| Unauthorized modification | Backdoored or poisoned model served to users |
| Tampering | Modified weights producing biased, harmful, or incorrect outputs |
| Data extraction | Extracting sensitive training data embedded in model weights |
Required Controls
| Control | Description |
|---|---|
| Access control | Only authorized users and services can read model files |
| Write protection | Only authorized pipelines can modify model files |
| Integrity verification | Detect unauthorized modifications via checksums or signatures |
| Encryption at rest | Encrypt model files on disk to protect against storage-level access |
| Audit logging | Log all access to model files |
Implementation Checklist
- [ ] Store model files in access-controlled storage (not world-readable)
- [ ] Grant read access only to the inference engine service account
- [ ] Grant write access only to authorized model deployment pipelines
- [ ] Mount model files as read-only in the inference engine container
- [ ] Enable encryption at rest for model storage volumes
- [ ] Implement integrity checks (checksums or signatures) verified at load time
- [ ] Log all access to model files for audit
- [ ] Regularly audit file permissions and access patterns