feat(resolve): portable provider and profile definitions via URL references - #3062
Conversation
|
🤖 Review · |
653f391 to
dcf40a7
Compare
PR Summary by QodoPortable provider/profile definitions via URL references (sha256-pinned)
AI Description
Diagram
High-Level Assessment
Files changed (13)
|
|
🤖 Finished Review · ✅ Success · Started 10:41 AM UTC · Completed 10:56 AM UTC |
Site previewPreview: https://98ff1f10-site.fullsend-ai.workers.dev Commit: |
ReviewThe branch was rebased since the prior review (SHA e9f8f39); commit 031dedd ("fix: address review findings for portable providers (round 3)") is a rebase with the ADR renumbered from 0069 to 0070 (accommodating a new ADR merged to main). All prior security fixes remain in place and all cross-references are correctly updated to 0070. The security posture is comprehensive and unchanged from the prior review: One prior high finding and one prior medium finding persist unchanged. Both require resolution before merge. FindingsHigh
Medium
Low
Previous runReviewThe branch was rebased since the prior review (SHA c846e51); commit e9f8f39 ("fix: address review findings for portable providers (round 3)") addresses the remaining ADR renumbering and content alignment finding from the prior iteration:
The prior [behavior-change] low finding is also resolved: the "Provider declared but no definition found" warning was re-added in All five prior security findings (missing-input-validation, env-var-exfiltration-via-config, incomplete-blocklist, missing-context-timeout, doc-inconsistency) remain fixed. The One new high finding was identified regarding the PR title. One prior medium finding persists unchanged. The medium finding and the PR title finding require resolution before merge. FindingsHigh
Medium
Low
Previous runReviewThe branch was rebased since the prior review (SHA c846e51); commit e9f8f39 ("fix: address review findings for portable providers (round 3)") addresses the remaining ADR renumbering and content alignment finding from the prior iteration:
The prior [behavior-change] low finding is also resolved: the "Provider declared but no definition found" warning was re-added in All five prior security findings (missing-input-validation, env-var-exfiltration-via-config, incomplete-blocklist, missing-context-timeout, doc-inconsistency) remain fixed. The One new high finding was identified regarding the PR title. One prior medium finding persists unchanged. The medium finding and the PR title finding require resolution before merge. FindingsHigh
Medium
Low
Previous run (2)ReviewCommit c846e51 since the prior review (SHA ec1b1ed) addresses five prior findings:
Additionally:
The The security review confirms all trust-boundary controls are comprehensive: One prior medium finding persists unchanged. The remaining low findings do not block the feature. FindingsMedium
Low
Previous run (3)ReviewCommit ec1b1ed since the prior review (SHA bc91a1e) addresses four prior findings:
Additionally:
The One prior medium finding persists unchanged. The remaining low findings do not block the feature. FindingsMedium
Low
Previous run (4)ReviewCommit ec1b1ed since the prior review (SHA bc91a1e) addresses four prior findings:
Additionally:
The One prior medium finding persists unchanged. The remaining low findings do not block the feature. FindingsMedium
Low
Previous run (5)ReviewThe branch was rebased since the prior review (SHA bb0d3eb); commit bc91a1e addresses four prior findings:
The The ADR was renumbered from 0068 to 0069 with all cross-references updated (ADRs 0024, 0038, architecture.md, customizing-agents.md). No stale references to the old portable-provider ADR 0068 remain — the existing references to "ADR 0068" in the codebase are for One prior medium finding persists unchanged. Neither it nor the remaining low findings block the feature. FindingsMedium
Low
Previous run (6)ReviewThe branch was rebased since the prior review (SHA 1dc0e89); commit bb0d3eb is a rebase with no production code changes relative to the prior review. All prior findings persist unchanged. The The One prior medium finding persists unchanged. One medium finding regarding FindingsMedium
Low
Previous run (7)ReviewThe branch was rebased since the prior review (SHA 1dc0e89); commit bb0d3eb is a rebase with no production code changes relative to the prior review. All prior findings persist unchanged. The The One prior medium finding persists unchanged. One medium finding regarding FindingsMedium
Low
Previous run (8)ReviewThe branch was rebased since the prior review (SHA 9c364d9); commit 1dc0e89 addresses the prior The One prior medium finding persists unchanged. One new medium finding was identified regarding FindingsMedium
Low
Previous run (9)ReviewThe branch was rebased since the prior review (SHA 9c364d9); commit 1dc0e89 addresses the prior The One prior medium finding persists unchanged. One new medium finding was identified regarding FindingsMedium
Low
|
|
Keeping warn-only as designed for Regarding All other findings addressed in 5bcc974:
|
dcf40a7 to
5bcc974
Compare
|
🤖 Finished Review · ❌ Failure · Started 3:45 PM UTC · Completed 4:00 PM UTC |
waynesun09
left a comment
There was a problem hiding this comment.
Review Squad Report — #3062
Agents dispatched: 5 (claude-coder ×2, claude-researcher, gemini-code-review, cursor-code-review)
Models used: Claude, Gemini, Codex
Total findings: 14 (after dedup + verification) — 6 posted inline (MEDIUM+)
False positives removed: 5
Summary
Solid, well-structured PR that cleanly extends the existing resolution system. The strongest finding is the incomplete reserved credential key blocklist (missing LD_AUDIT and TLS trust chain variables), which 4/5 agents flagged independently. The h.Profiles not being cleared after resolution is a real asymmetry with h.Providers that should be fixed for consistency. Remaining findings are hardening opportunities around error message clarity and warning-vs-error enforcement for literal credentials.
Assisted-by: Claude (review), Gemini (review), Codex (review)
|
Addressed findings from this review in 401384a:
Remaining low findings are either already addressed (ImportProfile duplicate check, ADR cross-refs) or intentional per ADR 0066 (WarnLiteralCredentials warn-only, checkProviderProfileIntegrity warn for no-profiles case, lock deps[len-1] pattern). |
|
🤖 Review · |
401384a to
5a56f20
Compare
|
🤖 Finished Review · ✅ Success · Started 10:06 AM UTC · Completed 10:20 AM UTC |
|
🤖 Review · |
8916f1c to
1dc0e89
Compare
|
🤖 Finished Review · ✅ Success · Started 9:34 PM UTC · Completed 9:46 PM UTC |
|
🤖 Review · |
|
🤖 Finished Review · ✅ Success · Started 9:56 PM UTC · Completed 10:09 PM UTC |
|
🤖 Finished Review · ✅ Success · Started 10:20 PM UTC · Completed 10:32 PM UTC |
|
🤖 Review · |
|
🤖 Finished Review · ✅ Success · Started 10:58 PM UTC · Completed 11:08 PM UTC |
|
🤖 Review · |
|
🤖 Finished Review · ✅ Success · Started 11:20 PM UTC · Completed 11:31 PM UTC |
|
🤖 Finished Review · ✅ Success · Started 11:33 PM UTC · Completed 11:43 PM UTC |
waynesun09
left a comment
There was a problem hiding this comment.
Reviewed at HEAD e9f8f39d. All 7 findings from my last review-squad pass (3 HIGH, 4 MEDIUM) are fixed and verified via the reply threads — unvalidated profile id now goes through validIdentifier, URL-resolved provider Name/Type get the same validation as local ones, the new orchestration block now has an integration test (TestRunAgent_ProviderProfileOrchestration) exercising the real CheckGateway → integrity check → EnableProvidersV2 → ImportProfile → EnsureProvider path, and the lock/compose test-coverage gaps are filled. fullsend-ai-review[bot]'s subsequent rounds independently confirmed the same fixes plus closed additional gaps (config-value env exfiltration, blocklist completeness, context timeouts).
All CI checks are green (build, test, e2e, functional-tests, commit-lint, DCO).
One open item: the bot's CHANGES_REQUESTED review asks for a ! breaking-change marker on the PR title, since ImportProfiles now requires a profile YAML's id field instead of falling back to the filename. I agree with the author's rebuttal — openshell itself already hard-requires id (ProfileError::MissingId), so a profile lacking it was never functional; this only moves the failure earlier with a clearer message. Treating this as a non-blocking labeling/process disagreement rather than a functional or security issue.
No other major issues found. Approving.
Add Profiles []string field to Harness struct for URL-referenced openshell profile definitions. Extend ValidateResourceTypes to require integrity hashes on profile and provider URLs. Local provider names pass through unchanged. Signed-off-by: Marta Anon <manon@redhat.com>
Add profiles to mergeBaseIntoChild using the same concatenation pattern as skills and providers (base + child). Signed-off-by: Marta Anon <manon@redhat.com>
Add profile and provider URL resolution to ResolveHarness.
Profiles are fetched, cached, and validated for a non-empty id.
Provider URLs are fetched, cached, parsed as ProviderDef, and
removed from h.Providers (leaving only local names). Credential
values that don't look like ${VAR} references produce a warning.
Changes:
- Add ResolveResult struct containing Deps, Profiles, Providers
- Add ResolvedProfile and ResolvedProvider types
- Change ResolveHarness return type from ([]Dependency, error) to (ResolveResult, error)
- Add profile resolution loop that validates id field
- Add provider resolution loop that validates name/type and checks credentials
- Update all callers in internal/cli/run.go and internal/cli/lock.go
- Update all tests to use new return type
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Marta Anon <manon@redhat.com>
Add ImportProfile function that imports an openshell provider profile from a YAML file path. Treats 'already exists' as success for idempotent imports. Signed-off-by: Marta Anon <manon@redhat.com>
Import URL-resolved profiles to the gateway before provider creation. Merge URL-resolved providers with local definitions (local wins on name collision). Validate referential integrity: every provider type must match a declared profile id. Signed-off-by: Marta Anon <manon@redhat.com>
Extends ADR 0038 (URL harness access) and ADR 0065 (provider composition) with URL-resolvable profiles and providers. Adds profiles field, extends providers to accept URLs, defines referential integrity validation and base merge semantics. Signed-off-by: Marta Anon <manon@redhat.com>
- Rename profiles → openshell-profiles (YAML field, error messages, tests, ADR 0066) to disambiguate from overloaded "profile" term - Extend reservedCredentialKeys with IFS, CDPATH, DYLD_INSERT_LIBRARIES, JAVA_TOOL_OPTIONS, RUBYOPT, PERL5OPT - Add TestResolveHarness_ProviderURLMissingType for untested validation - Fix ImportProfile duplicate check: "profile already exists" instead of overly broad "duplicate" substring - Add ADR cross-references from 0024 and 0038 to 0066 - Clarify "policy" as "openshell policy" in ADR 0066 - Document openshell-profiles and URL-based providers in user guide - Add ImportProfile step to sandbox lifecycle in cli-internals.md Signed-off-by: Marta Anon <marta@fullsend.ai> Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Marta Anon <manon@redhat.com>
- Pass URL-resolved provider names to CreateWithRetry so sandboxes can actually use them (critical bug fix) - Extend reservedCredentialKeys with LD_AUDIT, TLS trust chain vars, HOSTALIASES, PYTHONSTARTUP, GIT_CONFIG_GLOBAL, GIT_EXEC_PATH - Clear h.Profiles after resolution for consistency with h.Providers - Report all provider-profile integrity mismatches (not just first) with improved error message for gateway-resident profiles - Lock resolution now validates URLs against allowed_remote_resources Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Marta Anon <manon@redhat.com>
Cover three gaps found during test coverage review: - dedupResolvedProviders: empty, single, no-dups, last-wins (mirrors dedupResolvedProfiles) - ImportProfile: success, idempotent "already exists", other-error propagation - ParseProfileID: valid, missing id, invalid YAML, empty input Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Marta Anon <manon@redhat.com>
- Move URL profile import inside EnableProvidersV2 gate and extend gate condition to include result.Profiles - Add delete-by-id to ImportProfile for content propagation on persistent gateways (mirrors ImportProfiles pattern) - Scope reservedCredentialKeys check to URL-fetched providers only via new fromURL parameter on EnsureProvider - Track URL provenance through mergeProviderDefs by building a set of URL-resolved names, excluding shadowed providers Signed-off-by: Marta Anon <maruiz93@gmail.com> Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Marta Anon <manon@redhat.com>
|
🤖 Finished Review · ✅ Success · Started 1:45 PM UTC · Completed 1:56 PM UTC |
Summary
Closes #2672
Implements portable provider and profile definitions that can be referenced by URL with SHA-256 integrity hashing, extending the existing resource resolution system (ADRs 0038, 0045) to cover the full harness surface.
profilesfield (URL-only) and extendprovidersto accept mixed local/URL entries in harness schemafullsend run, withParseProfileIDvalidation andWarnLiteralCredentialsfor credential hygienesandbox.ImportProfileand create/update providers viasandbox.EnsureProviderwith reserved credential key validationTest plan
go test ./internal/resolve/— profile/provider resolution,ParseProfileID,WarnLiteralCredentialsgo test ./internal/harness/— profiles field validation,HasURLReferences, base composition mergego test ./internal/sandbox/—ImportProfile, reserved credential key rejectiongo test ./internal/cli/—dedupResolvedProfiles,mergeProviderDefs,checkProviderProfileIntegrity, lock file reconstructionmake lintpasses🤖 Generated with Claude Code