Use AI coding agents without leaking client trust

Practical boundaries for secrets, client data, permissions, dependencies, generated code, and the human review that cannot be delegated.

A developer inspecting code across multiple screens in a professional workspace.
AI securityAgent access should be deliberate, minimal, and reviewable.
A developer inspecting code across multiple screens in a professional workspace.

A coding agent can inspect an entire repository, run commands, install dependencies, and modify production-bound code. That power is useful precisely because it is consequential. Freelancers need a security model before they need a larger prompt library.

Classify what the agent may see

Separate public code, confidential business logic, personal data, credentials, production records, and regulated information. Confirm the client’s policy and the tool’s data controls before placing repository content into any external system.

Use sanitized fixtures and synthetic examples for development. Keep environment files, exports, logs, backups, and credential stores excluded from agent context. A convenient ignore rule is not a substitute for reviewing what is actually accessible.

The safest secret is the one the agent never receives.

Grant the smallest useful permission

Begin in a constrained workspace with limited network and command access. Review requests to install packages, alter infrastructure, access external services, or execute destructive operations.

Use separate credentials for development and automation, short-lived tokens where possible, and logs for consequential actions. Never allow convenience to turn a local coding task into broad production authority.

Inspect dependencies and generated code

Agents may solve an ordinary problem by adding an unnecessary package or copying a pattern with insecure defaults. Review dependency reputation, maintenance, license, transitive cost, and whether the codebase already contains the needed capability.

Pay particular attention to authentication, authorization, input handling, file access, command execution, serialization, and logging. Ask what an attacker controls and where that value travels.

Require security evidence before delivery

Run the project’s static checks, dependency audit, tests, and focused security cases. Inspect the complete diff and verify that logs, error messages, and telemetry do not expose sensitive information.

Document agent use where the client requires it. If you cannot explain how the code was produced, reviewed, and validated, you are not ready to stand behind it.

A safe agent session

  • Client policy permits the selected tool and data handling.
  • Secrets, personal data, production records, and sensitive logs are excluded.
  • Network, command, and service permissions are minimal.
  • Dependencies and security-sensitive paths receive human review.
  • The final diff and validation evidence are retained.

Start a conversation

Building something that needs careful thinking?

Share the problem you are trying to solve. We will help identify a sensible next step.

Start a project