Skip to main content

Agentic Security Harness

OpenSSF Best Practices CI CodeQL Python License Status

Your AI coding agent reads untrusted repository text. Can it keep data separate from instructions and authority?

Agentic Security Harness is a local, trace-first benchmark for defensive testing of agentic AI boundary failures. It runs reproducible synthetic scenarios, records portable traces and scorecards, and compares a deliberately vulnerable local agent with a protected one.

In plain English: it turns “the agent behaved unsafely” into evidence you can replay, validate, compare, and review.

Quickstart

Install the stable release from PyPI:

python -m pip install agentic-security-harness==1.2.0
ash quickstart --out reports/quickstart
ash agent-host-quickstart --out reports/agent-host-quickstart

For source development:

git clone https://github.com/krivonosoff161/agentic-security-harness.git
cd agentic-security-harness
python -m pip install .
ash quickstart --out reports/quickstart
ash agent-host-quickstart --out reports/agent-host-quickstart

ash quickstart is local and no-network. It runs the same stable 24-pattern corpus against both demo targets, validates the generated artifacts, and renders a self-contained HTML report.

ash agent-host-quickstart is the shipped provider-neutral integration path in v1.1.0. It runs a built-in owned synthetic workflow through the instrumented collector, canonical recordings, deterministic evaluator, atomic bundle publication, and shared validator. It retains digest-only public evidence and makes no provider call.

Runtime Gateway synthetic contour

The source tree now also contains a runnable local Runtime Gateway increment. It applies a closed policy before synthetic tool dispatch, exposes bounded OpenAI-compatible and MCP 2026-07-28 stateless development endpoints, and maintains a privacy-minimized append-only audit chain:

ash gateway-init --out gateway.toml
ash gateway-check --config gateway.toml
ash gateway-serve --config gateway.toml

Open http://127.0.0.1:8787/dashboard after startup, or use the hardened Docker Compose profile in Runtime Gateway synthetic contour. This is a credential-free synthetic integration surface. Offline provider-neutral tool-call adapters normalize retained OpenAI Responses, Anthropic Messages, Google Interactions, and MCP payloads through the same policy without SDKs or credentials. Live provider transport and a production firewall are still not shipped. The gateway exposes its exact closed policy and non-executable approval-request digests; it intentionally has no approval-grant endpoint yet.

Target Modeled findings Patterns passed
demo-agent 24 0
protected-demo-agent 0 24

The deterministic result is 24 modeled findings for the vulnerable fixture and 0 modeled findings for the protected fixture. This is synthetic conformance evidence, not a production safety claim.

Terminal comparison showing 24 findings reduced to 0

Rendered comparison report table

Inspect the committed before/after example in examples/comparison-report/ or validate every public example locally:

ash validate examples/
ash validate docs/evidence-status-registry.json

What this is / is not

This project is This project is not
A reproducible benchmark for agent operating-environment boundaries. A production safety certification.
A synthetic and authorized defensive testing lab. A live exploitation or persistence toolkit.
A way to compare vulnerable and protected targets using portable artifacts. Proof that a provider, model, or deployed agent is secure.
A stable trace/corpus contract with machine-readable validation. A model leaderboard or CVE database.

The benchmark focuses on agent operating-environment boundaries, not just standalone model answers. Built-in targets are deterministic and offline. The experimental external adapter is explicit opt-in, prompt-only, and does not execute tools. See docs/benchmark-semantics.md and docs/authorized-testing-paths.md.

Visual evidence snapshot

Evidence flow from scenario to validated report

The public evidence map separates deterministic executable specifications, sanitized local observations, historical material, and independently reviewed evidence:

Public artifacts may include scenario identifiers, aggregate counts, response hashes, and validator results. They do not include raw private prompts, raw responses, synthetic canaries, or local paths. Keep external raw material under .internal/external-demo/latest. Do not commit raw_responses/ or other private runtime evidence.

Current stable surface

  • Trace schema 1.0, with a bounded legacy 0.1 read/migration window.
  • Corpus 1.0.0, freezing 24 ordered synthetic pattern identifiers.
  • Local targets for vulnerable/protected agent, RAG, tool, function, and multi-agent handoff comparisons, including toy-multi-agent and protected-toy-multi-agent.
  • JSON traces, scorecards, run manifests, remediation, Markdown reports, and self-contained HTML reports.
  • Deterministic validators for artifact integrity and declared benchmark semantics.
  • Linux/Python 3.11-3.13 as the primary installed-package contour, with Windows 3.11 compatibility coverage.
  • Reproducible wheel/sdist builds, checksums, GitHub attestations, and exact-subject CycloneDX SBOMs for public releases from v1.0.0 onward.
  • A shipped provider-neutral Agent Host V1 contour for canonical, authority-free record/replay, deterministic evaluation, explicit Python instrumentation, and a validated 48-case no-network quickstart. The CLI does not execute arbitrary hosts or tools and does not authenticate its producer or certify an external system; see Agent Host Adapter SDK.
  • A shipped local Runtime Gateway synthetic contour with closed pre-dispatch policy, bounded OpenAI-compatible and stateless MCP endpoints, deterministic synthetic tools, privacy-minimized hash-chain audit, dashboard, and hardened source-build Docker Compose.
  • Credential-free retained-envelope normalization for OpenAI Responses, Anthropic Messages, Google Interactions, and MCP tool calls. These adapters do not make provider calls or grant tool-execution authority.

