Whitepaper · Secure · from code

Helix — traffic DNA firewall

Repo AgenticOp-io/chrysalis-security. Packages: helix-proxy, dna-core, helix-cli, cwl-bridge, helix-agent, helix-bridge. Schema: schemas/app-dna-v1.json ($id agenticop.io). Protect does not require Convert or CWL. Optional bridge matches chrysalis-cwl RFC-0022.

Docs · Product · Traffic decides · CWL

Thesis

Classic stack asks “is this packet weird?” Helix asks “is this still the certified app?” Canon: trust nothing until certified; DNA from traffic, not hope; change guilty until promoted. Buyer sentence: “We don’t allow app shape we didn’t certify.”

Real traffic → learn → draft DNA → promote → certified DNA
                                              ↓
                         scoreRequest / scoreResponse → match allow · mismatch hole

Before: NGFW + WAF + hope
After:  NGFW + WAF + Helix DNA certificate on the app hop

Implementation packages

PackageRole
helix-proxycreateHelixProxy — learn/shadow/enforce; default port 4080; panel at /__helix/
dna-coreLearn, score, promote, sign, path templates, fingerprints
helix-clihelix learn|promote|seed-cwl|cutover|…
cwl-bridgeOptional seed/compare against CWL surface
helix-agentMode A soft host intercept
helix-bridgeMode B / L2 transparent placement

Env: MODE, DNA, OBSERVE, SHADOW_LOG, SIEM_LOG, HELIX_DNA_KEY, HELIX_DNA_REQUIRE, HELIX_MAX_BODY_BYTES, PLACEMENT=proxy|bridge|agent.

Artifact: app-dna-v1

Required root: schema, app_id, created_at, mode (draft|certified), routes. additionalProperties: false.

Route fieldConstraint
method, path_template, hostRequired — identity with content_class
content_classjson | html | other
status_classesinteger[]
response_key_fingerprintstring \| null — sorted JSON key paths depth ≤ 2
request_key_fingerprintstring \| null
query_key_fingerprintnames only; "" = none learned; null = do not enforce (legacy)
holes[]{ code, reason, observed_at? }
signatureoptional hmac-sha256 | ed25519

Fingerprints (dna-core)

FunctionBehavior
pathTemplateStrip query; UUID/hex/digits → /:id; static assets → /**/*.js etc.
contentClassFrom Content-Type → json/html/other
responseKeyFingerprintSorted key paths; arrays/scalars as leaves; maxDepth 2
queryKeyFingerprintSorted unique query names (values ignored)
routeKey`${host} ${METHOD} ${path_template}`
scoreRequest / scoreResponseRuntime checks before/after upstream

HTML body hashes deliberately not in DNA v0 (CMS churn → false positives).

Enforce hole codes

CodeWhen
HX-NO-DNANo certified DNA (fail-closed)
HX-ROUTE-UNKNOWNRoute not in DNA
HX-QUERY-SCHEMA-DRIFTQuery names ≠ learned
HX-REQUEST-SCHEMA-DRIFTRequest JSON keys ≠ learned
HX-STATUS-DRIFTStatus class not learned
HX-CONTENT-CLASS-DRIFTContent class mismatch
HX-SCHEMA-DRIFTResponse JSON keys fail-closed
HX-DNA-UNSIGNED / HX-DNA-BAD-SIGSignature policy failures
HX-BODY-TOO-LARGEOver HELIX_MAX_BODY_BYTES → 413

Enforce: hole → 403 + x-helix-hole. Shadow: allow + alert / x-helix-shadow-hole.

Modes

learn → promote → shadow → enforce → reload
ModeTrafficSecurity
learnPassAppend observations NDJSON
shadowPassScore; alert only
enforcePass iff DNA matchBlock holes (403)

Promote without downtime: write DNA → POST /__helix/reload (or SIGHUP/SIGUSR2). Ops: /__helix/, /__helix/healthz, /__helix/status, /__helix/api/snapshot.

Placement / NGFW

ModeRoleCode
A — host interceptProduct target; NGFW NAT unchangedhelix-agent
B — L2 transparentSegment-widehelix-bridge
C — reverse proxyLab / simple hophelix-proxy day-one path

D1: no NGFW TLS dependency. D4: augment without NAT homework. No FortiOS blade / Snort inspector SDK — SIEM via SIEM_LOG NDJSON.

Signed DNA

signDna / verifyDna: HMAC-SHA256 (default) or Ed25519. HELIX_DNA_REQUIRE=1 refuses unsigned. Smoke: SIGN_SMOKE_OK. Promote must stripBridgeEnvelope so CWL annotations never enter certified routeKey.

CLI surface

helix learn      --in observations.ndjson --out dna.json
helix promote    --in draft.json --out certified.json [--alg] [--key]
helix verify     --in certified.json [--require]
helix seed-cwl   --in routes.cwl --out draft.json [--deploy-profile] [--strip-bridge]
helix cutover    --cwl routes.cwl --dna certified.json [--deploy-profile]
helix ready      --in dna.json --target shadow|enforce
helix diff       --a a.json --b b.json

Optional CWL bridge

Protect stays DNA-only (D5). Cutover default: CWL surface ⊆ certified DNA. Consumes @agenticop-io/cwl/dna-seed (SoR in CWL pillar). Tokens: CWL_BRIDGE_SMOKE_OK, CUTOVER_SMOKE_OK, CUTOVER_MULTIHOST_OK, LIVE_MATCH_OK. CWL side: smoke:ut-spineUT_SPINE_OK.

Non-goals and residual

  • Replace WAF / UEBA / SQLi signature packs.
  • Helix DSL instead of traffic DNA; forking CWL grammar into Helix.
  • Requiring Convert monorepo to enforce.
  • Inventing soak traffic — lab preflight ≠ customer soak.

See Traffic decides.