You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat(sdk): Run injectors and collectors without the platform (dev mode, chain, record/replay) #383
Today an injector or a collector only runs against a live platform: registration, RabbitMQ queue, heartbeat and API token.
To test an injector, a developer has to build a scenario and launch an inject from the UI.
To test a collector, they have to wait for real pending expectations.
There is no way to check that a connector works without the platform, to feed an injector's output into a collector, or to replay a run offline in CI.
Current workaround
Run a full platform locally and drive it from the UI.
Mock the third-party API by hand in each connector's tests, or skip testing it.
Proposed solution
Add a dev mode to the shared SDK (xtm-oaev-sdk).
It replaces only the platform: the real tool and the real security product API still run.
--dev and --out. The connector reads the platform's own payloads and writes the calls it would have sent, key for key, as one redacted JSON list. Nothing reaches openaev_url or RabbitMQ.
Inject content is validated against its contract the same way the platform health-check does it.
Calls that need a live platform raise NeedsPlatformError.
Signatures are sent under their signature types. Legacy names are still read.
--record / --replay. Every outside call (HTTP and subprocess.run) is recorded with its answer to a readable JSON tape, with secrets masked. The tape is then replayed offline. A call that is not on the tape fails closed.
A user guide, docs/how_to_dev_mode.md.
Without --dev, nothing changes, except the signature naming.
Activity