Skip to content

scanset/Agent-SDK

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

License Rust GitHub tag

ESP Agent SDK

Build compliance scanners using Endpoint State Policy (ESP).

Overview

The ESP Agent SDK is a self-contained CLI scanner that executes ESP policies against endpoint systems and outputs results as JSON. It includes reference implementations for common CTN (Collection Type Name) types via the bundled contract_kit module.

┌─────────────────────────────────────────────────────────────┐
│                     ESP Agent SDK                           │
├─────────────────────────────────────────────────────────────┤
│  agent/                                                     │
│  ├── src/                                                   │
│  │   ├── main.rs, cli.rs, scanner.rs, registry.rs ...       │
│  │   └── contract_kit/   Collectors, executors, contracts   │
│  ├── Cargo.toml                                             │
│  └── Makefile                                               │
├─────────────────────────────────────────────────────────────┤
│                  ESP Core (external, v1.2.0)                 │
│  common, compiler, execution_engine                         │
└─────────────────────────────────────────────────────────────┘

Quick Start

Build

cd agent/
make build          # Debug build
make release        # Optimized release build

Run

# Scan a single policy, console output only
make run ESP=../esp/policy.esp

# Full results to JSON file
make run-full ESP=../esp/policy.esp

# Assessor package for audit/3PAO
make run-assessor ESP=../esp/ksi_cna_mat_iam_mfa_elp_r9_auth_hardening.esp

# Batch scan a directory
make run-batch ESP=../esp/

Cross-Compilation

make build-win      # Windows (x86_64-pc-windows-gnu)
make build-musl     # Linux static (x86_64-unknown-linux-musl)
make release-all    # All targets, release mode

Development

make test           # Run tests
make lint           # Run clippy (strict)
make check-all      # Check all targets compile
make pre-commit     # Format, lint, test

Guides

Guide Description
ESP Language Guide Learn to write ESP policies
Contract Development Guide Extend with custom CTN types

Requirements

  • Rust 1.92+
  • For cross-compilation: mingw-w64 (Windows), musl-tools (static Linux)

Development Environment

VS Code DevContainers (recommended):

Open the repository in VS Code and select "Reopen in Container" when prompted. This provides a fully configured environment with all cross-compilation toolchains.

Manual Docker:

cd agent/
make docker-build

License

Apache 2.0

About

ESP Agent SDK is a reference Rust SDK for building secure, contract-based compliance scanners. It provides collectors, executors, CTN contracts, and a high-level API to execute ESP policies, gather system evidence, and produce reproducible compliance results for CI, agents, or standalone scanners

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors