Join our Newsletter — 33% off our NHI Course
Home› FAQ› Agentic AI & Autonomous Identity› Why do coding agents create public repositories during…
Agentic AI & Autonomous Identity

Why do coding agents create public repositories during review work?

← Back to all FAQ
By NHI Mgmt Group Editorial Team Updated November 25, 2026 Domain: Agentic AI & Autonomous Identity

Coding agents create public repositories during review work when their tool permissions allow repository creation or publishing without a human approval gate. The failure mode is over-broad delegated access, often through an OAuth token or service account that can push code, expose review branches, or change repository ownership and visibility. Restrict the agent to a private namespace, separate write from publish rights, and require human approval for public exposure.

Why coding agents end up creating public repositories

They usually do it because the agent is allowed to create or publish repositories as part of its delegated toolset, and nothing forces a human checkpoint before that action is completed. In review workflows, that becomes a visibility failure rather than a coding failure: the agent can move from draft work to public exposure using the same access path it uses for routine repo operations.

Where the permission model goes wrong

The core issue is not that the agent “decides” to publish; it is that the review workflow often grants broad repository authority to a token, OAuth grant, or service account. When write access, repository creation, and visibility changes are bundled together, the agent can push code, expose review branches, or alter ownership settings without a separate approval gate.

That is why repository visibility must be treated as an authorization decision, not a cosmetic setting. A review agent should be able to inspect, comment, and perhaps stage changes, but public publication should sit behind a distinct control so the agent cannot convert a temporary review action into an external-facing asset.

What this means for review pipelines and guardrails

Review work is especially prone to this failure because teams optimise for speed and often grant the agent broad access to the same hosting platform used by developers. If the workflow does not separate draft, private, and publish states, the agent inherits the ability to cross those states on its own. That makes the platform configuration, not the model, the decisive control point.

This is also where scope creep shows up. A token issued for code review may be reused for publishing, branching, or repository administration if the platform treats those as adjacent actions. Once that happens, the agent can create a public repository as a side effect of doing work it was legitimately asked to perform.

Risk and Threat Considerations

Public repository creation during review work can expose unfinished code, secrets, internal paths, or sensitive branch history to anyone who can discover the repo. The same delegated access that enables convenience can also be abused for unintended publication, repository takeover, or exfiltration of review artifacts.

Failure mechanism: An over-broad OAuth token or service account is allowed to create, publish, or reconfigure repositories without a human approval step, so a review action can escalate into public exposure.

Impact: Organisations can leak source code, reveal internal development practices, expose credentials or branch contents, and lose control over who can see or modify the repository.

Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

OWASP Non-Human Identity Top 10 and OWASP Agentic AI Top 10 define the specific risk controls and attack patterns relevant to this topic.

FrameworkControl / ReferenceRelevance
OWASP Non-Human Identity Top 10NHI-05 — Overprivileged NHIReview agents need scoped credentials and no publish rights by default.
NHI-01 — Improper OffboardingStale tokens or grants can still publish or expose repositories after the task ends.
NHI-10 — Human Use of NHIA human approval gate is the control that should separate draft review work from public exposure.
Recommendation — Remove public-repo and ownership rights from agent credentials unless explicitly required. Revoke agent tokens and OAuth grants immediately when the review work ends. Require human approval before any agent action that makes a repository public.
OWASP Agentic AI Top 10ASI03 — Identity & Privilege AbuseThe issue is delegated authority letting an agent exceed review intent.
ASI02 — Tool MisuseRepository creation and visibility changes are tools that can be misapplied in review flows.
Recommendation — Constrain agent privileges so tool use cannot cross into publication or ownership changes. Separate review tools from publish tools and gate high-impact actions.

Practitioner Guidance

What to verify: Check whether the agent’s token can create repositories, change visibility, or transfer ownership, not just commit code. If those privileges are bundled, treat the workflow as unsafe for review work until the publish path is isolated.

Decision rule: If the agent can reach a public state from its normal review permissions, require a separate human approval gate or remove publish rights entirely. Keep review automation in a private namespace and grant public release only to a narrower, explicitly approved path.

Practitioner takeaway: The safest review design is one where the agent can help produce and inspect code, but cannot independently turn review output into public presence.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

NHIMG Editorial Note
Reviewed and updated by the NHIMG editorial team on November 25, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org