Repository navigation
fix(#8007): restore missing permissions in embedded profiles - #8008
Conversation
|
🤖 Review · Commit: |
7f283e1 to
723f4ab
Compare
Since #7995 the profiles embedded in the binary are the authoritative definitions for built-in providers, but two of them had drifted from the fullsend-ai/agents copies the fleet used: - fullsend-package-registries lacked allow_encoded_slash on the registry.npmjs.org and registry.yarnpkg.com endpoints, so scoped npm package metadata requests (which carry a %2F-encoded slash) were rejected by the proxy, and lacked the **/uv and **/uvx binaries. - fullsend-gitleaks lacked the **/git binary. Add those permissions so both embedded profiles are byte-identical to the fleet copies, and pin them with scaffold tests (TestScaffoldPackageRegistriesProfile_Permissions and TestScaffoldGitleaksProfile_Permissions) so the built-in copies cannot drop them again. Closes #8007 Signed-off-by: Wayne Sun <gsun@redhat.com> Assisted-by: Claude Opus 5.5 (code agent), Claude (review)
723f4ab to
020c8a4
Compare
|
🤖 Review · Commit: |
|
🤖 Finished Review · ✅ Success · Started 10:07 PM UTC · Completed 10:19 PM UTC Commit: Runtime: pi · Model: openai/gpt-6.1-sol → gpt-6.1-sol · Effort: high · Cost: $1.44 |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
Risk Assessment: moderate (2/5) DetailsSmall additive profile permission fix with complete issue alignment, elevated to moderate risk due to regression history and file coupling on the shared scaffold test suite. |
|
Looks good to me |
waynesun09
left a comment
There was a problem hiding this comment.
Approving at 020c8a4. The built-in package-registries and gitleaks profiles now carry the permissions the fleet copies had. Checked with an A/B in a code-role sandbox: npm view @types/node (scoped, %2F) and uvx pycowsay are denied on main and work here, and git to github.com is allowed while POST stays read-only. The test pins allow_encoded_slash to exactly the npm and yarn hosts.
Summary
Since #7995, the profiles embedded in the binary are the authoritative definitions for built-in providers. Two of them had drifted from the fullsend-ai/agents copies. This PR restores the missing permissions so the embedded
fullsend-package-registriesandfullsend-gitleaksprofiles are byte-identical to the fleet copies. It also pins the permissions in scaffold tests.Related Issue
#8007. This must merge before fullsend-ai/agents#1596, which switches the fleet harnesses to the built-in profiles by bare name.
Changes
internal/scaffold/fullsend-repo/profiles/fullsend-package-registries.yaml:allow_encoded_slash: trueto theregistry.npmjs.organdregistry.yarnpkg.comendpoints. Scoped npm package metadata requests carry a%2F-encoded slash.**/uvand**/uvxbinaries.internal/scaffold/fullsend-repo/profiles/fullsend-gitleaks.yaml: adds the**/gitbinary.internal/scaffold/scaffold_test.go: adds two tests.TestScaffoldPackageRegistriesProfile_Permissionschecks that both npm/yarn endpoints haveallow_encoded_slash, thatpypi.orgdoes not, and that**/uvand**/uvxare present.TestScaffoldGitleaksProfile_Permissionschecks that**/gitis present.The
allow_encoded_slashexample indocs/guides/user/customizing-agents.mdalready matches this usage, so no docs change was needed.Testing
go test ./internal/scaffold/...passes. Both new tests fail on the old profiles with 5 assertion errors and pass with this change.go test ./internal/cli/ -run 'Profile|Builtin|BuiltIn'passes.make lint:pre-commit runcould not fetch hook repositories in the sandbox (TLS failure). I ran the applicable hooks directly instead (pre-commit-hooks v6.0.0 checks, gitleaks, gofmt,go vet ./..., lint-broken-symlinks), and all passed. golangci-lint v2 was run with its default linters because.golangci.ymlis in v1 format. It found no issues in the changed files.Checklist
🤖 Generated with Claude Code
Sandbox verification
Code image, a harness that declares only bare
package-registriesandgitleaks, OpenShell 0.1.2 with the podman driver, on an isolated gateway that started with no copy of either profile. Same commands with fullsendmain(e9690f2) and with this branch:mainnpm view @types/node version(scoped name,%2Fin the path)request-target contains an encoded '/' (%2F)26.6.4, from both registry.npmjs.org and registry.yarnpkg.comuvx pycowsay hi(uv installed with pip first)/sandbox/.venv/bin/uv -> pypi.org:443git ls-remote https://github.com/gitleaks/gitleaksgitbinaryPOST /git-upload-pack, the same as the fullsend-ai/agents copyThe code image does not ship
uv; the binary rule matters where uv is installed (pip, or a later image).Closes #8007
Post-script verification
agent/8007-embedded-profile-permissions)e9690f26438e88c01fb808a437a480b0ae0ed800..HEAD)