Skip to content

feat: signature enforcement, strict ed25519, and self-update TOCTOU fix#50

Merged
MotherSphere merged 1 commit into
mainfrom
feat/signature-enforcement
Jul 20, 2026
Merged

feat: signature enforcement, strict ed25519, and self-update TOCTOU fix#50
MotherSphere merged 1 commit into
mainfrom
feat/signature-enforcement

Conversation

@MotherSphere

Copy link
Copy Markdown
Member

Durcissement final de la chaîne de confiance (autonomie validée par Lin)

  1. "signed": true dans le manifest - une signature manquante ABORTE l'install au lieu du fallback legacy non-signé. Ferme le trou « repo compromis qui omet les signatures ». Toutes les apps de l'org ont des releases signées depuis aujourd'hui → adoption sans risque.
  2. verify_strict - rejette les signatures malléables/non-canoniques (verifier recommandé pour les contextes d'update).
  3. Fix TOCTOU du self-update - le staging re-copiait le fichier après avoir vérifié des octets lus plus tôt ; un swap entre lecture et copie installait des octets jamais vérifiés. On écrit maintenant le buffer vérifié exact.
  4. Plus de token OAuth sur les téléchargements d'assets (endpoints publics) - les appels API le gardent pour le rate limit.

Validation

105 tests verts (nouveau test du parse signed), clippy 0, fmt OK.

Four hardening items closing the trust story:

- Manifests can declare '"signed": true': a missing .sig then ABORTS
  the install instead of falling back to the legacy unsigned path -
  closing the hole where a compromised repository simply omits
  signatures. Every Project-Colony app has signed releases as of today,
  so the flag is safe to adopt ecosystem-wide.
- ed25519 verification uses verify_strict (rejects malleable and
  non-canonical signatures - the recommended verifier for update
  contexts).
- apply_launcher_update wrote the update by re-COPYING the staged file
  after verifying bytes read earlier: a swap between read and copy
  would install bytes the signature check never saw. It now writes the
  exact verified buffer.
- Release-asset downloads no longer attach the OAuth token: they are
  public endpoints, and credentials should not be presented where none
  are needed (API calls keep using the token for rate limits).
@MotherSphere
MotherSphere merged commit 1f57b45 into main Jul 20, 2026
3 checks passed
@MotherSphere
MotherSphere deleted the feat/signature-enforcement branch July 20, 2026 19:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant