fix(#6452): propagate org-level allowed_remote_resources to URL resolution - #6454
fix(#6452): propagate org-level allowed_remote_resources to URL resolution#6454fullsend-ai-coder[bot] wants to merge 1 commit into
Conversation
…ution The org-level allowed_remote_resources from config.yaml was only used during base: composition (via ComposeOpts.OrgAllowlist) but not during URL resolution of policy:, agent:, skills:, plugins:, profiles:, and providers: fields. This caused confusing behavior where base: URLs resolved successfully but policy: URLs with the same prefix failed. Add OrgAllowlist field to ResolveOpts and check it as a fallback in resolveFileURL and resolveSkillDirURL when the harness-level AllowedRemoteResources check fails. Pass the org allowlist from both run.go and lock.go callers. Also update resolveFromLock to accept and check the org allowlist for lock-file validation. Closes #6452
|
🤖 Finished Review · ✅ Success · Started 3:30 PM UTC · Completed 3:47 PM UTC Commit: |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
ReviewFindingsMedium
Low
|
Summary
Propagate the org-level
allowed_remote_resourcesfromconfig.yamlto all URL resolution paths, not justbase:composition. Previously,policy:,agent:,skills:,plugins:,profiles:, andproviders:URLs were only checked against the harness-levelAllowedRemoteResources, causing confusing failures when users expected org-level trust to apply uniformly.Related Issue
Fixes #6452
Changes
OrgAllowlist []stringfield toresolve.ResolveOptsresolveFileURLandresolveSkillDirURLto fall back to the org allowlist when the harness-level check failsorgAllowlistinrun.goandlock.gocallers when callingresolve.ResolveHarnessresolveFromLockto accept and check the org allowlist during lock-file validationTesting
TestResolveHarness_*tests pass (no regressions)TestResolveFromLock_*tests pass (no regressions)go vetpassesgo build ./...passesCloses #6452
Post-script verification
agent/6452-org-allowlist-policy-resolve)18792930cd964497a98a4ba99d4543be13ece8a3..HEAD)