Skip to main content

Module post_secrets

Module post_secrets 

Source
Expand description

What a text posted for others to read (a bulletin or a channel post) must not hold besides credential words (sanitize::post_refusal_reason): a value AgentMux knows to be a secret, and a credential word beside a value. The refusals name the rule, never the text that matched.

Constants§

KNOWN_SECRET
The rule a post is refused under when it holds a value in the registry the transcripts withhold from (crate::backend::transcript::withhold): the registry’s own matcher, in every spelling it knows.
WORD_THEN_VALUE
The rule a post is refused under when a credential word and a value-shaped string stand within a few words of each other.

Functions§

count_refusal
Counts one refusal under rule, and logs it (the rule only, never the text).
help
What a refusal adds for the rule it names, so the poster knows how to post the text anyway when it is not a secret.
refusal_counts
The refusals counted so far, by rule.
refusal_rule
The rule text is refused under, or None: it holds a value AgentMux knows to be a secret (in any of its spellings, also when invisible characters or look-alike letters are mixed in), or a credential word and a value-shaped string stand within a few words of each other, either first.