feat(engine): add operator-declared network-egress allowlist to AmsPolicySpec#8204
Conversation
…licySpec Extends .loopover-ams.yml with a networkAllowlist field (ecosystems + extraHosts) so an operator can declare additional network-egress allowances for their own AMS attempts. Deliberately operator-local only, matching this file's existing scope -- deriving allowlist contents from the TARGET repo's own manifest would let a malicious repo smuggle an attacker-controlled host into its own attempt's allowlist, against the trust boundary this config surface already enforces for every other field. Config surface only. No OS-level enforcement exists yet for AMS sandboxed execution -- that mechanism is still an open decision (documented on #7857), deliberately deferred separately from this trust-boundary-safe declaration surface so it doesn't need to be reopened once enforcement is designed. Part of #7857.
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
loopover-ui | 3066d3a | Commit Preview URL Branch Preview URL |
Jul 23 2026, 12:03 PM |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8204 +/- ##
==========================================
- Coverage 92.09% 92.08% -0.01%
==========================================
Files 773 773
Lines 78149 78182 +33
Branches 23618 23626 +8
==========================================
+ Hits 71968 71997 +29
Misses 5062 5062
- Partials 1119 1123 +4
Flags with carried forward coverage won't be shown. Click here to find out more.
|
|
Warning ⏸️ LoopOver review result - manual review recommendedReview updated: 2026-07-23 12:19:03 UTC
Review summary Nits — 5 non-blocking
Concerns raised — review before merging
📋 Copy for AI agents — paste into your coding agentDecision drivers
Context & advisory signals — never blocks the verdict
Review context
Contributor next steps
Signal definitions
🧪 Chat with LoopOverAsk LoopOver a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.
Full command reference: https://loopover.ai/docs/loopover-commands 🧪 Experimental — new and may change. 🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed 💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by LoopOver, a quiet PR intelligence layer for OSS maintainers.
|
Summary
Config-surface half of #7857 (network-egress enforcement for AMS sandboxed execution). Extends
.loopover-ams.yml/AmsPolicySpecwith anetworkAllowlistfield (ecosystems: string[],extraHosts: string[]) so an operator can declare additional network-egress allowances for their own AMS attempts, on top of the always-on OS-registry/git-remote defaults #7648 ratified.Deliberately operator-local only, matching this file's existing scope (never fetched from a target repo). This closes a real trust-boundary gap found while investigating #7857: deriving allowlist contents from the target repo's own manifest would let a malicious repo fabricate a manifest entry to smuggle an attacker-controlled host into its own attempt's allowlist — exactly the class of "repo loosens its own constraints" hole
ams-policy-spec.ts's own header already guards every other field against.Config surface only — no OS-level enforcement yet. No mechanism exists today to actually enforce network egress for AMS sandboxed execution (the coding-agent subprocess shares a network namespace with the whole miner container, no per-attempt isolation). That mechanism is a separate, still-open architecture decision, deliberately deferred and documented on #7857 rather than folded into this PR — landing the trust-boundary-safe declaration surface now means that question doesn't need to be reopened once enforcement is designed later.
Test plan
npm run typecheckclean (repo-wide)test/unit/ams-policy-spec-parser.test.ts— 100% statement/branch/function/line coverage onams-policy-spec.ts(scoped coverage run)DEFAULT_AMS_POLICY_SPECsingleton, including the specific pass-through path wherenetworkAllowlistitself is unset but a sibling field is configurednpm run build --workspace @loopover/enginecleannpm run test --workspace @loopover/engine— 660/660 passing (includes a mirrored smoke test for the new field)npm run engine-parity:drift-checkclean