Skip to content

About

Guard Core port for Rust

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

2 stars

Watchers

1 watching

Forks

Latest commit

 

History

246 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Guard Core


Rust port of the [guard-core](https://github.com/Guard-Core/guard-core) detection engine. The workspace ships two published crates:

Crates.io version Docs Release License CI CodeQL

PagesBuildDeployment DocsUpdate last-commit

Rust Downloads

Website · Docs · Playground · Dashboard · Discord


Ecosystem

Guard Core is the Python engine. Framework adapters are thin wrappers that translate native request/response types into Guard Core's protocols. The telemetry agents ship security events and metrics to the monitoring backend. Parallel engine implementations exist for Go, PHP, TypeScript (on npm), and Rust (on crates.io) - all ports of the same reference semantics, conformance-tested against the shared adversarial corpus.

Python

Package Role PyPI
guard-core Framework-agnostic security engine PyPI
guard-agent Telemetry agent PyPI
fastapi-guard FastAPI / Starlette adapter PyPI
flaskapi-guard Flask adapter PyPI
djapi-guard Django adapter PyPI
tornadoapi-guard Tornado adapter PyPI

Go

Go modules published via GitHub releases. Production-ready.

Package Role Release
guard-core-go Go engine release
nethttp-guard net/http adapter release
gin-guard Gin adapter release
echo-guard Echo (v4) adapter release
fiber-guard Fiber (v3) adapter release
guard-agent-go Telemetry agent release

PHP

Published on Packagist under the rennf93 vendor. Production-ready.

Package Role Packagist
guard-core-php PHP engine Packagist
laravel-guard Laravel adapter Packagist
symfony-guard Symfony adapter Packagist
psr15-guard PSR-15 adapter Packagist
slim-guard Slim 4 adapter Packagist
guard-agent-php Telemetry agent Packagist

TypeScript / JavaScript

Published under the @guardcore npm scope; source in the guard-core-ts monorepo. Production-ready.

Package Role npm
@guardcore/core Core engine
@guardcore/express Express adapter npm
@guardcore/nestjs NestJS adapter npm
@guardcore/fastify Fastify adapter npm
@guardcore/hono Hono (edge) adapter npm
guardagent Telemetry agent npm

Rust

Published on crates.io. Production-ready.

Package Role crates.io
guard-core-engine Core engine crate crates.io
guard-core-rs Facade crate (consumer entry point) crates.io
actix-guard-rs Actix Web adapter crates.io
axum-guard-rs Axum adapter crates.io
tower-guard-rs Tower adapter crates.io
rocket-guard-rs Rocket adapter crates.io
guard-agent-rs Telemetry agent crates.io

AI Coding Agents

Package Role PyPI
guard-core-mcp MCP server: config validation, docs search, detection sandbox PyPI

Features

  • The 129-field SecurityConfig unified configuration surface with fail-closed validation
  • The reference decorator system: the full 25-method mixin surface as a route registry
  • Per-route configuration carriers and the stage pipeline with reference events
  • Redis resilience surface: retries, socket timeouts, pool ceilings, distributed locks, fail-open posture
  • Composite telemetry seam: multi-sink agent fan-out, OTLP, Logfire
  • Behavioral usage counters, CORS preflight, cloud provider tables, sus-pattern registry with Redis persistence
  • Conformance-tested against the shared adversarial corpus in CI

Documentation

📚 Documentation - full technical documentation for this package.

🛡️ Guard Core - the engine's reference documentation.

🤖 Monitoring Agent Integration - monitor your Guard instance with a monitoring agent.

🦀 Rust crates: API reference on docs.rs for the facade and docs.rs for the engine crate.


Status

Production port of the Python engine, tracked against guard-core 4.1.x with a conformance corpus (spec 4.1.0, 193 detect cases, zero xfail). Used by the Rust adapters: tower-guard-rs, axum-guard-rs, actix-guard-rs, and rocket-guard-rs.

Docs: https://guard-core.github.io/guard-core-rs/

Install

cargo add guard-core-engine

Note on registry resolution: the 4.1.0 dists of guard-core-engine and guard-core-rs are currently yanked on crates.io, so a plain registry install resolves 4.0.4. The 4.1.0 line is restored at the synchronized 4.2.0 train; until then the adapters and CI compile the engine from the sibling checkouts via path dependencies.

Links

License

Dual-licensed under either of:

at your option.

About

Guard Core port for Rust

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages