Documentation
Getting started
OASB (Open Agent Security Benchmark) is a standardized framework for assessing AI agent security. There are two ways to use it: run the full evaluation suite from the canonical repository to score a security product, or check an agent's OASB-1 compliance with the reference implementation.
Run the benchmark suite
The canonical source for the full evaluation suite is github.com/opena2a-org/oasb: 166 scenarios mapped to 15 MITRE ATLAS techniques and 57 other scenarios that test the product's response and detection machinery, run against any security product that implements the SecurityProductAdapter interface. Requires Node.js 18+.
git clone https://github.com/opena2a-org/oasb.git cd oasb && npm install npm test
To evaluate your own product instead of the reference adapter, point OASB_ADAPTER at your adapter module:
OASB_ADAPTER=./my-adapter.js npm testCapabilities a product does not declare are reported N/A, not FAIL, so scorecards stay comparable across tools with different surfaces. See the adapter guide in the repository.
Check agent compliance (reference implementation)
To check an agent project against the OASB-1 controls, run the reference implementation with a single command. Requires Node.js 18+.
npx hackmyagent secure --benchmark oasb-1Maturity levels
Choose the level appropriate for your deployment stage.
Baseline security for development and prototypes. Every AI agent should meet these requirements.
Production-ready security for agents handling sensitive data. Recommended for most deployments.
Maximum security for regulated industries, financial services, and high-value targets.
npx hackmyagent secure --benchmark oasb-1 --level L2Output formats
Export results for integration with your tools.
npx hackmyagent secure -b oasb-1 -f sarif -o results.sarifCI/CD integration
Add security verification to your deployment pipeline.
GitHub Actions
name: OASB Security Benchmark
on: [push, pull_request]
jobs:
security:
runs-on: ubuntu-latest
permissions:
contents: read
actions: read
security-events: write
steps:
- uses: actions/checkout@v4
- name: Run OASB-1 Benchmark
run: |
npx hackmyagent secure \
--benchmark oasb-1 \
--format sarif \
--output results.sarif
- name: Upload to GitHub Security
if: success() || failure()
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: results.sarifThe upload step runs when the benchmark step fails as well, so findings reach the Security tab when the rating is below Passing, or below a --fail-below threshold you add. The permissions block lets the upload write to the Security tab on repositories whose default token is read-only; actions: read is needed only in private repositories.
Fail threshold
The benchmark exits with code 1 when the rating is below Passing, which means L1 compliance under 90%, at every level. --fail-below adds a second, stricter condition: it also exits with code 1 when compliance is below the threshold. It does not let a score below Passing through, so at L1 a threshold of 90 or less changes nothing.
npx hackmyagent secure -b oasb-1 --fail-below 95Sample output
Output of npx hackmyagent secure --benchmark oasb-1 . with hackmyagent 0.33.2, run in a Node.js project that holds package.json, package-lock.json, SOUL.md and index.js. Controls the scan cannot check from the project files are listed as unverified and are not counted in the compliance score.
OASB-1: Open Agent Security Benchmark v1.0.0 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Level: Level 1 - Essential Rating: Certified Compliance: 100% (11/11 verified controls) Unverified: 15 controls require manual/forward verification Categories: [.] Identity & Provenance: N/A (2 unverified) [+] Capability & Authorization: 1/1 (100%) [+] Input Security: 2/2 (100%) [+] Output Security: 1/1 (100%) [+] Credential Protection: 1/1 (100%) [+] Supply Chain Integrity: 4/4 (100%) [.] Memory & Context Integrity: N/A (1 unverified) [+] Operational Security: 2/2 (100%) [.] Monitoring & Response: N/A (2 unverified) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Run 'hackmyagent secure -b oasb-1 -l L2' for stricter checks. Spec: https://oasb.ai/oasb-1 Scanned with hackmyagent v0.33.2
CLI reference
Resources