Skip to content

Security: Busnes-app/ky-primitives

SECURITY.md

Security Policy

ky-primitives provides shared security primitives (capsule sealing, the recovery client, key pinning) used across the suite. Because many products import it, its trust boundaries are the suite's trust boundaries.

Reporting vulnerabilities

Report security vulnerabilities privately through GitHub Security Advisories: https://github.com/Busnes-app/ky-primitives/security/advisories. Do not open a public issue. Include the affected area, reproduction steps, impact, and affected versions. We aim to acknowledge reports within two business days and will coordinate a fix and disclosure.

Trust boundaries and limitations

  • The library handles key material and sealed containers. No public API may let a caller extract a private key, seed, or share, and the library must not log them.
  • Capsule sealing binds a container to the pinned recovery public key; a change must preserve that binding and the integrity proof that capsule.Open enforces.
  • The recovery client refuses non-HTTPS recovery URLs and, by default, private, loopback, and link-local targets; an explicit opt-in exists for operator LANs with loopback still refused.
  • Shared primary s3 requests require verified HTTPS and refuse redirects. Streaming PUT uses UNSIGNED-PAYLOAD under TLS; products own authenticated sealing, authorization and quota/replica policy. Explicit all-version erasure requires a writer fence and cannot override provider retention or erase another bucket's replica. See the S3 contract.
  • Public functions are a boundary: validate there, and keep error text free of secret material.
  • TOTP refuses decoded secrets below 128 bits; preserve legacy enrolment records and require issuer re-enrolment rather than silently replacing their secrets.
  • SFTP pins do not waive key-size or algorithm policy. For strong offsite cryptography use pinned SFTP or HTTPS S3; SMB/NTLM remains an explicitly chosen compatibility transport with the limitations in offsite/README.md.

Handling requirements

  • Callers pin the recovery public key write-once; a second pairing to a different key must fail, not overwrite.
  • Callers keep local copies, receipts, and audit records; never log tokens.
  • Restore drills seal to a throwaway key generated and discarded inside the drill.

Security-sensitive changes

Changes to sealing/opening, key handling, the recovery client, key pinning, or the sealed pairing record require tests for both the expected path and the relevant failure or attack path, plus a description of the trust boundary in the pull request.

Related documents

There aren't any published security advisories