AI agents

Letting AI Agents Into Your Website Repo: A Security Checklist

What a CTO should check before an AI agent gets access to the marketing site’s repo: permissions, branch protection, secrets, previews and audit trails.

Letting AI Agents Into Your Website Repo: A Security Checklist

Key takeaways

  • Give the agent access to one repository, never the whole organization.
  • Keep branch protection on: the agent opens pull requests and a person merges them.
  • Keep production secrets away from the agent. Previews run with preview-only keys.
  • Every change should leave a trail: who asked, what changed and who approved it.
  • Make sure you can revoke access in one click.
On this page
  1. Scope access to one repository
  2. Keep branch protection and required reviews
  3. Keep secrets out of reach
  4. Review every change in a preview
  5. Keep an audit trail
  6. The checklist

Marketing wants AI agents to ship website changes. The CTO’s first question is fair: what can this thing touch? A website repo often sits next to product code, shares CI secrets and deploys to the company’s domain.

The short answer: an agent should work like a new contractor on their first day. Access to one repository, changes through pull requests only, no production secrets, and a record of everything it does.

Scope access to one repository

Install the agent as a GitHub App limited to the marketing site’s repository. Avoid personal access tokens and organization-wide installs. If the marketing site lives in a monorepo with product code, consider moving it out first. It is the cleanest security boundary you can draw.

Keep branch protection and required reviews

Protect the main branch: require a pull request, at least one approving review and passing checks. With that in place, the agent can propose anything and merge nothing. Your existing CI (build, lint, tests) runs on its pull requests like on anyone else’s.

Keep secrets out of reach

The agent doesn’t need production API keys to change a landing page. Make sure:

  • Repository and CI secrets aren’t exposed to pull requests from the agent’s branches.
  • Preview deployments use preview-only keys and test data.
  • Environment files with real credentials aren’t committed to the repo at all.

Review every change in a preview

Each pull request should build a preview deployment. Reviewers check the actual page, on desktop and mobile, before approving. Reviewing a diff alone isn’t enough for visual changes.

Keep an audit trail

You should be able to answer three questions for any change on the live site: who asked for it, what changed and who approved it. Pull requests answer the last two. Make sure the agent links each one to the request that started it.

The checklist

  1. GitHub App installed on one repository only.
  2. Branch protection on main, with required reviews and checks.
  3. No production secrets available to agent branches or previews.
  4. A preview deployment on every pull request.
  5. Every change traceable to a request and an approver.
  6. A written answer on where code is processed and stored.
  7. Access you can revoke in one click.

If a vendor can’t tick all seven, keep it away from your repo. For the bigger picture, read what an AI website agent is. Centipage is built around this list: one repo, pull requests only, and nothing merges without approval. See how it works.

Frequently asked questions

Can an AI agent push directly to main?

Only if you let it. With branch protection and required reviews on the main branch, an agent can only open pull requests, and a person with merge rights decides what goes live.

What GitHub permissions does a website agent need?

Read and write access to the contents and pull requests of the one repository it works on, and read access to checks so it can see whether the build passed. It doesn’t need admin rights or access to other repositories.

What happens to our code?

Ask the vendor directly: where code is processed, whether it’s stored, and whether it’s used to train models. Get the answers in writing, in the data processing agreement.

Nik Zechner

Founder of Centipage. For 8 years he has designed and shipped websites for startups like Digimarc, Almetra AI and MarvelX. Why he’s building Centipage.

Your website, 1% better every day.

Centipage’s agents find what to improve on your site, make the change and wait for your approval before it goes live.