fallow_types/security_stable_id.rs
1//! The line-free input of the stable id of a security finding.
2
3/// The detector facts that name a security finding without its line.
4///
5/// The stable id step reads these facts and the anchor file, and hashes the
6/// result. A finding without these facts gets no `stable_finding_id`.
7#[derive(Debug, Clone, PartialEq, Eq)]
8pub enum SecurityStableIdInput {
9 /// The byte span of the full sink expression in the anchor file, after a
10 /// leading byte order mark. For an assignment sink it is the full
11 /// assignment. For a call sink it is the full call with all arguments.
12 SinkSpan {
13 /// Byte offset of the first byte of the sink.
14 start: u32,
15 /// Byte offset after the last byte of the sink.
16 end: u32,
17 },
18 /// The detector signal of a hard-coded secret: a provider family such as
19 /// `Stripe key`, or `entropy` for a high-entropy value. The secret value
20 /// itself never enters the hash input.
21 SecretSignal(String),
22 /// The env secrets that the server module of a client-server leak reads,
23 /// such as `process.env.DATABASE_PASSWORD`, sorted and without duplicates.
24 SecretReads(Vec<String>),
25}