Security, Secrets, and Dependencies
Security is part of the definition of done. A feature that works but exposes data is not finished.
Requirements
- Encrypt everything. All traffic uses HTTPS or TLS, and personal or private data is never sent over plain HTTP. Sensitive data is encrypted at rest.
- Secure defaults. Nothing is open by default. Every endpoint requires authentication unless it is deliberately public, and access follows least privilege for users, services and developers alike.
- Isolated databases. Databases are never reachable from the public internet. Only the application can connect via a private internal network. Administrative access goes through a VPN or bastion host with multi-factor authentication. Each environment has its own database, and production data is never copied into development or staging.
- Validate input and handle errors safely. Every input is treated as untrusted. Error messages and logs never expose secrets or tokens.
- Keep personal data out of logs. As far as possible, logs record internal IDs and not names, email addresses, phone numbers or IP addresses. Personal data scattered through logs is hard to find and erase later, which makes privacy laws harder to comply with.
- No secrets in code. Keys, passwords and tokens never go into repositories, images or chat. They live in the organization's managed secrets store, scoped per project and environment, and the hosting platform pulls them at deploy time. A secret that leaks (including into an AI chat conversation) must be rotated straight away. HCI's current password and secrets manager is a self-hosted Infisical instance (link to follow).
- Keep secrets away from AI agents. AI coding agents must not read environment files or real credentials, and secrets must never be pasted into prompts. Keep secret files out of the agent's reach, give it placeholder or development-only values, and let the secrets manager supply the real values at run time. Anything an agent sees can be sent to an AI provider or end up in logs and generated code.
- Scan and patch dependencies. Every repository must scan its dependencies for known vulnerabilities and for package health (maintenance, maintainer changes, malicious or suspicious code). Critical issues must be fixed within 2 business days and high-severity issues within 4 days (proposed).
- Pin dependency versions. Dependencies should be pinned to exact versions with a committed lockfile, and builds must install from that lockfile. Nothing pulls the latest version of a package automatically. Version updates arrive as pull requests and go through the same checks as any other change.
- Report incidents. Security issues are reported to the software department as soon as they are found, and affected users are told directly.
Recommendations
- Before the first production release, run a security audit of the whole repository (AI-assisted is fine) on top of the per-pull-request checks.
- Upgrade runtimes on a schedule, before they reach end of life.
- Avoid adopting new package releases early. Let a release age for a week or two before upgrading, unless it fixes a security issue. Supply-chain attacks such as the Shai-Hulud npm worm spread through freshly published, compromised versions, and most are caught within days.
- Run third-party plugins or apps that extend HCI platforms with limited permissions. Review them before they are enabled, and make sure they can be switched off without affecting the platform.
- Obfuscate mobile app release builds. Turn on the platform's code shrinking and obfuscation (for example R8 on Android) so the compiled app is harder to reverse-engineer. Obfuscation slows an attacker down but does not hide secrets, so keys and credentials still never ship inside the app.