Free security guide · xAI Grok

3 things you can do to secure Grok Bot and Grok Build for free today.

Grok Build runs on developers' laptops with its sandbox off by default. Grok Bot works from a cloud computer that all of a person's bots share. Three free changes make both safer, and cover the API keys behind any Grok bot you build yourself.

Updated 6 min readDrycraf Cyber OperationsGrok Business, Grok Bot, Grok Build, xAI API

The short answer

First, pin Grok Build's guardrails with a root-owned /etc/grok/requirements.toml that turns off always-approve and requires company sign-in. Second, keep Grok Bot asking before it acts: leave Auto-review on, keep local execution at Ask every time, and cap both for your team. Third, provision only the connectors and API keys you need: on Grok Business and Enterprise, members can't use a connector until an admin provisions it, and every xAI API key can be limited to the models and endpoints it uses.

  1. Pin Grok Build's guardrails on every laptop
  2. Keep Grok Bot asking before it acts
  3. Provision only the connectors and API keys you need
01

Pin Grok Build's guardrails on every laptop

Grok Build is xAI's coding agent for the terminal. Out of the box it asks before it acts, but any user can switch to always-approve, and its sandbox is off by default. On macOS, the sandbox can't block network access from the commands Grok runs. A managed requirements file is where a company sets the rules a developer can't change.

Where/etc/grok/requirements.tomlroot-owned, pushed by MDM

  1. Create /etc/grok/requirements.toml, owned by root, on every machine that runs Grok Build. It takes priority over each user's own configuration.
  2. Under [ui], set disable_bypass_permissions_mode = true. Always-approve mode (--always-approve and /always-approve) stops working. Grok honours this setting only from a root-owned file.
  3. Set up company sign-in under [auth.oidc] and turn on disable_api_key_auth, so people sign in through your identity provider rather than with personal API keys.
  4. Ask developers to run with a sandbox profile (--sandbox workspace, or profile under [sandbox] in their config) and to add deny rules for destructive commands, for example { action = "deny", tool = "bash", pattern = "rm -rf *" }. A deny rule always beats an allow rule.

If anyone ran Grok Build version 0.2.93, rotate every secret ever committed to the repositories it opened. In July 2026 that version was found uploading whole git repositories, history included, to cloud storage. xAI turned the uploads off and said the data would be deleted; no independent audit has confirmed that.

02

Keep Grok Bot asking before it acts

Grok Bot is xAI's agent with its own computer in the cloud. It can use the apps you connect and, if you allow it, run things on your own machine. Every bot a person creates shares that one cloud computer, and xAI's own docs say not to use separate bots as a security boundary.

WhereGrok BotSettings › General › BotSettings › Computer › Your computer

  1. Leave Auto-review on, under Settings, General, Bot. It's on by default, and it's what puts an approval card in front of risky actions.
  2. On approval cards, choose Allow once rather than Always allow. Write custom rules as Ask first for anything that sends, pays, deletes or shares; when rules overlap, Ask first wins.
  3. Keep local execution at Ask every time under Settings, Computer, Your computer. Never allow is safer still for most staff.
  4. Admins can cap those settings for the whole team on the Grok Bot page of the Cursor dashboard. Your Cursor SSO and SCIM setup carries over.
  5. Give bots credentials through the Vault, a password manager or a Secure Form, never pasted into chat. Credentials given that way aren't shown to the model.

Grok Bot has no separate spend cap today, and action recording is an Enterprise feature that's off by default. Turn on Privacy Mode in Cursor: with it on, customer data isn't used for training.

03

Provision only the connectors and API keys you need

On Grok Business and Enterprise, members can't use a connector until an admin provisions it in the console, so the console works as your allowlist. The same goes for the xAI API keys behind any Grok bot your own team builds: each key can be limited to the models and endpoints it needs.

Whereconsole.x.aiConnectors · API keys · Team settings

  1. Provision only the connectors you've approved, such as Google Drive, SharePoint or Salesforce. Drive keeps its existing permissions, so Grok can read whatever the member can open.
  2. Be careful with custom MCP connectors: they must be reachable from the public internet.
  3. For every API key, replace the wildcard permissions with the model and endpoint it uses, for example api-key:model:grok-4.7 and api-key:endpoint:chat. Then set per-key rate limits (queries per second, queries per minute, tokens per minute).
  4. If a bot handles sensitive data, have a team admin turn on zero data retention in the console's Team settings, and send US-only traffic to us.api.x.ai, since the default api.x.ai doesn't guarantee a processing region.

