Skip to main content
A security agent that fixes a vulnerable dependency or base image, tests the fix on a copy of production, and then deploys the patched commit to production. In production it can only deploy a named commit of the listed applications. Level: Change. See all the agent policy examples.

What the agent does

  1. Fixes the vulnerability in the code or the Dockerfile, on a branch (in your Git provider).
  2. Clones production into the sandbox project and deploys the patched branch on the copy.
  3. Runs the tests on the copy, then deletes it.
  4. Deploys the patched commit to production and checks the service is healthy.

What the policy allows

The agent can

  • Find the organization, projects, environments and clusters by name
  • Read the production environment, except environment variables
  • Clone production into the sandbox project, on the non-production cluster
  • Deploy, change, test and delete anything inside the sandbox project
  • Deploy a named commit of the listed production applications

The agent cannot

  • Change production configuration or environment variables
  • Redeploy, stop or delete anything in production
  • Deploy an application that is not listed
  • Clone or move anything from the sandbox into production
Anything the policy does not allow is refused with 401 Unauthorized.

The policy

Copy it, then replace each REPLACE_WITH_... value with a real ID from your organization.
patch-security-issue.rego
You can copy the IDs from the Console URL, or list them with qovery project list, qovery environment list and qovery application list.

Create the token

In a session signed in as an organization Owner or Admin, ask:
The qovery-policy-token skill finds the IDs, writes a policy like the one above, tests it locally and against the API, then creates the token.

Prompt for the agent

The agent runs with the Qovery Agent Skills and the Qovery CLI, in Claude Code, Codex, Cursor or any agent that supports skills. Give it the token through the environment, never in the prompt:
Then give the agent its task:
Every call the agent makes appears in the audit logs as policy:<token-id>:<token-name>.

Good to know

  • The policy allows deploying any named commit of the listed applications. Protect your main branch with code review if a human must approve the code itself.
  • A clone copies environment variables. Check that the copy does not point to a production database before the first run.
  • To release to a small part of production first, you need a canary setup in your application or your ingress. The policy does not change how a deploy is rolled out.

All agent policy examples

Every use case, from read only to production changes.

API Policy Token (Preview)

How policies are evaluated, the input they see, and the limits.