Metadata-Version: 2.4
Name: opendsec-harbor
Version: 0.1.0
Summary: Harbor environment provider for opendsec: run each Harbor trial as an opendsec World.
Keywords: harbor,sandbox,reinforcement-learning,evals,agents
Author: Vibrant Labs
License-Expression: Apache-2.0
License-File: LICENSE
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Science/Research
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Typing :: Typed
Requires-Dist: harbor>=0.8.1
Requires-Dist: opendsec>=0.1,<0.2
Requires-Dist: pyyaml>=6.0.3
Requires-Python: >=3.12
Project-URL: Documentation, https://opendsec.vibrantlabs.com
Description-Content-Type: text/markdown

# opendsec-harbor

A [Harbor](https://github.com/harbor-framework/harbor) environment provider for [opendsec](https://opendsec.vibrantlabs.com): each Harbor trial runs as one opendsec World, and each service in the task's compose file as one Sandbox in it.

```sh
pip install opendsec-harbor
```

```sh
export OPENDSEC_URL=https://your-apiserver OPENDSEC_TOKEN=...
harbor run -p path/to/task -a oracle -e opendsec_harbor:OpenDSecEnvironment
```

The agent and the task stay the same; only the environment flag changes. The provider builds each task's images and pushes them to `OPENDSEC_REGISTRY`, which your opendsec nodes pull from, so the machine running Harbor needs `docker` and [`crane`](https://github.com/google/go-containerregistry/tree/main/cmd/crane) on `PATH` and push access to that registry.

| Option (`--ek key=value`) | Variable | Default |
|---|---|---|
| `url` | `OPENDSEC_URL` | `http://localhost:7700` |
| `token` | `OPENDSEC_TOKEN` | none |
| `registry` | `OPENDSEC_REGISTRY` | `localhost:5001` |
| `pull_registry` | `OPENDSEC_PULL_REGISTRY` | `registry`; `host.lima.internal:5001` when `registry` is the local default |
| `platform` | `OPENDSEC_PLATFORM` | this machine's architecture |
| `ttl` | | `3h` |

Tasks may use only the compose keys `image`, `build`, `command`, `environment`, `volumes`, `expose`, `networks`, `healthcheck` and `depends_on`; anything else fails the trial before it starts rather than running it wrong.

Full guide: https://opendsec.vibrantlabs.com/how-to/run-a-harbor-job/

Licensed under Apache-2.0.
