Skip to content

OpenBAS-Platform/agent

Repository files navigation

OpenBAS Agent

Website CircleCI GitHub release Slack Status

The following repository is used to store the OpenBAS agent for the platform. For performance and low level access, the agent is written in Rust. Please start your journey with https://doc.rust-lang.org/book.


🚀 Installation

Agent installation is fully managed by the OpenBAS platform.

You can find more information on the official documentation.

🛠 Development

The agent is written in Rust. If you're new to Rust, start with The Rust Book.

Prerequisites

Build

cargo build

✅ Running Tests

Run all tests (unit + integration):

cargo test

Run a specific test:

cargo test test_name

📊 Code Coverage

Requires cargo-llvm-cov:

cargo install cargo-llvm-cov
cargo llvm-cov --html

🧹 Code Quality Guidelines

Clippy

Run locally:

cargo clippy -- -D warnings

Auto-fix:

cargo fix --clippy

Clippy runs in CI — all warnings must be fixed for the pipeline to pass.


Rustfmt

Check formatting:

cargo fmt -- --check

Fix formatting:

cargo fmt

Rustfmt runs in CI to enforce formatting.


Cargo Audit

Check dependencies for known vulnerabilities:

cargo audit

Update vulnerable packages:

cargo update

Audit is included in CI to block new vulnerabilities.


🧪 Tests in CI

All tests are run automatically in the CI pipeline using:

cargo test

Builds will fail if any tests or quality checks fail.


🛠 Troubleshooting in Development Mode

When running the agent in development mode using:

cargo run -- start

All logs are written to:

target/debug/openbas-agent.log

Check this file if something isn’t working or you need to debug an issue locally.


🧬 About

OpenBAS is developed by Filigran, a company dedicated to building open-source security tooling.