Guides · ← All guides · Published November 14, 2026 · Reviewed November 14, 2026 · Ingenious AI team · 7 min read
Using a Secrets Manager for Eval Credentials (So Files Stop Holding Keys)
The scanner's credential remediations all end at the same door. This guide walks through it: what the harness should hold (a reference), what it should never hold (a value).
The short answer: the eval harness should fetch credentials from a secrets manager at start-up, using its own scoped identity, and hold them in memory for the run — while its declared files contain only references: a secret path, a role name, an environment variable name. That shape matches no credential pattern, because it contains no credential. Read the remediations on any credential finding in an EvalEgress report and they converge on this sentence: rotate it, remove it from the file, load it from a secrets manager or environment variable at runtime. This guide covers the eval-specific structure — a dedicated eval identity, per-suite secrets, short lifetimes — so the arrangement survives contact with your second eval suite. Audit your current files with the free scan first; every credential class it finds is a secret asking for this treatment.
What is a secrets manager?
A secrets manager is a service that stores credential values centrally, issues them over an authenticated API to identities entitled to them, and logs every access. The alternative it replaces is distribution: values copied into the files of every workload that needs them, where they inherit each file's audience. For eval workloads the manager's access log doubles as evidence — who fetched the eval's secrets, when, is a record, not a recollection.
What should live where, concretely?
Values live in the manager, one secret per purpose: the eval's storage credential, its model-provider key, its service tokens — separated, so that rotating one (the response to any single finding) touches one workload path. References live in the declared files: the config names the secret's path and the identity that may fetch it, which is documentation a reviewer can audit without seeing a value. Identities live in the platform: the eval assumes a role or presents a workload identity whose entire entitlement is 'fetch these named secrets, call these named APIs' — the least-privilege shape the IAM classes in the scan are pushing toward from the other side.
At runtime the harness fetches at start-up, keeps values in memory, and lets them die with the process. Nothing is written back to disk in the workspace — no cache file, no .env the run generates for itself — because a runtime cache in the eval folder is just a declared file with extra steps, and the next scan should find the folder as clean as the design intends. Where a framework insists on environment variables, the runner injects them at launch from the manager; the file that names the variables still contains no values.
Why does this matter more for evals than for ordinary services?
Eval folders move. They are zipped for collaborators, committed to results repos, pasted into scanners and tickets, archived beside outputs for years. An ordinary service's config mostly stays on its servers; an eval's config has a social life. Every credential left in a declared eval file therefore accrues distribution the service's copy never would — the precise reason the scanner exists. The manager pattern is the only common credential arrangement whose safety is indifferent to the file's travels: the reference can be published in a talk slide and nothing is lost, because there is nothing in it to lose.
Evals also multiply. The second suite copies the first suite's harness — and, under the file pattern, its keys, now shared across suites with different data sensitivities. Under the manager pattern, the copy carries references to the first suite's secrets, which the second suite's identity cannot fetch — a failure that announces itself at start-up and forces the correct act: minting the second suite its own secrets, with its own scope and its own rotation path. Friction in the right place is a feature; the manager moves the friction there.
How do you migrate a folder full of declared secrets?
Finding by finding, in the scan's order — the report is the migration plan. For each credential class: create the secret in the manager (or the role that replaces it), point the harness at the reference, run a small eval to prove the path, then rotate the exposed value at its issuer, because the value in the file must be treated as known. Purge the file and its history last. The sequence per secret is under an hour of work for the common classes; a folder with five credential findings is a day, not a quarter — and the re-scan at the end, showing the credential classes gone from the same declared set, is the migration's certificate.
Institutionalise the landing state with two cheap rules. New eval secrets are born in the manager (there is no 'temporary file first' step to forget to undo), and the pre-run scan is the enforcement: a pasted value announces itself as a finding before the run, when the fix is a reference, rather than after, when it is a rotation. The rules' text belongs in the runbook, next to the pre-deployment checklist that operationalises them.
Worked example: Copperline Health Tech, scored end to end
Example. Copperline, a fictional health-tech firm, migrated its eval platform to a secrets manager after a scan of three suites' folders returned a credential in nearly every file that mattered. One suite's report was representative:
| Finding | Class | Severity | Weight |
|---|---|---|---|
| AWS secret access key assignment in the harness config | aws_secret_access_key | HIGH | 15 |
| Service API key (sk-) in the model config | generic_api_key | HIGH | 15 |
| Database password assignment in the app config | generic_secret_assignment | HIGH | 15 |
| JWT token pasted into the eval environment file | jwt_token | MEDIUM | 8 |
The arithmetic: 15 + 15 + 15 + 8 = 53 points of exposure, so the score is 100 − 53 = 47/100, grade D. Scoring uses EvalEgress's published weights — CRITICAL 25, HIGH 15, MEDIUM 8, LOW 3 — with grades at A ≥ 90, B ≥ 75, C ≥ 50 and D ≥ 25.
Each suite received its own identity and its own four secrets in the manager; harnesses now fetch at start-up and hold values in memory only. The exposed values were rotated at their issuers in the same week — the provider key first, as the only one with billing attached — and the files' histories were purged. The three suites' re-scans all reported zero findings, and the platform's new-suite template was changed at the root: it scaffolds references and a manager path, and contains no field in which a value could be pasted without deliberately disobeying the template.
Move eval credentials to a manager: the five actions
One secret at a time, in the scan's order:
- Inventory from a fresh scan of every suite's declared set. The credential findings are the migration backlog — class, file, line — with issuers noted beside each.
- Create per-suite identities and per-purpose secrets. One secret per purpose, fetchable only by its suite's identity; nothing shared across suites, so rotation and audit stay surgical.
- Refactor the harness to fetch at start-up, in memory only. References in the files, values in the process, nothing written back to the workspace — and environment injection done by the runner where a framework requires it.
- Prove each path with a small run, then rotate the old value. Rotation after the new path works, at the issuer, treating the filed value as known — then purge files and history.
- Make the landing state the default. New secrets are born in the manager, templates scaffold references only, and the pre-run scan catches any paste before it becomes a rotation.
The manager pattern is the destination every credential remediation names. The rotation order for the values already exposed is covered in the rotation playbook.
Keep checking the boundary
Run the free exposure scan on the files your next eval will run with. Compare plans, read the scoring documentation, and keep reading: what is eval-to-production exposure?, what is egress in AI evaluation?, pre-deployment eval safety checklist, how to stop an AI evaluation from reaching production secrets, rotating credentials found in eval files, purging secrets from eval repo history, isolating an eval environment from production. EvalEgress is one of the Ingenious AI platforms.
Sources
- EvalEgress scoring documentation — the 16 finding classes, severity weights and declared-surface scope every judgement in this guide applies, published 2026.
- What Is Eval-to-Production Exposure? — the companion guide this page builds on, published November 7, 2026.
- The free EvalEgress scan — the declared-file scan this guide's checks are performed with.
Frequently asked questions
Is an environment variable as good as a secrets manager?
The scanner's remediation names both, and either beats a declared file. The manager adds central rotation, per-secret scoping and an access log — worth it once more than one suite or one operator is involved. What neither option permits is a value in a file.
What identity does the harness use to fetch secrets?
Its own scoped workload identity — a role it assumes, entitled to fetch the named secrets for its suite and to call the APIs the eval calls. Broad personal credentials fetching secrets would re-create the problem one layer up.
Should the harness cache fetched secrets to disk for speed?
No. A cache file in the workspace is a declared file holding values — the exact pattern being retired. Fetch at start-up, hold in memory, pay the milliseconds.
How do we handle a secret the eval shares with the application?
Treat the sharing as the smell: the eval gets its own credential for the shared system, scoped to the eval's use, so its rotation, caps and audit are independent of the product's.
Does the scan distinguish a reference from a value?
Yes — the credential classes match values and value-shapes. A manager path, a role name or an environment variable name contains no credential and matches nothing; that clean result is the design's receipt.