How do you protect secrets and limit the permissions of the app and the deployment process?
Answer out loud or in your head first, then compare.
Answer
Every program should get only the access its work requires. A queue consumer doesn't need rights to all of the company's data. I don't store keys and passwords in the repo or paste them into a conversation with an agent. Using an environment variable alone doesn't close every way of leaking.
In CI/CD, i.e. automated checking and deployment, you can use a short-lived identity instead of a permanent key. You need to restrict which repos and runs can receive it. Untrusted code from a PR shouldn't get production secrets. A generated test is code too, and it can read or send something.
Why it matters: The basis of working safely with AWS and coding agents.
Possible follow-ups: Can every test from an external PR use deployment permissions?
How did it go? Be honest — “Not yet” puts the question on your review list.
Start with
- E-P01 · What is cloud computing? — AWS, Cloudflare and infrastructure
- E-P03 · What is Cloudflare, and what is it for? — AWS, Cloudflare and infrastructure
- E-P04 · How does Cloudflare differ from AWS? — AWS, Cloudflare and infrastructure
Further reading
- Microsoft Graph: Overview of permissions(opens in a new tab)Docs; accessed 22.10.2026. Delegated and application permissions, and the limits of access.