Writing an adapter or a runner
Adapter
An adapter turns a framework's on-disk layout into a TaskContext
(envicert/adapters/base.py): file inventory, parsed config, Dockerfile,
build-context directory, tests/solution/environment locations, and honest
warnings for anything the adapter could not map.
- Study the framework's current documented format; cite it in the module
docstring (as
adapters/harbor.pydoes). - Implement
load(root) -> TaskContextand a cheapis_<framework>_taskdetector; wire detection intocore/engine.load_taskonly when the detector is unambiguous. - Never execute framework code during loading.
- Add fixtures: a minimal real task, a variant layout, and a malformed one. Do not claim support in the README until those fixtures pass.
Runner
A runner executes tasks for dynamic checks (envicert/runners/base.py):
implement info() (availability + an honest one-line isolation description —
this string lands in every report) and the run methods you support,
returning RunResult with bounded output, timeouts and cleanup.
Non-negotiables: no privileged mode, no host Docker-socket mounts, no credential passthrough by default, argument arrays instead of shell strings, resource limits, and fail-safe behaviour (unavailable ⇒ ERROR/NOT_RUN findings, never PASS).