Evenfire is an intelligence layer platform for running LLM agents that take real actions, on your infrastructure
PR #314 registry egress migration helpers
These helpers prepare the registry/template migration for PR #314 runtime egress hardening.
Audit only
Seed catalog only:
node scripts/pr314/audit-registry-egress.mjs
Seed catalog plus live example-dev resources:
PATH=/usr/local/bin:/opt/homebrew/bin:/Applications/Docker.app/Contents/Resources/bin:$PATH \
node scripts/pr314/audit-registry-egress.mjs \
--live \
--context gke_your-gcp-project_us-central1-a_example-dev
The audit is read-only. It reports:
- registry MCP entries missing
egressSummary; wideCidr: trueentries that must install as explicitpublic-web;- stale web-search fixtures outside seeds;
- live
McpServerobjects that look external but have nospec.egressBindings; - live
WorkflowRecipetransport workloads that have noworkloads[].egressBindings; - legacy WRC
*-mcp-servers-egress-internetNetworkPolicies that PR #314 should prune.
If the registry DB may differ from the repo seeds, point the auditor at the live registry API too:
node scripts/pr314/audit-registry-egress.mjs \
--registry-url http://127.0.0.1:8085
--registry-url accepts either the registry root URL or an /api/v1 URL. It
paginates with GET /entries?limit=200&offset=..., matching the Registry API
maximum page size.
Prepare live registry DB metadata migration
Seed changes do not update already-published registry rows because the seed loader skips existing entries. Use the DB metadata helper after the new code is deployed and before reinstalling affected catalog entries from the live registry.
Existing installed McpServer resources are separate from registry DB rows. The
safe migration order is:
- Patch live registry DB metadata with this DB helper so future installs and upgrades translate to the intended exact-host or public-web CRD shape.
- Patch existing K8s resources with
prepare-registry-egress-migration.mjsbecause already-installedMcpServerandWorkflowRecipeobjects do not automatically reread registry metadata. - Run
audit-registry-egress.mjs --registry-url ... --live ...and verify no stale registry rows, missing live bindings, or legacy broad policies remain.
Dry-run:
node scripts/pr314/prepare-registry-db-egress-migration.mjs \
--registry-url http://127.0.0.1:8085 \
--snapshot-file /tmp/registry-egress-before.json \
--sql-file /tmp/registry-egress.sql
Apply requires explicit approval and a database URL:
node scripts/pr314/prepare-registry-db-egress-migration.mjs \
--registry-url http://127.0.0.1:8085 \
--snapshot-file /tmp/registry-egress-before.json \
--sql-file /tmp/registry-egress.sql \
--database-url "$REGISTRY_DATABASE_URL" \
--apply
The script paginates the registry catalog with limit=200&offset=... before
building patches. It is allowlist-based. The first allowlisted entry is
mcp-web-research, which keeps wideCidr:true as the compatibility trigger for
PR #314 public-web until the immediate cleanup PR replaces authoring metadata
with explicit egressClass.
wideCidr sunset: after this migration PR is deployed and the live registry DB
audit shows no unexpected wideCidr:true rows, run the immediate cleanup PR
described in the registry egress migration plan. That follow-up removes
wideCidr from seed authoring, adds explicit
egressClass: "exact-host" | "public-web" registry metadata, and keeps
wideCidr:true only as temporary read compatibility for already-published rows.
Prepare migration patches
Dry-run live patch plan:
PATH=/usr/local/bin:/opt/homebrew/bin:/Applications/Docker.app/Contents/Resources/bin:$PATH \
node scripts/pr314/prepare-registry-egress-migration.mjs \
--live \
--context gke_your-gcp-project_us-central1-a_example-dev
Apply exact-host patches only:
PATH=/usr/local/bin:/opt/homebrew/bin:/Applications/Docker.app/Contents/Resources/bin:$PATH \
node scripts/pr314/prepare-registry-egress-migration.mjs \
--live \
--context gke_your-gcp-project_us-central1-a_example-dev \
--apply
Apply explicit public-web patches too:
PATH=/usr/local/bin:/opt/homebrew/bin:/Applications/Docker.app/Contents/Resources/bin:$PATH \
node scripts/pr314/prepare-registry-egress-migration.mjs \
--live \
--context gke_your-gcp-project_us-central1-a_example-dev \
--allow-public-web \
--apply
--allow-public-web is intentionally separate. It should be used only after operator approval because it grants public TCP 80/443 egress with private/internal/special ranges blocked by NetworkPolicy.
Apply mode should be run after the PR #314 CRDs are installed when any patch uses egressClass: public-web. Exact-host patches can be reviewed earlier, but the final migration should be validated against the post-CRD schema.
Current built-in patch rules
mcp-etherscan-> exact hostapi.etherscan.io:443.evm-safe-scanner-> explicitegressClass: public-web, because it supports arbitrary EVM explorer endpoints and cannot be made complete with a static exact-host list without operator-provided explorer configuration.mcp-web-researchseed/DB metadata ->wideCidr:truewith public web ports80,443; Control API installs this as explicitegressClass: public-web.- WorkflowRecipe
web-searchtransport workloads -> DuckDuckGo exact-host egress plus default engine environment:duckduckgo.com:443html.duckduckgo.com:443lite.duckduckgo.com:443DEFAULT_SEARCH_ENGINE=duckduckgoALLOWED_SEARCH_ENGINES=duckduckgo
The helper does not rewrite step allowedTools automatically. If an existing workflow still references non-search tools such as fetch/page tools, it reports the workflow under manualReview.