Skip to main content

SecurityFinding

Struct SecurityFinding 

Source
pub struct SecurityFinding {
Show 19 fields pub finding_id: String, pub kind: SecurityFindingKind, pub category: Option<String>, pub cwe: Option<u32>, pub path: PathBuf, pub line: u32, pub col: u32, pub evidence: String, pub source_backed: bool, pub source_read: Option<(u32, u32)>, pub severity: SecuritySeverity, pub trace: Vec<TraceHop>, pub actions: Vec<IssueAction>, pub dead_code: Option<SecurityDeadCodeContext>, pub reachability: Option<SecurityReachability>, pub candidate: SecurityCandidate, pub taint_flow: Option<SecurityTaintFlow>, pub runtime: Option<SecurityRuntimeContext>, pub attack_surface: Option<SecurityAttackSurfaceEntry>,
}
Expand description

A local security CANDIDATE for downstream agent verification, NOT a verified vulnerability. Emitted only by fallow security, never under bare fallow or the audit gate. There is deliberately no confidence or signal_strength field: fallow does not prove exploitability, so the trace (its hops and length) is the only honest signal.

Fields§

§finding_id: String

Stable per-finding correlation id, identical across runs for the same rule + anchor path + line + column. An autonomous agent that triaged this candidate on a prior run uses it to correlate the candidate after a rebase. Equal to the SARIF partialFingerprints["fallowSecurity/v2"] value for the same finding (one shared helper computes both).

§kind: SecurityFindingKind

The rule that produced this candidate.

§category: Option<String>

The catalogue category id (e.g. "dangerous-html"). Some for TaintedSink. For ClientServerLeak this is None for the secret-leak finding, and Some("server-only-import") when a "use client" cone reaches server-only code.

§cwe: Option<u32>

The CWE number declared by the matched catalogue entry. None for ClientServerLeak; never fabricated beyond the catalogue’s value.

§path: PathBuf

File the finding is anchored on (the client boundary). Absolute internally; JSON strips the project root via serde_path::serialize.

§line: u32

1-based line number of the anchor.

§col: u32

0-based byte column offset of the anchor.

§evidence: String

Agent/human-readable evidence (e.g. the named env var the chain reaches).

§source_backed: bool

Whether the sink argument was associated with a known untrusted source by the intra-module source-to-sink back-trace (issue #859): a local binding referenced in the argument was sourced from a catalogue source path (req.query, process.argv, message-event data, etc.). true ranks the candidate higher and annotates the evidence; false does NOT suppress the finding (the association is conservative, never a proof, and fallow prefers false-negatives over false-positives). Always false for ClientServerLeak. Skipped from JSON when false for output stability.

§source_read: Option<(u32, u32)>

Internal cross-pass carrier (NEVER serialized): the (1-based line, 0-based col) of the arg-level source read, resolved by the detector when source_backed is true and a concrete read span was captured. The ranking pass uses it to anchor the taint trace’s source node at the real read instead of the module import line. None for module-level findings and for arg-level findings with no concrete read span (synthetic framework-param / helper-return sources), where the trace falls back to the sink site.

§severity: SecuritySeverity

Verification-priority tier derived from existing reachability, boundary, source-backed, and runtime signals. Candidate-only: this does not prove exploitability and does not change gates.

§trace: Vec<TraceHop>

Structural import-hop trace from the client boundary to the secret source. The hop count is the uncalibrated signal; fallow does not prove the path is exploitable.

§actions: Vec<IssueAction>

Machine-actionable next steps. Always emitted (possibly empty for forward-compat). For security candidates this is a single file-level suppress hint (auto_fixable: false); there is no auto-fix because verification is the agent’s job, not fallow’s.

§dead_code: Option<SecurityDeadCodeContext>

Dead-code cross-link when the same sink candidate sits in code fallow also reports as removable. Agents should verify the dead-code finding and delete the code instead of hardening the sink when deletion is safe.

§reachability: Option<SecurityReachability>

Graph-derived reachability ranking signal (issues #860 and #885). None until the post-detection ranking pass fills it; additive on the wire (skipped when absent). Drives the order findings are emitted in: runtime-reachable candidates sort first, followed by source-backed and source-reachable candidates, then wider blast radius.

§candidate: SecurityCandidate

Agent-actionable candidate record: the untrusted input kind, the sink, and the boundary the flow crosses. fallow fills these three slots; the exploitability verdict is the agent’s job and is not a field here. Always present.

§taint_flow: Option<SecurityTaintFlow>

Source-to-sink taint-flow triple, present only when an untrusted source is import-reachable to this sink. Absent (skipped) otherwise.

§runtime: Option<SecurityRuntimeContext>

Production runtime coverage context for the function enclosing this security sink. Present only when fallow security --runtime-coverage runs and the candidate is a tainted-sink.

§attack_surface: Option<SecurityAttackSurfaceEntry>

Internal projection used by fallow security --surface. The CLI strips this from per-finding JSON and promotes it to the top-level attack_surface field only when requested.

Trait Implementations§

Source§

impl Clone for SecurityFinding

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for SecurityFinding

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for SecurityFinding

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for SecurityFinding

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<'a, T> FromIn<'a, T> for T

Source§

fn from_in(t: T, _: &'a Allocator) -> T

Converts to this type from the input type within the given allocator.
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<'a, T, U> IntoIn<'a, U> for T
where U: FromIn<'a, T>,

Source§

fn into_in(self, allocator: &'a Allocator) -> U

Converts this type into the (usually inferred) input type within the given allocator.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.