Skip to content
DeployAI
BlockerCode secrets_in_source

Secret key in source code

What it means

A secret key, such as an API key or a password, is written straight into the code.

Why it stops the deploy

Code passes between people and tools, and a key written in it is exposed. That is why we stop the upload.

How to fix it

  1. Delete the key from the code and read it from an environment variable.
  2. Replace the key at the service that issued it, because it is already exposed.

Prompt for your agent

Copy it and paste it into your agent. It fixes the project, explains each step, and runs the check again.

DeployAI check found this in the project: Secret key in source code.
Remove the secret from the code and read it from an environment variable instead. Tell the user to rotate that key, because it was exposed. Never print the secret value.
Explain your plan and wait for my approval before architectural changes. Do not remove features without asking.
Explain every step to me in simple words.
When done, run: npx deployai@latest check