๐Ÿฉน

Auto-Remediation Architecture

Overview

Auto-Remediation (T3.7) turns a finding from any scanner tier into an Infrastructure-as-Code patch and routes it through the delivery channel you pick. One of four modes applies per tenant, set from Remediation Settings:

  • Dry-run โ€” patches are generated and audit-logged, never auto-applied; an operator marks them applied or dismisses them. (Default; safe.)
  • Pull Request โ€” each new patch opens a PR (GitHub) or MR (GitLab) in the repository you nominate. Your reviewers merge.
  • Approval queue โ€” patches land in a pending-approval inbox; an admin clicks Approve to promote.
  • Auto-apply โ€” non-review-required patches apply automatically (kubectl / terraform). Templates flagged as review-required still route through the approval queue.

The same pipeline runs in three deployment shapes โ€” pick whichever matches your trust model.


The three tiers

Tier 1 โ€” SaaS-side generator (default; works out of the box)

Patches are rendered server-side from new findings and your tenant's settings, then presented for review in the dashboard. Strict-ZK posture: SaaS has no plaintext access to the encrypted finding payload, so patch bodies carry REPLACE_ME placeholders instead of real resource names โ€” your operator substitutes them during review.

๐Ÿ›ฐ๏ธCUSTOMER NODES
Tentacle
per-node agent
  • โ€ขDetects IOCs / processes / syscalls
  • โ€ขAES-GCM encrypts sensitive fields
  • โ€ขShips ciphertext only
๐Ÿ“จECHELONGRAPH SAAS
Ingester
gRPC + NATS JetStream
๐Ÿ—„๏ธPOSTGRES
Findings store
encrypted payload
โš™๏ธECHELONGRAPH SAAS
Generator
SaaS-side worker
  • โ€ขReads the tenant's remediation settings
  • โ€ขPicks template from 11-rule catalogue
  • โ€ขRenders body with REPLACE_ME placeholders
๐ŸฉนPOSTGRES
Patch store
SaaS-generated
๐Ÿ–ฅ๏ธDASHBOARD
Remediation Center UI
operator reviews + marks-applied / dismisses

Best for: every customer's first week. No infrastructure changes needed.

Tier 2 โ€” Pull Request connector (your repo, your token)

Same generator, but in Pull Request mode the patch opens a PR/MR in *your* repository as soon as it is rendered. The access token is held in a managed secret store rather than our application database, so it survives a database compromise, and it never round-trips back through the dashboard after the initial paste.

โš™๏ธECHELONGRAPH SAAS
Generator
mode = pr โ†’ fetch settings
๐Ÿ—„๏ธPOSTGRES
Remediation settings
per-tenant configuration
  • โ€ขmode
  • โ€ขgithub_default_repo
  • โ€ขgithub_api_base โ† self-hosted GHE
  • โ€ขgithub_token_secret (resource name)
๐Ÿ”GCP
Secret Manager
managed secret store
  • โ€ขToken held here, never in our database
  • โ€ขRotated in place
  • โ€ขOnly a reference is stored
๐Ÿ“ฆSHARED PACKAGE
GitHubClient / GitLabClient
shared/pkg/remediation
  • โ€ขTLS 1.2 floor + retry/backoff
  • โ€ขBody cap 256 KiB + panic recovery
  • โ€ขAPIBase honours self-hosted hostname
๐ŸŒCUSTOMER GIT
YOUR GitHub / GitLab
github.com ยท github.<corp>.com/api/v3 ยท gitlab.<corp>.com/api/v4

Best for: teams that already gate infrastructure changes through PR review. Patches arrive with the rollback snippet pre-populated in the description.

Tier 3 โ€” Agent-side full path (Master agent applies in your cluster)

The Master agent runs the remediation engine locally: it scans Kubernetes for misconfigurations (e.g. a missing default-deny NetworkPolicy), renders the patch, optionally applies it via kubectl / terraform, and audit-reports the outcome. SaaS sees only the audit row โ€” no patch bodies, no resource names โ€” unless your operator chose to apply, in which case the log reflects what actually ran. Mode and auto-apply are set at install.

Customer K8s Cluster
๐Ÿง MASTER POD
K8s Scanner
Periodic List of namespaces + NetworkPolicies
โš™๏ธMASTER POD
Engine.Remediate
renders patch with PLAINTEXT context
๐Ÿ› ๏ธMASTER POD
Applier (kubectl / terraform)
executes inside customer network
๐Ÿ“กMASTER POD
GRPCAuditWriter
audit outcome over gRPC
EchelonGraph SaaS
๐Ÿ“จECHELONGRAPH SAAS
Ingester
validates + publishes to NATS
โš™๏ธECHELONGRAPH SAAS
Processor consumer
records the patch
๐ŸฉนPOSTGRES
Patch store
agent-applied, with the delivery route recorded
๐Ÿ–ฅ๏ธDASHBOARD
Remediation Center UI
green AGENT badge

Best for: regulated environments where exfiltration is unacceptable, or air-gapped clusters where the Master must apply patches itself. Agent-produced rows carry a green AGENT badge.


Self-hosted Git Enterprise

The connector handles GitHub Enterprise Server and GitLab self-hosted natively โ€” each exposes the same REST API as its public counterpart, at a hostname you control. Bitbucket Data Center is not yet supported (open a feature request).

PlatformPublic defaultSelf-hosted format
GitHub.comhttps://api.github.comโ€”
GitHub Enterprise Serverโ€”https:///api/v3
GitLab.comhttps://gitlab.com/api/v4โ€”
GitLab self-hostedโ€”https:///api/v4

An optional API base URL points at your instance; blank means public GitHub.com / GitLab.com. The token must come from that same instance. Required scopes: GitHub repo; GitLab api.

Network reachability: Tier 2 calls these APIs from our Cloud Run egress. If your Git server isn't publicly reachable, either allow-list our egress IPs (provided under NDA) or use Tier 3, where the Master pod reaches it from inside your network.


Where secrets live

ItemStoragePlaintext exposed to SaaS?
GitHub / GitLab tokenManaged secret store, outside the application databaseOnly in transit at save time (HTTPS), never at rest
Patch body (Tier 1 SaaS)Our platformYes (REPLACE_ME placeholders only โ€” no resource names)
Patch body (Tier 3 Agent)Our platformYes โ€” your operator chose to delegate apply, so the row reflects what ran
Customer infrastructure codeYOUR GitHub / GitLabNo โ€” we open a PR; your reviewer merges

Choosing a mode (decision tree)

Are you on day 1?
yesโ†“
dry-run
just observe + audit-log
noโ†“
Have you tuned out the false-positive templates?
noโ†“
approval queue
admin gates each apply
yesโ†“
Where do infra changes normally live?
in your repoโ†“
Pull Request
reviewers merge in GitHub / GitLab
in the clusterโ†“
Tier 3 agent
Master applies in your cluster
approval
admin gate
auto
zero-touch

Operational notes

  • Duplicate collapse โ€” repeat detections collapse onto one row ("matched 12ร— ยท last 2m ago").
  • Rotation โ€” a new token supersedes the old one immediately; earlier versions stay available for audit and can be disabled.
  • Rollback โ€” every patch stores a reverse snippet; applied rows get a Rollback button, and on Tier 1 you run the snippet yourself.
  • Dismiss โ€” false positives are set aside with a reason, so re-detections don't re-noise the list.
  • Failures surface on the row with the upstream error (a token missing repo scope, a branch that already exists).

Next step

A call covers which mode fits your change process, which tier matches your trust model, and what Git and cluster access would look like. Talk to us about deployment