Zero data retention covers every key on the team and turns off the stateful Responses API, Files and Batch. Without it, xAI keeps API requests for 30 days for abuse review. Either way, xAI says it doesn't train on API data without your explicit permission.

More you can do today, for free

  • Tell staff to share Grok conversations only with teammates who have a license. In August 2025, Google indexed more than 370,000 shared consumer Grok chats.
  • On personal X accounts used for work, turn off Grok training: X Settings, Privacy and safety, Data sharing and personalization, Grok & Third-party Collaborators. X moves this menu from time to time.
  • Keep management keys (console Settings, Management Keys) apart from API keys, and in as few hands as possible.
  • Pull the console's audit events (GET /audit/teams/{teamId}/events in the Management API) to see changes to API keys, members and team settings.
  • Don't ask grok.com to read untrusted web pages that touch sensitive work. A prompt-injection attack that pulls chat data out of grok.com was still unpatched in August 2026.
  • Grok Build also reads Claude Code's managed MCP allowlist, so a company MCP allowlist in managed-settings.json covers both tools.

Free and open-source tools to check out

None of these needs a purchase. Read each tool's own documentation before you run it on company systems.

  • TruffleHogAGPL-3.0Finds leaked credentials across git history, buckets and chat exports, and checks whether each one still works, so you know what to rotate first.
  • GitleaksMITScans repositories and their history for committed secrets, such as API keys an AI agent wrote into a config file. Runs as a pre-commit hook or in CI.
  • Agent Scan (formerly mcp-scan)Apache-2.0Scans the MCP servers, agent configs and skills on a machine for tool poisoning, prompt injection and risky permissions.
  • garakApache-2.0NVIDIA's LLM vulnerability scanner: probes a model or bot for prompt injection, data leakage and jailbreaks.
  • promptfooMITTests and red-teams prompts, agents and RAG apps against injection, data leaks and policy breaks, in CI.

At scale

Three consoles and a file on every laptop: where Glasswarden comes in

Grok Business is managed at console.x.ai, Grok Bot from the Cursor dashboard, and Grok Build from a file on each laptop, and none of them sees the personal X accounts nobody registered. Glasswarden, from Drycraf, runs where your people and agents work, puts every AI tool on one inventory, holds them all to one policy, and sends fixes straight back to the agent that caused the problem.

AI VisibilityEvery AI tool on one inventoryWhich assistants and agents are in use, their versions, models and MCP servers, by person, team and device.
AI ControlOne policy, wherever agents runRules that warn or block, such as no reading secret files, for everyone or one team, with exceptions that expire.
AI RemediationFixes, Direct to AgentWhen something's exposed, Glasswarden writes the fix for the owner's coding agent and closes it only when telemetry shows it's gone.

Questions admins ask

What is Grok Build?

Grok Build is xAI's coding agent. It runs in a terminal, headless in scripts and bots, or inside other apps through the Agent Client Protocol (ACP). It launched in May 2026 as an early beta for SuperGrok and X Premium Plus subscribers, and its source code is public on GitHub under the Apache-2.0 license.

What is Grok Bot?

Grok Bot is xAI's agent with a real computer in the cloud. People use it on desktop and mobile, in Slack, and on X by tagging @bot. It signs in with a Cursor account, and it entered beta in August 2026.

Does xAI train on our business data?

Not on Grok Business or Enterprise: xAI's launch post says "no training on it, ever". xAI also says it never trains on API inputs or outputs without your explicit permission, and keeps API data for 30 days unless you turn on zero data retention. Grok Bot follows Cursor's terms: with Privacy Mode on, customer data isn't used for training.

Does Grok Business have SSO?

Single sign-on, SCIM directory sync and custom roles are part of Grok Enterprise. Grok Business, at $30 per user per month, includes team management, consolidated billing and user analytics.

Sources

  1. xAI: Introducing Grok Business and Grok Enterprise
  2. Grok user guide
  3. Grok organization (SSO, SCIM, roles)
  4. Grok connectors
  5. Grok Build overview
  6. Grok Build permissions
  7. Grok Build enterprise configuration
  8. Grok Build sandbox (source docs)
  9. Grok Bot overview
  10. Grok Bot for teams and enterprises
  11. Grok Bot approvals, security and privacy
  12. xAI API security FAQ (training, retention, ZDR, regions)
  13. xAI Management API (key permissions, audit events)
  14. The Next Web: Grok Build uploaded entire git repositories
  15. 9to5Mac: 370,000 Grok chats made public
  16. The Register: Grok chat prompt injection

Checked against the vendors' own documentation on November 6, 2026. Admin consoles change: if a menu has moved, the vendor's page above is the authority. Product names are trademarks of their owners; Drycraf is independent of them.