Skip to content

fix(#8007): restore missing permissions in embedded profiles - #8008

Merged
waynesun09 merged 1 commit into
mainfrom
agent/8007-embedded-profile-permissions
Oct 2, 2026
Merged

waynesun09 merged 1 commit into
mainfrom
agent/8007-embedded-profile-permissions

Conversation

@fullsend-ai-coder

@fullsend-ai-coder fullsend-ai-coder Bot commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

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-registries and fullsend-gitleaks profiles 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:
    • adds allow_encoded_slash: true to the registry.npmjs.org and registry.yarnpkg.com endpoints. Scoped npm package metadata requests carry a %2F-encoded slash.
    • adds the **/uv and **/uvx binaries.
  • internal/scaffold/fullsend-repo/profiles/fullsend-gitleaks.yaml: adds the **/git binary.
  • internal/scaffold/scaffold_test.go: adds two tests.
    • TestScaffoldPackageRegistriesProfile_Permissions checks that both npm/yarn endpoints have allow_encoded_slash, that pypi.org does not, and that **/uv and **/uvx are present.
    • TestScaffoldGitleaksProfile_Permissions checks that **/git is present.

The allow_encoded_slash example in docs/guides/user/customizing-agents.md already 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.
  • Tests added for the modified profiles.
  • make lint: pre-commit run could 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.yml is in v1 format. It found no issues in the changed files.

Checklist

  • PR title follows Conventional Commits
  • Commits are signed off (DCO): not applicable, this is an autonomous agent commit
  • Changes are limited to the issue scope

🤖 Generated with Claude Code

Sandbox verification

Code image, a harness that declares only bare package-registries and gitleaks, OpenShell 0.1.2 with the podman driver, on an isolated gateway that started with no copy of either profile. Same commands with fullsend main (e9690f2) and with this branch:

Check main this PR
npm view @types/node version (scoped name, %2F in the path) denied: request-target contains an encoded '/' (%2F) 26.6.4, from both registry.npmjs.org and registry.yarnpkg.com
uvx pycowsay hi (uv installed with pip first) denied: /sandbox/.venv/bin/uv -> pypi.org:443 runs
git ls-remote https://github.com/gitleaks/gitleaks connection refused for the git binary the binary is allowed; the read-only profile still denies POST /git-upload-pack, the same as the fullsend-ai/agents copy

The code image does not ship uv; the binary rule matters where uv is installed (pip, or a later image).


Closes #8007

Post-script verification

  • Branch is not main/master (agent/8007-embedded-profile-permissions)
  • Secret scan passed (gitleaks — e9690f26438e88c01fb808a437a480b0ae0ed800..HEAD)
  • PR body secret scan passed (gitleaks — no-git)

@fullsend-ai-coder
fullsend-ai-coder Bot requested a review from a team October 2, 2026 21:57
@fullsend-ai-coder fullsend-ai-coder Bot added the ready-for-review Triggers review agent dispatch label Oct 2, 2026
@fullsend-ai-review

fullsend-ai-review Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

🤖 Review · ⚠️ Cancelled · Started 9:59 PM UTC · Ended 10:04 PM UTC

Commit: 7f283e1 · View workflow run →

@waynesun09
waynesun09 force-pushed the agent/8007-embedded-profile-permissions branch from 7f283e1 to 723f4ab Compare October 2, 2026 22:03
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)
@waynesun09
waynesun09 force-pushed the agent/8007-embedded-profile-permissions branch from 723f4ab to 020c8a4 Compare October 2, 2026 22:05
@fullsend-ai-review

Copy link
Copy Markdown

🤖 Review · ⚠️ Cancelled · Ended 10:05 PM UTC

Commit: 723f4ab · View workflow run →

@fullsend-ai-review

fullsend-ai-review Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 10:07 PM UTC · Completed 10:19 PM UTC

Commit: 020c8a4 · View workflow run →

Runtime: pi · Model: openai/gpt-6.1-sol → gpt-6.1-sol · Effort: high · Cost: $1.44

@codecov

codecov Bot commented Oct 2, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@fullsend-ai-review fullsend-ai-review Bot added the risk/moderate PR risk: moderate label Oct 2, 2026
@fullsend-ai-review

Copy link
Copy Markdown

Risk Assessment: moderate (2/5)

Details

Small 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.

@fullsend-ai-review

Copy link
Copy Markdown

Looks good to me

@fullsend-ai-review fullsend-ai-review Bot added the ready-for-merge All reviewers approved — ready to merge label Oct 2, 2026

@waynesun09 waynesun09 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@waynesun09
waynesun09 added this pull request to the merge queue Oct 2, 2026
Merged via the queue into main with commit 50f2fe6 Oct 2, 2026
65 checks passed
@waynesun09
waynesun09 deleted the agent/8007-embedded-profile-permissions branch October 2, 2026 22:35

This branch was previously deployed

1 inactive deployment
dev — 020c8a49 Deployed Oct 2, 2026 by waynesun09 via behaviour #15122
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-merge All reviewers approved — ready to merge ready-for-review Triggers review agent dispatch risk/moderate PR risk: moderate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Embedded package-registries and gitleaks profiles miss permissions the fleet copies have

1 participant