Repository navigation
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What and why
The
use_githubREST passthrough refusedPOST /repos/{owner}/{repo}/forks(resource 'forks' is not in the allowed set), so the agent had no sanctioned way to fork a repository. This admits exactly that endpoint, narrowly:forksjoins the repo-scoped REST families, but only as/repos/{owner}/{repo}/forksitself. Any deeper sub-path is refused at parse time.GET(list forks) is a read.POST(fork) is a write.PUT,PATCHandDELETEare refused.owner/repomust pass the existing owner allow-list (_target_allowed: a bare owner or anowner/repoglob). With no policy configured, the POST is refused, as for every other write.name(a valid repository name,[A-Za-z0-9._-]{1,100}, not./..) anddefault_branch_only(bool).organizationis refused with a specific message, any other key is refused, and a query string on the POST is refused so options cannot bypass the body check.ForkEventis added to the throttle's event tally (github_client._THROTTLED_EVENT_TYPES) and to the mention poller's write-audit events backstop (audit.WRITE_EVENT_TYPES; a parity test pins the two). A fork's event names its source repository, so it is metered and audited against the repo the allow-list checked.Also:
use_githubtool description gains one bullet in its list of REST uses (tool spec fixture updated).docs/architecture.mdstates that a fork lands only in the bot account.Kind of change
Behavior: changes what the agent's
use_githubtool allows and what the mention poller's write audit counts. No infra, IAM or workflow change.Note for deployers
A later push to the fork lands in the bot's own account. The write audit flags any repository outside the profile's
managed_repositories, so add the bot's own login (or<bot>/<repo>entries) there if pushes to forks are expected.Checks run locally (
strands-factory/)uv sync --locked --all-extras,python build.py webruff check .: cleanmypy harness/src/strandly cli/src/strandly_cli build.py: cleanpytest -q -p no:cacheprovider: 4845 passed, 18 skipped, 1 failed:test_runtime_reliability.py::test_the_body_does_not_see_the_heartbeat_as_its_last_job[/bin/sh], a timing-sensitive sandbox heartbeat test unrelated to this change; it passes when rerun on its own (3 of 3) and in CI