Treat each integration as a separate delegated capability with its own scope, approval logic, and offboarding path. Git write access, URL fetching, and administrative actions should not share the same identity or token. That keeps a compromised or confused model from turning one task into broader system reach.
What Changes When Function-Calling Needs Git or Web Access?
Function-calling becomes a delegation problem, not just a tooling problem. Once a model can write to Git, fetch arbitrary URLs, or trigger admin actions, it needs bounded authority, explicit approval, and a clean offboarding path. The practical question is how to keep each capability narrow enough that a mistake, prompt injection, or compromise cannot spread across unrelated tasks.
Why Separate Git, Web Fetching, and Admin Actions
Each integration should behave like a distinct delegated capability with its own identity boundary. Git write access should not reuse the same token as URL fetching, and neither should share credentials with privileged system changes. That separation keeps the blast radius aligned to the task and prevents one confused or compromised workflow from inheriting broader reach than it needs.
In practice, teams should treat Git config credential theft and exposed repository secrets as reminders that “just one token” can quickly become repo access, cloud access, and downstream system access. The same logic applies when a pipeline credential is reused for editing automation, because write capability in one place can become execution elsewhere. Misconfigured source control systems can also leak far more than code, as shown by misconfigured Git servers leaking secrets.
What Good Delegation Looks Like for Model-Coupled Workflows
Good design starts by separating intent from authority. A model can propose a commit, draft a request, or suggest a fetch, but the action identity should be specific to one capability and one environment. Short-lived tokens, explicit scopes, and capability-specific approvals are more important than whether the underlying task feels “low risk,” because the dangerous cases are usually the ones that seem routine.
For web access, the safe pattern is to constrain the function to the smallest target set and the narrowest action set possible. For Git, that often means read-only access by default, and write access only through a separately governed path with its own review or policy gate. For administrative actions, the decision should be even stricter: if the model can change state outside the repository or browser context, the authorization model should treat that as a different trust level altogether.
Identity and token design should also support revocation without collateral damage. If a workflow is retired, its token, approvals, and logs should be easy to invalidate without disrupting other integrations. That is what makes the delegation model operationally safe instead of merely theoretically scoped.
Risk and Threat Considerations
Shared credentials and shared approval paths create hidden coupling. If a single token can both fetch external content and modify source or systems, prompt injection, secret exposure, or workflow confusion can turn an ordinary request into unauthorized repository changes or administrative action.
Failure mechanism: A compromised or overly capable function-calling path reuses the same identity for unrelated actions, so the attacker or error inherits broader privilege than the original task required.
Impact: The result can be repository tampering, secret exposure, lateral movement into connected systems, or destructive changes that are hard to attribute back to the originating request.
Standards & Framework Alignment
This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.
NIST SP 800-53 Rev 5 and CIS Controls v8 set the technical controls, while ISO/IEC 27001:2022 defines the regulatory obligations.
| Framework | Control / Reference | Relevance |
|---|---|---|
| NIST SP 800-53 Rev 5 | IA-9 — Identification and Authentication (Non-Organizational Users) | Separates machine and external access paths for delegated tooling |
| AC-6 — Least Privilege | Function-calling should only receive the minimum access needed for one task | |
| IA-5 — Authenticator Management | Delegated capabilities depend on distinct token issuance, rotation, and revocation | |
| Recommendation — Use IA-9 to bind each delegated function to its own authentication path and token scope. Apply AC-6 to keep Git, web, and admin actions on separate minimal privileges. Use IA-5 to rotate and revoke each function-specific credential independently. | ||
| CIS Controls v8 | CIS-5 — Account Management | Separating delegated identities requires distinct account and credential governance |
| Recommendation — Manage each function-calling credential as a separate account with clear lifecycle ownership. | ||
| ISO/IEC 27001:2022 | A.5.15 — Access control | Access rules must distinguish read, write, and administrative delegation paths |
| Recommendation — Implement A.5.15 so each integration receives only the access needed for its role. | ||
Practitioner Guidance
What to prioritise: Assign each function-calling integration its own capability, approval path, and revocation path before you expand usage. The first design decision should be whether the model is allowed to read, write, or administer, because mixing those modes is where risk compounds.
What to verify: Confirm that the Git token cannot fetch arbitrary web content, that the web-fetch token cannot write to repositories, and that admin credentials are isolated from both. Also verify that offboarding actually revokes the exact capability being retired, not a shared parent credential.
Common mistake: Teams often secure the model interface while leaving the delegated credentials too broad. That leaves the real control plane unprotected, because the model does not need to be “malicious” for the wrong token to be used in the wrong place.
Practitioner takeaway: Treat function-calling as delegated authority design, not convenience integration, and keep every high-impact action on a separate identity with a separate lifecycle.
Related resources from NHI Mgmt Group
- How should security teams decide whether JIT access is safe for non-human identities?
- How should security teams validate function-calling behavior in AI agents before allowing access to sensitive data?
- How should teams secure non-human identities across cloud and SaaS?
- What is the difference between JIT access and Zero Trust for NHIs?
Deepen Your Knowledge
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.
Reviewed and updated by the NHIMG editorial team on October 11, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org