# Badger

Source: https://www.testifysec.com/docs/badger/

Badger is a coding agent built for enclaves, from upstream OpenCode with one compiled policy, one approved model route and signed configuration.

Badger is TestifySec's coding agent for networks that keep their code, tickets and models inside the boundary: classified enclaves, air-gapped labs, and regulated programs. It is a maintained fork of [OpenCode](https://github.com/anomalyco/opencode) (MIT) with a small patch series under `testifysec/`.

 

A managed Badger build differs from upstream in three ways:

 

- **One compiled policy.** The managed build compiles its configuration in. No environment variable, flag, user setting or repository file can turn the policy off or widen it.
 - **One model route.** Every model request leaves through a model gateway that the administrator runs. The gateway holds the provider credential; the workstation holds none.
 - **Signed configuration.** What a workstation may run is described by a profile that an administrator signs. The gateway and the session broker refuse a profile that is unsigned, expired, assigned to another deployment, or below the minimum sequence the build trusts.

 

Badger also labels what it reads. Each connector has one classification, set by the administrator, and every result it returns carries that marking. The session will refuse to send data to a destination accredited below what it has read. The first half is on `main`; the second is specified and not built. The [classification page](https://www.testifysec.com/docs/badger/concepts/classification) says exactly which part is which.

 

Badger is a development preview. There is no published binary release and no signed release artifact yet. Several features described here are in open pull requests; each page marks them as **In development** and names the pull request. Publishing the source does not establish runtime isolation, a compliance qualification or an authorization.

 

## What do you need to do?

 

### Run Badger as a developer

 

Start a session against your administrator's gateway and work in a repository.

 

1. [Build the managed binary and start a session](https://www.testifysec.com/docs/badger/how-to/run-badger)
 2. [Understand what the managed build allows](https://www.testifysec.com/docs/badger/concepts/architecture)

 

### Administer Badger

 

Decide what every workstation may run, with what model, against which services.

 

1. [Configure the model gateway](https://www.testifysec.com/docs/badger/how-to/configure-gateway)
 2. [Install the management portal offline](https://www.testifysec.com/docs/badger/how-to/install-portal)
 3. [Author, approve and publish a profile](https://www.testifysec.com/docs/badger/how-to/publish-profile)
 4. [Enroll a device](https://www.testifysec.com/docs/badger/how-to/enroll-device)

 

### Connect Jira, Confluence or GitLab

 

Let the agent read your enclave's services as the signed-in developer, with a marking on every result.

 

1. [Understand connectors](https://www.testifysec.com/docs/badger/concepts/connectors)
 2. [Understand classification markings](https://www.testifysec.com/docs/badger/concepts/classification)
 3. [Configure a connector with a marking](https://www.testifysec.com/docs/badger/how-to/configure-connector)

 

### Assess the security architecture

 

Read the trust boundaries, what is enforced today, and what is still open.

 

1. [Read the architecture and trust boundaries](https://www.testifysec.com/docs/badger/concepts/architecture)
 2. [Read the no-write-down guarantee and its status](https://www.testifysec.com/docs/badger/concepts/classification)
 3. [Run the conformance suites yourself](https://www.testifysec.com/docs/badger/how-to/run-conformance)
 4. [Check the NIST SP 800-53 control alignment](https://www.testifysec.com/docs/badger/security/control-alignment)
 5. [See who is responsible for what, and what IL6 means here](https://www.testifysec.com/docs/badger/security/shared-responsibility)

 

## How the pieces fit

 

**Diagram: Badger architecture**

 

| Piece | What it does | Status |
| --- | --- | --- |
| Managed Badger build | The OpenCode agent and terminal UI with the policy compiled in | Available on `main` |
| Model gateway | Holds the provider credential, checks the signed profile and writes an audit record before every model request | Available on `main` |
| Signed profile admission | Verifies a profile's signature, assignment, validity window and sequence | Available on `main` (prototype trust input) |
| Connectors | Jira, Confluence and GitLab tools, each locked to one service | Available on `main`; not yet loadable by a managed session |
| Classification markings | One administrator-set marking per connector, on every result | Available on `main` |
| Management portal | Offline service where administrators manage users and sign and assign profiles | Available on `main` (devices, activations and two-person signing not built) |

Reference generated from the product documentation. Match commands and support details to your installed release.