The exact shipped, experimental, planned, and historical surfaces live in docs/current-state.md and docs/capability-matrix.md. Technical v1 gates and honest non-claims are in docs/v1-readiness.md.

If you only have one minute

Use your own model or runtime

The shortest cross-platform operator path is docs/run-your-model.md. It covers:

  1. a no-model deterministic demo;
  2. one explicitly authorized OpenAI-compatible model;
  3. a deterministic local swarm comparison;
  4. a bounded local-model mini-swarm campaign.

Connection details and scenario selection are documented in docs/connect-models.md and docs/test-your-model.md. External runs are prompt-only self-report checks unless a separately reviewed host/tool adapter exists. A coherent answer is not evidence of safe tool execution.

Benchmark and evidence documentation

Start with the curated documentation map if you are not sure which contract, operator guide, or research page applies to your task.

The README is the front door; deeper contracts live in docs/:

Question Source of truth
What is shipped now? Current state
What work is open? Project tracker and roadmap
Which testing paths are authorized? Authorized testing paths
Which system shapes are evaluated? Evaluation topologies
What boundary model is used? Agentic boundary model
How is the corpus expanded? Corpus expansion plan
What do metrics mean? Metric contract
How are scenarios sequenced? Scenario timeline
How should reports be showcased? Showcase checklist
How is evidence promoted? Evidence pack format
How are changes reviewed? Git evidence workflow
How can an external agent host record and evaluate observations? Agent Host Adapter SDK
How can I run the local policy gateway and MCP/OpenAI-compatible demo? Runtime Gateway synthetic contour
How are provider tool-call envelopes normalized without credentials? Provider-neutral tool-call adapters

Specialized reviewer paths:

Standards and portfolio boundaries

The project publishes conservative mappings to OWASP LLM, NIST, and a direct-fit MITRE ATLAS subset in docs/standards-mapping.md. These are maintainer-reviewed mappings, not certification or independent standards validation. Independent review remains public follow-up work.

The related public contract includes:

The 127 units are not 127 canonical attacks and not a repository-wide total. The contract grants no executor, provider, deployment, enforcement, or production authority.

Public security stack

Agentic Security Harness is the benchmark/evidence layer in a small public defensive stack:

llm-safety-playbooks -> ai-agent-handoff -> agentic-transfer-verifier -> agentic-security-harness
  • llm-safety-playbooks documents practical boundary rules.
  • ai-agent-handoff represents task briefs and handoff state as reviewable files.
  • agentic-transfer-verifier checks provenance, authority, approval, and audit evidence around transfers.
  • This repository measures modeled failures and produces validated benchmark artifacts.

The repositories are related but not interchangeable. A playbook is not a runtime control, a handoff file is not a sandbox, and a passing benchmark is not a production certificate.

Release and package status

The stable v1.2.0 package is published on PyPI and as an attested GitHub Release. Future releases remain separate, auditable owner gates.

Independent standards review and a durable second GitHub reviewer are transparent post-v1 credibility tasks. Their absence does not change deterministic test results, but independent review is not claimed.

Development

python -m pip install -e ".[dev]"
python -m pytest
python -m ruff check .
python -m mypy src tests tools
ash validate examples/

Development follows idea -> issue -> branch -> implementation -> tests/artifacts -> PR -> GitHub checks -> review gate. See docs/git-evidence-workflow.md, CONTRIBUTING.md, and docs/agent-operating-guide.md.

Responsible use

Use only synthetic, local, owned, or explicitly authorized targets. Do not use this project for credential theft, persistence, evasion, destructive payloads, or unauthorized systems. See SECURITY.md and docs/authorized-testing-paths.md.

Citation, contributing, and license

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

agentic_security_harness-1.2.0.tar.gz (655.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

agentic_security_harness-1.2.0-py3-none-any.whl (513.5 kB view details)

Uploaded Python 3

File details

Details for the file agentic_security_harness-1.2.0.tar.gz.

File metadata

  • Download URL: agentic_security_harness-1.2.0.tar.gz
  • Upload date:
  • Size: 655.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for agentic_security_harness-1.2.0.tar.gz
Algorithm Hash digest
SHA256 9438f926d277ac80855741869ab522720a9bdededb35ea8564e7bcee492f7f82
MD5 2a54bc7bee89a270a9c171fe2eb8618f
BLAKE2b-256 0b0ae9a1fb9542f6762725b93ec39bea6d8e9bfce06f5921f635fe2291c11062

See more details on using hashes here.

Provenance

The following attestation bundles were made for agentic_security_harness-1.2.0.tar.gz:

Publisher: publish-pypi.yml on krivonosoff161/agentic-security-harness

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file agentic_security_harness-1.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for agentic_security_harness-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c06d9b005b137b6ed29d5f2365e95f6048b1bbab9c2f65b1106b47de4d438646
MD5 18e00911ea59f7e153f0c9e27a6f9467
BLAKE2b-256 9acac2954f42103c2632f576af040f5b258c31b102a69717d3cf72a7cef40068

See more details on using hashes here.

Provenance

The following attestation bundles were made for agentic_security_harness-1.2.0-py3-none-any.whl:

Publisher: publish-pypi.yml on krivonosoff161/agentic-security-harness

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

1.2.0 This release

2 files

1.1.0

2 files

1.0.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page