Your AI Agent Has Shell Access. What Can It Reach?

Illustrated infographic summarizing: Your AI Agent Has Shell Access. What Can It Reach?

By Greg Nowak. Updated 12 September 2026.

An AI agent that can run shell commands can do useful work: investigate a failing build, process an export, or prepare website changes. Before letting it work unattended, ask what else it can reach along the way.

Could it read another client's files? Use a production credential? Change a script someone will run tomorrow? The agent's practical authority comes from its execution environment: files, accounts, network connections, and connected tools. A request to “only analyse this report” does not remove permissions the process already has.

Start with one job and map its access

Choose a real workflow and write down its inputs, expected output, and stopping point. For example: read an approved sales export, produce a draft report, and stop before emailing it. That gives the team something concrete to configure and test.

Ask whoever maintains the automation to complete the following map. Record actual access, including inherited permissions. For agencies, check whether a shared runner, account, or integration crosses client boundaries.

Surface What to check Useful starting boundary
Files Mounted folders, hidden files, exports, and neighbouring projects Approved inputs and a separate output workspace
Credentials Environment variables, configuration files, tokens, and SSH access A dedicated identity limited to this task
Network Internet destinations, private services, and host access Allow only the destinations the workflow needs
Connected tools Databases, deployment tools, and Model Context Protocol (MCP) servers Specific resources and operations, with separate write permissions
Host infrastructure Docker sockets, setup scripts, and privileged services Isolated execution without host administration access
Business actions Publishing, sending messages, deleting records, and deploying Approval of the exact action before execution
Use this as a review worksheet. Each boundary needs an owner and a test showing that it holds.

A sandbox still needs a workspace policy

“It runs in Docker” leaves several questions unanswered. An ordinary container and Docker Sandboxes are different: the latter uses a microVM with its own kernel. Mounting the host Docker socket into an ordinary container can give the process control over the host's Docker environment.

Workspace choices matter too. Docker documents that a direct mount exposes the host working tree to immediate edits. Its clone mode prevents writes to the original repository, but still exposes it for reading, including ignored or untracked .env files. Docker's isolation documentation explains these boundaries.

For a first pilot, use a disposable workspace containing only the required inputs. Review returned changes before integration, especially build scripts, CI workflows, and IDE tasks that may execute later. A normal Git diff does not show changes inside .git/hooks/; inspect hooks separately if the agent had access to them.

Protect credentials—and limit what they authorise

If a real token is readable in a file or environment variable, shell access can expose it. Avoid passing the team's normal administrative credentials into an agent session.

Where supported, use a credential proxy that adds authentication outside the sandbox. Docker's proxy-managed credentials keep the real value on the host and give the sandbox a placeholder. However, OAuth passthrough can expose real tokens. SSH forwarding is another distinction: private keys stay outside, but the sandbox can request signatures. Check the configured mechanism, not just the feature name. Docker documents these credential behaviours.

Keeping a token hidden does not prevent misuse of its permissions. A reporting agent should have access to the required dataset without inheriting the ability to delete it. Limit the account's scope and lifetime, and make revocation straightforward.

Check every route to the network

Start with blocked outbound access and add the destinations the job needs. Review default exceptions as well as custom rules: dependency registries may already be allowed.

GitHub's Copilot firewall illustrates why coverage matters. It applies to processes launched through the agent's Bash tool, but excludes MCP servers and configured setup steps. GitHub also warns that sophisticated attacks may bypass it. Its allowlists support domains and narrower URL paths. The firewall documentation lists the limitations.

The practical implication is to map each component separately. A tightly restricted shell does not constrain an external integration with broader access. Also consider what an allowed destination permits: access to a shared service may still allow uploads to an unintended account.

Approve the consequence, with enough detail to judge it

Let the agent prepare work within agreed limits. Put an independent execution check in front of production deployment, bulk deletion, publication, and external messages.

An approval should identify the target and exact parameters, expire, and become invalid if the action changes. This follows OWASP's guidance on high-impact agent actions.

Make the preview useful to the person approving it. For an email, show recipients, attachments, and final text. For a deployment, identify the environment and reviewed revision. “Allow shell command?” rarely gives an operations lead enough context.

Test the boundaries before unattended work

Use synthetic data in a controlled environment. Try reading an excluded file, contacting an unapproved destination, invoking a write tool from a reporting task, and reusing an expired approval. Confirm that enforcement blocks the operation even when the agent requests it.

Set limits for runtime, retries, tool calls, and spend. Record actions, denials, approvals, and outcomes without logging secrets. Keep the tested configuration and results, and repeat relevant checks when tools or permissions change. Assign someone who can stop a run and revoke its access.

Make one workflow ready for real use

A useful first deliverable is a reviewed access map, an agreed approval flow, and evidence that the boundaries work. That makes the decision to expand automation easier to assess.

Greg can help review your agent's environment and turn the findings into practical implementation priorities. Get in touch with Greg with the workflow you want to automate and the systems it needs to access.

Related on GrN.dk

Need help with this kind of work?

Review your AI agent's access with Greg Get in touch with Greg.

Sources

Seneste artikler

Sådan automatiserer danske virksomheder Gmail og Microsoft 365 med hurtig sortering, begrænsede rettigheder og menneskelig godkendelse.

Samme kunde på flere kort i HubSpot? Se, hvordan CVR-match, AI-forslag og menneskelig godkendelse kan bruges til at rydde op med styr på felter, relationer og kundehistorik.

Få en ugentlig marketingrapport fra GA4 og Google Ads med kontrollerede beregninger, tydelige dataforbehold og et kort AI-udkast, der hjælper jer på mandagsmødet.

Brug AI til webshoppens alt-tekster med en overskuelig pilot: kortlæg billederne, få danske forslag, og kontrollér resultatet i WordPress og WooCommerce.

AI-baseret ticketanalyse kan afsløre gentagne klager, produktfejl og huller i dokumentationen – uden at virksomheden behøver endnu en chatbot.

OpenSSH 10 fjerner DSA og advarer om nøgleudveksling, der ikke er post-kvantesikker. Her får du en metode til at afgrænse SFTP-oprydningen uden at svække alle SSH-forbindelser.

Botforespørgsler overstiger nu menneskelig webtrafik. Lær at auditere AI-crawlere, fastsætte regler på stiniveau, håndhæve robots.txt og måle det forretningsmæssige afkast.

Cloudflares Tunnel-opdateringer fra 2026 forbedrer kortlægning, overvågning af replikaer, logstreaming og overdragelse – men synliggør samtidig svagt ejerskab og mangelfuld praksis for failover og logging.

Sådan bruger du AI til mødenoter og opfølgning, mens faste regler beskytter CRM-data, kundematch og pipeline mod fejl og forhastede ændringer.

Drupal 10 når end of life den 9. december 2026. Brug denne praktiske kortlægning til at afgrænse arbejdet med Drupal 11-parathed, Composer-efterslæb, moduler og custom code.