# `MobDev.SecurityScan.LayerResult`
[🔗](https://github.com/genericjam/mob_dev/blob/master/lib/mob_dev/security_scan/layer_result.ex#L1)

Result of running a single scan layer (Hex deps, Gradle deps,
bundled runtime, C source, etc).

`status` is one of:

  * `:ok` — layer ran successfully (findings may still be empty)
  * `:tool_missing` — a required external scanner isn't installed;
    the layer was skipped with a warning
  * `:not_applicable` — the surface area doesn't exist in this project
    (e.g. no `android/` directory)
  * `:skipped` — the user passed `--skip <name>`
  * `:error` — the layer failed unexpectedly; see `:error` field

Layers always return a LayerResult; they never raise. Callers
decide how to surface tool-missing or error states based on
whether the scan is in `--strict` mode.

# `status`

```elixir
@type status() :: :ok | :tool_missing | :not_applicable | :skipped | :error
```

# `t`

```elixir
@type t() :: %MobDev.SecurityScan.LayerResult{
  duration_ms: non_neg_integer() | nil,
  error: String.t() | nil,
  findings: [MobDev.SecurityScan.Finding.t()],
  name: atom(),
  notes: [String.t()],
  status: status(),
  tools_used: [String.t()]
}
```

---

*Consult [api-reference.md](api-reference.md) for complete listing*
