Tip 1: Keep Secrets Out of the AI's Reach (and Out of Your Repo)
What to do: Treat every key, token, and password as something that must never appear in a prompt, a chat, a commit, or a file the agent reads.
Why it matters: GitGuardian's State of Secrets Sprawl 2026 found 28.65 million new hardcoded secrets in public commits in 2025, and commits co-authored by Claude Code leaked at about 3.2% against a 1.5% baseline. It also found 24,008 unique secrets in MCP-related configuration files, with 2,117 verified valid, and that 28% of incidents started outside source code, in tools like Slack and Jira.
How to do it:
- Store secrets in environment variables or a secrets manager, and add .env to .gitignore before your first commit.
- Use separate keys for development and production, each with the smallest scope that works.
- Know which keys are meant to be public. Supabase's documentation says a publishable key is safe to expose when Row Level Security is on, but secret and service-role keys are never safe to expose and belong on the backend only.
- Turn on secret scanning. GitHub documents a way to run secret scanning from AI coding agents, such as Copilot agent mode and Claude Code, through its MCP server.
- Protect your own identity: enable multi-factor authentication on your code host, cloud account, and AI tool accounts.
Common mistake: Pasting a key into a chat "just to get it working."
Quick check: If a key has ever appeared in a prompt, commit, or ticket, rotate it today. GitGuardian's retest shows how rarely this happens by default.
Tip 2: Lock the Database Before You Launch
What to do: Make sure every table that holds personal data is protected by access rules, then test it as a stranger.
Why it matters: Moltbook's database allowed full read and write access because a key sat in client-side JavaScript with no Row Level Security behind it. The Cloud Security Alliance summarizes a separate vulnerability, CVE-2025-48757, in which a scan of 1,645 Lovable apps found 303 vulnerable endpoints across 170 apps [9]. Supabase's docs state it plainly: a table in an exposed schema without RLS is readable and writable by any role with a grant on it.
How to do it:
- List every table and check whether RLS is enabled. Tables created in Supabase's Table Editor have it on by default; tables created with SQL need it enabled by you.
- Add a policy for each operation you want to allow. Once RLS is on, nothing is readable through the API with a publishable key until a policy exists.
- Be wary of policies that say "anyone can read" on tables that hold user data.
- Run the database advisor, which flags tables without RLS.
- Test logged out: open your app in a private window and try to read other users' records.
Common mistake: Asking the AI "is my database secure?" and trusting the answer without checking the actual policies.
Quick check: Can an anonymous visitor fetch any row that contains a name, email, or ID? If yes, stop and fix it before sharing the link.
Tip 3: Give AI Agents the Least Access That Works
What to do: Decide what the agent may read, run, and send, then restrict everything else.
Why it matters: OWASP's guidance on excessive agency names excessive functionality, permissions, and autonomy as root causes of damaging actions triggered by manipulated or mistaken model output. Its Secure Coding with AI cheat sheet notes that agentic tools can execute shell commands, install packages, edit files, access the network, and push branches, and that rules files such as .cursorrules, CLAUDE.md, and AGENTS.md silently steer every future generation. Researchers have documented prompt-injection CVEs in agentic coding editors, including Cursor and GitHub Copilot.
How to do it:
- Start read-only. Approve write and shell actions one at a time until you trust a workflow.
- Never give an agent production database credentials. Use a development environment with fake data.
- Keep real exports, .env files, and screenshots outside the folder the agent can read.
- Review changes to rules files and MCP configuration like code. Do not store tokens inside MCP config files.
- Look at what a connector will receive before you add it. Prefer ones that do not need raw personal data.
- Require human review before merging or deploying. GitHub's own risk guidance for its Copilot cloud agent describes limiting the agent's credentials and requiring human review before merge.
Common mistake: Clicking "approve all" to stop the interruptions.
Quick check: Open your agent's permissions page. If you cannot say what each permission is for, remove it.
Tip 4: Review, Scan, and Verify What the AI Builds
What to do: Treat generated code as unreviewed until it has passed checks.
Why it matters: Veracode's 2025 report tested over 100 models and found known security flaws in 45% of generation tasks; its 2026 figures put the rate at 44%, with cross-site scripting protection failing 85% of the time. The Cloud Security Alliance also describes "slopsquatting," where attackers register package names that AI tools tend to invent, including a confirmed malicious package built to steal credentials and API keys.
How to do it:
- Before deploying, run a code scanner and a dependency check.
- Confirm every new package exists, is maintained, and is the one you meant to install.
- Ask the AI to explain authentication, access rules, and error handling in plain language, then check its claims.
- Test from the outside. Escape.tech found that many weaknesses in vibe-coded apps were reachable without privileged access.
- Search your built frontend for "key," "token," and "secret" before you publish.
- Where available, use built-in checks. GitHub says its Copilot cloud agent runs CodeQL, dependency checks against its advisory database, and secret scanning on its work.
Common mistake: Reviewing only whether the feature works.
Quick check: Could you explain to a friend who reads your code where user data is stored and who can see it?
Tip 5: Anonymize Personal Data Before AI Sees It (Questa API, Plugin, or Blackbox)
What to do: Replace real identifiers with tokens before any personal data reaches an AI tool, a test file, or a shared log, and restore real values only where an authorized person needs them.
Why it matters: Tips 1 to 4 protect your systems. This one protects people when something else slips. If a prompt, a log, or an AI vendor's records are ever exposed, they hold tokens such as [PERSON_1] rather than a real name and email. The real data never left your control.
How to do it, depending on how you build:
Use the plugin (Questa Privacy MCP) if you work in an AI assistant such as Claude or Cursor. It exposes redact_pii for inline text (error logs, support tickets, stack traces) and anonymize_document for files. According to the public MCP listing, you add MCP in your client's plugin settings and authenticate with OAuth or a revocable connector key; confirm the current steps in Questa's documentation.
Use the API (Questa Developer) if your app sends user text to an LLM. Call Questa before the model, send the anonymized text to the LLM, then re-identify the response for the user. You generate your own API keys, the service is managed by Questa, and you start with free credits. Endpoints and SDK details are at developer.questa-ai.com.
Use Questa Blackbox if you are a company with regulated or contractually restricted data. It is a self-hosted, air-gapped deployment inside your own network, with compliance monitoring mapped to GDPR, the EU AI Act, DORA, and NIS2. It is quoted as a fixed setup fee plus a fixed usage fee, and a 15-day trial is available.