How to separate CI coding-agent secrets from local credentials
Use a job-specific identity and pass only the variables the task needs. Avoid giving automation your personal shell or broad build secrets.
Example
A CI workflow needs to submit a code-review request, but should never receive production deployment tokens.
What to do
- Inventory job environment variables and distinguish model access from deployment. Give the agent job its own workspace and test credentials.
- Avoid passing privileged values into steps triggered by untrusted contributions. Keep deployment outside the agent job's permissions.
- Run a fork or low-trust scenario with fictitious values and inspect retained artifacts for unintended credentials.
How to verify
The workflow can create a redacted review using its limited key and has no access to production deployment.
Limits
Input filtering does not limit what a CI identity can do. Scope repository and cloud permissions separately.