Skip to content

feat(security): ADR-034/035/036 — clés, recall procedural, TrustLevel - #50

Merged
MikeRoss27 merged 3 commits into
mainfrom
dev
Jul 9, 2026
Merged

feat(security): ADR-034/035/036 — clés, recall procedural, TrustLevel#50
MikeRoss27 merged 3 commits into
mainfrom
dev

Conversation

@MikeRoss27

Copy link
Copy Markdown
Contributor

Summary

  • ADR-034 : résolution centralisée de la passphrase utilisateur via EncryptionKey::resolve (CLI config key, BASEMYAI_DB_KEY, fichier ~/.basemyai/key) — alignement bindings/MCP/REST.
  • ADR-035 : recall procedural opt-in par défaut (anti memory poisoning) ; exact_fact_exists respecte la validité temporelle en consolidation.
  • ADR-036 : enum publique TrustLevel, provenance wire source, filtre recall par confiance, import JSONL durci contre le spoofing.
  • Sécurité : suite de tests adversariaux (isolation, export, plaintext interdit, zero-network recall), job CI fuzz (fuzz.yml), documentation docs/security/*.

Test plan

  • cargo xtask ci
  • cargo xtask test-crash-consistency (si modifs engine)
  • Vérifier basemyai config key set/show et ouverture conteneur avec ~/.basemyai/key
  • Recall sans include_procedural n'expose plus la couche procedural
  • Import JSONL : lignes procedural refusées sans flag trusted
  • Workflow fuzz sur PR (job fuzz.yml)

…l opt-in, TrustLevel

Unifie la résolution de passphrase, durcit recall/consolidation contre le memory poisoning, expose la provenance via TrustLevel, et ajoute tests adversariaux, docs sécurité et job fuzz CI.

Co-authored-by: Cursor <cursoragent@cursor.com>
@cursor

cursor Bot commented Jul 9, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@github-actions github-actions Bot added community bug Something isn't working ci crate:basemyai documentation Improvements or additions to documentation security labels Jul 9, 2026
@MikeRoss27 MikeRoss27 self-assigned this Jul 9, 2026
MikeRoss27 and others added 2 commits July 9, 2026 22:21
…util gate, zero-network fetch

clippy (-D warnings): drop unused std::io::Write import and two needless-return
statements introduced in crates/basemyai-core/src/storage/key.rs (ADR-034).

basemyai-mcp/tests/sampling.rs: allow(deprecated) on ClientCapabilitiesBuilder::
enable_sampling (SEP-2577), same posture already taken in the server/backend code.

embed CI job: NativeMemoryStore::open/open_ephemeral and the underlying
Engine::open were gated `test-util` only, but basemyai's own #[cfg(test)] unit
tests and the embed job's `cargo test --features embed` never enabled it —
extend the gate to `any(test, feature = "test-util")` and add basemyai-engine
as a dev-dependency with test-util so it's always available under `cargo test`,
plus pass test-util explicitly in ci.yml/xtask for the embed job's external
integration tests.

zero-network-after-setup: add a `cargo fetch --locked` step before the proxy
is blocked, and run the tests --offline — the rust-cache for this job only
saves on `main`, so a PR can restore a stale cache and need registry access
mid-test with the proxy already blocked.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@MikeRoss27
MikeRoss27 enabled auto-merge July 9, 2026 20:38
@MikeRoss27
MikeRoss27 disabled auto-merge July 9, 2026 20:38
@MikeRoss27
MikeRoss27 merged commit 12ff2db into main Jul 9, 2026
8 of 11 checks passed
@MikeRoss27
MikeRoss27 deleted the dev branch July 9, 2026 20:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working ci community crate:basemyai documentation Improvements or additions to documentation security

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant