How akash-billawa/execution-aware-scanner works
Purpose and Entry Points
This Rust workspace implements an execution-aware vulnerability scanner: it joins image/SBOM CVEs with observed Linux runtime behavior, EPSS/CISA KEV intelligence, risk scoring, attack-path analysis, and optional enforcement. The primary daemon entry point is scanner-agent/src/main.rs; a separate aggregation process exists at scanner-aggregator/src/main.rs. Shared domain types live in scanner-common/src/lib.rs.
Runtime Capture Boundary
Linux eBPF programs emit unified security events for process, file/library, network, probe, and tracing activity. Kernel-side sources are in scanner-ebpf/src/lib.rs, scanner-ebpf/src/events.rs, and scanner-ebpf/src/tracepoints.rs. The agent conditionally loads these programs through scanner-agent/src/bpf_loader.rs; non-eBPF development uses scanner-agent/src/bpf_loader_stub.rs. This is the principal platform boundary: eBPF needs Linux kernel 5.8+, BTF, compatible headers, and privileged capabilities.
Event Ingestion and Runtime Evidence
The agent consumes kernel events, converts them into its userspace runtime model, and records execution evidence such as loaded libraries and network activity. The pipeline centers on scanner-agent/src/event_consumer.rs, scanner-agent/src/runtime_mapper.rs, and scanner-agent/src/runtime_correlation.rs. scanner-agent/src/state.rs is the in-process state boundary used by downstream analysis; runtime evidence determines whether an otherwise static vulnerable component is reachable.
Vulnerability and Intelligence Pipeline
Static software inventory and vulnerability detection originate from image/SBOM inputs and OCI scanning, represented by scanner-agent/src/sbom.rs, scanner-agent/src/oci_scanner.rs, and scanner-agent/src/vuln_detector.rs. Threat intelligence enrichment is handled in scanner-agent/src/intel.rs. The resulting vulnerability records are matched against runtime evidence before prioritization, rather than treating all image CVEs as equally actionable.
Risk, Graph, and Proof Analysis
Risk evaluation combines CVSS, EPSS, KEV, and runtime reachability using scanner-agent/src/risk_engine.rs and scanner-agent/src/predictive_risk.rs. Attack-path construction and runtime-oriented correlation are represented by scanner-agent/src/attack_graph.rs, scanner-agent/src/runtime_attack_graph.rs, and scanner-agent/src/execution_proof.rs. This layer converts enriched findings into prioritized, explainable paths and execution-aware findings.
Policy and Enforcement Boundary
Policy evaluation is separated from enforcement mechanics: scanner-agent/src/policy_engine.rs evaluates policy, including Rego assets under policies/, while scanner-agent/src/enforcement.rs and scanner-agent/src/safe_enforcement.rs apply guarded actions. Network-level controls use scanner-agent/src/tc_enforcer.rs; remediation integration is defined by scanner-agent/proto/remediator.proto and scanner-agent/src/remediator.rs. Enforcement should remain gated by runtime validation and safe/audit modes.
Interfaces, Observability, and Deployment
The daemon exposes findings, scans, policies, and webhook-facing APIs under scanner-agent/src/api/, with metrics and health endpoints implemented in scanner-agent/src/metrics.rs. Outbound notifications are handled by scanner-agent/src/webhook_sender.rs; cloud integration adapters exist in scanner-agent/src/cloud/. It is deployable as a Kubernetes node-level DaemonSet via deploy/kubernetes/daemonset.yaml or the Helm chart at helm/execution-aware-scanner/; RBAC and network isolation are explicit in deploy/kubernetes/rbac.yaml and deploy/kubernetes/networkpolicy.yaml. Grafana dashboards are provisioned from grafana/.
Main entry points: state.rs Agent state · execution_proof.rs Execution proof · safe_enforcement.rs Safe enforcement · risk_engine.rs Risk engine
Components 22
Runtime capture
Linux kernel telemetry and agent-side evidence processing.
- eBPF event programs · Requires supported privileged Linux kernel environment.
scanner-ebpf/src/lib.rs - BPF loader · Loads eBPF programs; a stub supports non-eBPF development.
scanner-agent/src/bpf_loader.rs - Event consumer
scanner-agent/src/event_consumer.rs - Runtime mapper
scanner-agent/src/runtime_mapper.rs - Runtime correlation · Relates execution evidence to vulnerable components.
scanner-agent/src/runtime_correlation.rs - Agent state · State boundary for downstream analysis.
scanner-agent/src/state.rs
Finding analysis
Static inventory, intelligence, risk, and execution-aware proof.
- SBOM inventory
scanner-agent/src/sbom.rs - OCI scanner
scanner-agent/src/oci_scanner.rs - Vulnerability detection
scanner-agent/src/vuln_detector.rs - Threat intelligence
scanner-agent/src/intel.rs - Risk engine · Combines CVSS, EPSS, KEV, and reachability.
scanner-agent/src/risk_engine.rs - Attack-path analysis
scanner-agent/src/attack_graph.rs - Execution proof · Produces explainable execution-aware findings.
scanner-agent/src/execution_proof.rs
Policy and response
Guarded policy decisions and remediation actions.
- Policy engine · Evaluates policy including Rego assets.
scanner-agent/src/policy_engine.rs - Safe enforcement · Applies actions only through runtime validation and safe/audit modes.
scanner-agent/src/safe_enforcement.rs - Remediation integration
scanner-agent/src/remediator.rs
Interfaces and deployment
External APIs, notifications, and node-level operation.
- Agent API · Exposes findings, scans, policies, and webhook-facing APIs.
- Webhook notifications
scanner-agent/src/webhook_sender.rs - Scanner agent · Primary node-level scanner process.
scanner-agent/src/main.rs - Scanner aggregator · Separate aggregation process.
scanner-aggregator/src/main.rs - Kubernetes DaemonSet · Deploys the agent on Kubernetes nodes.
deploy/kubernetes/daemonset.yaml
Other components
- Shared domain types
scanner-common/src/lib.rs
Connections 23
- Shared domain types → Scanner agent: shared types
- Shared domain types → Scanner aggregator: shared types
- Scanner agent → BPF loader: initializes
- BPF loader → eBPF event programs: loads
- eBPF event programs → Event consumer: security events
- Event consumer → Runtime mapper: raw events
- Runtime mapper → Runtime correlation: runtime evidence
- Runtime correlation → Agent state: correlated evidence
- OCI scanner → SBOM inventory: image inventory
- SBOM inventory → Vulnerability detection: components
- Vulnerability detection → Threat intelligence: vulnerability records
- Threat intelligence → Risk engine: enriched CVEs
- Agent state → Risk engine: runtime reachability
- Risk engine → Attack-path analysis: prioritized findings
- Agent state → Attack-path analysis: runtime relationships
- Attack-path analysis → Execution proof: attack paths
- Execution proof → Policy engine: explainable findings
- Policy engine → Safe enforcement: approved action
- Safe enforcement → Remediation integration: remediation request
- Safe enforcement → Agent API: action status
- Execution proof → Agent API: findings
- Agent API → Webhook notifications: webhook events
- Kubernetes DaemonSet → Scanner agent: deploys