# BR-STO-02

Quand Redis ou une base SQL est construit sans chiffrement, alors un PIIGhostSecurityWarning est émis.

Défini dans [Stocker les conversations et protéger les traces](https://docs.piighost.dev/fr/domain/operations/storage-and-encryption/#br-sto-02).

## Où vit la règle

- [`warn_plaintext()`](https://github.com/Athroniaeth/piighost/blob/master/src/piighost/conversation_memory/base.py#L44)
- [`RedisConversationMemory.__init__()`](https://github.com/Athroniaeth/piighost/blob/master/src/piighost/conversation_memory/redis_backend.py#L84)
- [`SqlAlchemyConversationMemory.__init__()`](https://github.com/Athroniaeth/piighost/blob/master/src/piighost/conversation_memory/sqlalchemy_backend.py#L77)

## Tests directs

- [`tests/acceptance/test_ops.py::TestSharedMemory::test_two_instances_agree_on_a_thread`](https://github.com/Athroniaeth/piighost/blob/master/tests/acceptance/test_ops.py#L59)
- [`tests/conversation_memory/test_redis.py::TestAtRestProtection::test_detections_are_encrypted_at_rest`](https://github.com/Athroniaeth/piighost/blob/master/tests/conversation_memory/test_redis.py#L159)
- [`tests/conversation_memory/test_redis.py::TestAtRestProtection::test_message_text_is_not_stored_in_any_key`](https://github.com/Athroniaeth/piighost/blob/master/tests/conversation_memory/test_redis.py#L148)
- [`tests/conversation_memory/test_redis.py::TestBatchingAndAtomicity::test_concurrent_identical_remembers_do_not_duplicate`](https://github.com/Athroniaeth/piighost/blob/master/tests/conversation_memory/test_redis.py#L64)
- [`tests/conversation_memory/test_redis.py::TestBatchingAndAtomicity::test_union_reads_in_a_single_mget`](https://github.com/Athroniaeth/piighost/blob/master/tests/conversation_memory/test_redis.py#L46)
- [`tests/conversation_memory/test_redis.py::TestConformance::test_satisfies_the_port`](https://github.com/Athroniaeth/piighost/blob/master/tests/conversation_memory/test_redis.py#L37)
- [`tests/conversation_memory/test_redis.py::TestForget::test_forget_leaves_other_threads`](https://github.com/Athroniaeth/piighost/blob/master/tests/conversation_memory/test_redis.py#L137)
- [`tests/conversation_memory/test_redis.py::TestForget::test_forget_purges_and_reports`](https://github.com/Athroniaeth/piighost/blob/master/tests/conversation_memory/test_redis.py#L124)
- [`tests/conversation_memory/test_redis.py::TestForget::test_forget_unknown_thread_reports_nothing`](https://github.com/Athroniaeth/piighost/blob/master/tests/conversation_memory/test_redis.py#L132)
- [`tests/conversation_memory/test_redis.py::TestGetDetections::test_clean_message_is_a_hit_with_no_detections`](https://github.com/Athroniaeth/piighost/blob/master/tests/conversation_memory/test_redis.py#L89)
- [`tests/conversation_memory/test_redis.py::TestGetDetections::test_overwriting_a_message_does_not_duplicate_in_union`](https://github.com/Athroniaeth/piighost/blob/master/tests/conversation_memory/test_redis.py#L103)
- [`tests/conversation_memory/test_redis.py::TestGetDetections::test_round_trip_for_a_message`](https://github.com/Athroniaeth/piighost/blob/master/tests/conversation_memory/test_redis.py#L77)
- [`tests/conversation_memory/test_redis.py::TestGetDetections::test_union_in_first_seen_order`](https://github.com/Athroniaeth/piighost/blob/master/tests/conversation_memory/test_redis.py#L95)
- [`tests/conversation_memory/test_redis.py::TestGetDetections::test_unknown_message_is_a_miss`](https://github.com/Athroniaeth/piighost/blob/master/tests/conversation_memory/test_redis.py#L84)
- [`tests/conversation_memory/test_redis.py::TestProvenance::test_default_role_is_user`](https://github.com/Athroniaeth/piighost/blob/master/tests/conversation_memory/test_redis.py#L180)
- [`tests/conversation_memory/test_redis.py::TestProvenance::test_records_first_occurrence_role`](https://github.com/Athroniaeth/piighost/blob/master/tests/conversation_memory/test_redis.py#L171)
- [`tests/conversation_memory/test_redis.py::TestProvenance::test_unknown_thread_has_no_provenance`](https://github.com/Athroniaeth/piighost/blob/master/tests/conversation_memory/test_redis.py#L186)
- [`tests/conversation_memory/test_redis.py::TestRedisPlaintext::test_exactly_one_of_hasher_cipher_is_refused`](https://github.com/Athroniaeth/piighost/blob/master/tests/conversation_memory/test_redis.py#L207)
- [`tests/conversation_memory/test_redis.py::TestRedisPlaintext::test_round_trips_without_crypto`](https://github.com/Athroniaeth/piighost/blob/master/tests/conversation_memory/test_redis.py#L193)
- [`tests/conversation_memory/test_redis.py::TestThreadIsolation::test_threads_do_not_leak`](https://github.com/Athroniaeth/piighost/blob/master/tests/conversation_memory/test_redis.py#L113)
- [`tests/conversation_memory/test_sqlalchemy.py::TestConformance::test_satisfies_the_port`](https://github.com/Athroniaeth/piighost/blob/master/tests/conversation_memory/test_sqlalchemy.py#L34)
- [`tests/conversation_memory/test_sqlalchemy.py::TestForget::test_forget_reports_and_erases`](https://github.com/Athroniaeth/piighost/blob/master/tests/conversation_memory/test_sqlalchemy.py#L96)
- [`tests/conversation_memory/test_sqlalchemy.py::TestForget::test_forget_unknown_thread_reports_zero`](https://github.com/Athroniaeth/piighost/blob/master/tests/conversation_memory/test_sqlalchemy.py#L107)
- [`tests/conversation_memory/test_sqlalchemy.py::TestProvenance::test_first_occurrence_role_wins`](https://github.com/Athroniaeth/piighost/blob/master/tests/conversation_memory/test_sqlalchemy.py#L85)
- [`tests/conversation_memory/test_sqlalchemy.py::TestRoundTrip::test_clean_message_is_a_hit_with_no_detections`](https://github.com/Athroniaeth/piighost/blob/master/tests/conversation_memory/test_sqlalchemy.py#L64)
- [`tests/conversation_memory/test_sqlalchemy.py::TestRoundTrip::test_remembers_and_returns_a_message`](https://github.com/Athroniaeth/piighost/blob/master/tests/conversation_memory/test_sqlalchemy.py#L40)
- [`tests/conversation_memory/test_sqlalchemy.py::TestRoundTrip::test_rewriting_a_message_keeps_first_seen_order`](https://github.com/Athroniaeth/piighost/blob/master/tests/conversation_memory/test_sqlalchemy.py#L72)
- [`tests/conversation_memory/test_sqlalchemy.py::TestRoundTrip::test_unseen_message_returns_none`](https://github.com/Athroniaeth/piighost/blob/master/tests/conversation_memory/test_sqlalchemy.py#L48)
- [`tests/conversation_memory/test_sqlalchemy.py::TestRoundTrip::test_whole_thread_unions_in_first_seen_order`](https://github.com/Athroniaeth/piighost/blob/master/tests/conversation_memory/test_sqlalchemy.py#L54)
- [`tests/conversation_memory/test_sqlalchemy.py::TestWarning::test_sqlite_without_crypto_is_silent`](https://github.com/Athroniaeth/piighost/blob/master/tests/conversation_memory/test_sqlalchemy.py#L153)
- [`tests/conversation_memory/test_warn_plaintext.py::TestWarnPlaintext::test_emits_a_security_warning_naming_the_backend_and_doc`](https://github.com/Athroniaeth/piighost/blob/master/tests/conversation_memory/test_warn_plaintext.py#L10)

## Tests indirects

Aucun test indirect trouvé.

## Utilisé par

Aucun appelant trouvé.

Lu dans le graphe du code que construit graphify, aux emplacements que donne la documentation métier.
