pub struct TrustReport {
pub signals: Vec<TrustSignal>,
}Expand description
The honeypot/hostility verdict for a proxy (A6). Empty = trusted.
Fields§
§signals: Vec<TrustSignal>Implementations§
Source§impl TrustReport
impl TrustReport
Sourcepub fn assess(
sent_header_names: &[&str],
canary: &str,
content: &str,
) -> TrustReport
pub fn assess( sent_header_names: &[&str], canary: &str, content: &str, ) -> TrustReport
Assess a decompressed judge response against what we sent. Pure — the unit under test.
- Canary: our nonce must appear verbatim (content tampering else).
- Injected headers: the echoed request (scanned as
Name: valuelines) must carry no header name outside the set we sent ∪ a benign-hop allowlist.Via/X-Forwarded-Forare the anonymity signal, not trust, so they are allow-listed to avoid double-counting.
The scan splits on ": " (colon-space), so a URL value like https://… on its own line is
not mistaken for a header. It is a heuristic: opt-in, with documented false-positive guards.
Scope / limitations (opt-in heuristic, honest about what it does not catch):
- The injected-header scan only works against judges that echo the raw request headers
as
Name: valuelines. The bundled defaults do not: httpbin emits JSON ("Name": "…", whose quoted key fails the name check) and azenv-style judges emitHTTP_NAME = value(no": "). So with the default judge pool this scan is inert (safe — no false positives, but no detection). For real injection detection, pass a raw-header-echo judge via--judges. - On the standard check path
canaryis the validity marker, which validation already requires to be present — soCanaryMismatchcannot fire there. The signal exists for the pure-function contract (callers assessing content that did not pass validity).
Trait Implementations§
Source§impl Clone for TrustReport
impl Clone for TrustReport
Source§impl Debug for TrustReport
impl Debug for TrustReport
Source§impl Default for TrustReport
impl Default for TrustReport
impl Eq for TrustReport
Source§impl PartialEq for TrustReport
impl PartialEq for TrustReport
impl StructuralPartialEq for TrustReport
Auto Trait Implementations§
impl Freeze for TrustReport
impl RefUnwindSafe for TrustReport
impl Send for TrustReport
impl Sync for TrustReport
impl Unpin for TrustReport
impl UnsafeUnpin for TrustReport
impl UnwindSafe for TrustReport
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more