14. Security - FA-Systems-Operon/Operon GitHub Wiki
Security
Operon handles client documents and business information. The current implementation includes foundational safeguards, while several controls remain planned.
Existing Safeguards
| Area | Current Implementation |
|---|---|
| Document retrieval | Queries match both client and document IDs, returning 404 for mismatched records. This checks document ownership within a request, but does not authorize the requesting user. |
| File storage | Storage paths use generated identifiers rather than uploaded filenames. Resolved paths are checked to prevent access outside the storage directory. |
| Upload limits | Empty and oversized uploads are rejected. The default maximum upload size is 20 MB. |
| Configuration | Application settings use environment variables. .env is excluded from Git, and CI reporting tools reference GitHub secrets. |
| Containers | Backend and frontend Docker images are configured to run as non-root users. |
| Testing and analysis | Tests check client-scoped retrieval and failure cases. CI includes Ruff checks and configured SonarQube Cloud analysis. |
Planned Controls
- Authentication and authorization: Add secure login, session handling, role permissions, and server-side checks of each user’s client access.
- Data protection: Validate HTTPS deployment, establish encryption at rest and backup protection, and define retention and deletion procedures.
- AI input handling: Minimize sensitive model inputs, treat uploaded content as evidence rather than instructions, and test malicious document instructions.
- Human accountability: Implement explicit approval of generated drafts and an audit trail of important actions.
- Secrets management: Use deployment-specific credentials, avoid development defaults, and establish credential rotation procedures.
The current application should be treated as a development foundation. Production access controls, encryption, and privacy protections have not yet been established or verified.