Guides · ← All guides · Published November 14, 2026 · Reviewed November 14, 2026 · Ingenious AI team · 7 min read

Passwords and Secret Assignments in Eval Configuration Files

Not every secret has a famous prefix. The assignment-shaped ones — a name, an equals sign, a quoted value — are the class that catches the rest.

The short answer: a line in your declared eval files assigns a quoted value to a secret-shaped name — password, client_secret, auth_token, db_password, api_key and their variants. EvalEgress flags it as generic_secret_assignment (HIGH, weight 15), with the value redacted and only presence, file and line reported. Treat each one as a live credential until proven otherwise: rotate the value, remove the assignment, load the replacement from a secrets manager or environment variable at runtime, and re-scan with the free scan — this class is the net that catches the credentials the named patterns miss.

What is a secret assignment?

A secret assignment is a configuration line that binds a secret-named variable to a literal value: a name containing api_key, client_secret, auth_token, access_token, passwd, password or db_password, followed by a quoted string of eight or more characters. It is how the majority of real-world credentials actually appear in files — not as recognisable token formats, but as ordinary settings. EvalEgress matches that shape as class generic_secret_assignment, HIGH severity.

Why does a catch-all class matter as much as the named ones?

The named classes — an AKIA key, an sk- key, a GitHub token — catch credentials with distinctive shapes. Most credentials have no shape. A database password invented by a developer, a client secret issued by an internal service, a basic-auth password for a staging endpoint: in a file they are all just a name and a quoted string. A scanner that only matched famous formats would certify folders full of exactly these. The assignment class exists so the report reflects how secrets really live in configs, not how token vendors format them.

It is also the class most likely to fire on a file the team believes is clean. The named keys get handled — someone remembers pasting the AWS key. The staging database password, set in 2024 and unchanged since, is furniture. Its presence in an eval config means the eval environment can authenticate to that database with standing credentials, which is precisely the reach the eval-to-production boundary is about: see eval-to-production exposure for the boundary model.

How do you tell a real secret from a placeholder?

Read the line yourself — the report deliberately does not show the value, so the judgement is yours, made in the file at the reported line. Real values are high-entropy or meaningful-but-specific; placeholders say so (changeme, example, your-password-here). If a placeholder is genuinely inert, the professional move is to make that obvious in the file — a comment naming it as a dummy — and record the decision, so the next reader does not have to re-litigate it.

When in doubt, rotate. The asymmetry is stark: rotating a value that turned out to be a placeholder costs minutes, while leaving a live staging password in a shared eval folder because it looked like a placeholder costs whatever the password protects. Staging values deserve particular suspicion — staging databases hold production-shaped data, staging endpoints share production credentials more often than anyone admits, and 'it is only staging' is the epitaph of a large fraction of real incidents.

What replaces an assignment once it is removed?

The harness reads the value at runtime from outside the declared files: a secrets manager lookup, or an environment variable set by the runner and never written to disk in the workspace. The config keeps the name and drops the value — db_password becomes a reference to where the password lives. That shape matches no credential pattern, because it contains no credential, and it documents itself for the next engineer.

Apply the replacement to the whole class of files, not just the flagged line. A folder with one literal password usually has siblings — the second environment block, the fallback config, the test settings copied from the real ones. The re-scan after the fix is what proves the folder, rather than the line, is clean; and because this class is a shape rather than a specific value, the same scan keeps working when next quarter's config introduces a differently-named secret.

Worked example: Tern & Co Accounting, scored end to end

Example. Tern & Co, a fictional accounting-software firm, evaluated an invoice-extraction model. The eval connected to a staging database using a config copied from the application, password assignment included, and the harness policy file still granted a service-wide wildcard from an early experiment. The scan of the declared set returned:

FindingClassSeverityWeight
Database password assignment in the copied app configgeneric_secret_assignmentHIGH15
Service-wide IAM wildcard ("s3:*") in the harness policywildcard_iam_serviceHIGH15
Debug mode enabled in the copied settingsdebug_mode_enabledMEDIUM8

The arithmetic: 15 + 15 + 8 = 38 points of exposure, so the score is 100 − 38 = 62/100, grade C. 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.

The staging password was rotated — which also forced the application staging config to load it from the secrets manager, a fix the team had postponed for a year. The eval config kept only the variable name. The wildcard was narrowed to the two actions the harness actually called, on the eval bucket alone, and debug was disabled. The re-scan reported zero findings, and the firm's config template changed for every service: secret-named settings ship with a manager reference, never a literal.

Close a generic_secret_assignment finding: the five actions

Assume live, then prove otherwise:

  1. Read each flagged line in the file and judge it yourself. The report gives file and line with the value redacted; placeholders get documented as placeholders, everything else is treated as live.
  2. Rotate every live value at its source. Database passwords, client secrets and tokens are changed where they are checked — not merely removed from the eval copy.
  3. Replace assignments with references. The config keeps the setting name and points at the secrets manager or environment; the literal value leaves the declared files entirely.
  4. Sweep the sibling configs, not just the flagged file. Fallback blocks, test settings and copied environment files carry the same assignments; the fix covers the folder.
  5. Re-scan and keep both reports. A clean re-scan of the full declared set is the proof; the original report is the record of what was exposed and when it closed.

This is the class that makes the scan honest: most secrets are not famous formats, they are lines that look like settings. The naming and rotation discipline here pairs with the pre-deployment checklist before any production-connected run.

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, JWT token declared in an eval environment, wildcard IAM action in an eval role policy, service-wide IAM wildcard in an eval policy. EvalEgress is one of the Ingenious AI platforms.

Sources

Frequently asked questions

Which names does generic_secret_assignment actually match?
Assignments whose name contains api_key, client_secret, auth_token, access_token, passwd, password or db_password, bound to a quoted value of eight or more characters — the shapes under which real credentials sit in real configs.

My flagged value is literally 'password123' for a local test database. Still a problem?
A small one, and a revealing one: the habit that left it there leaves real values elsewhere. Rotate it anyway, replace it with a reference, and let the clean scan stand — local test credentials have a way of being reused on staging.

Why is the value redacted if I pasted the file myself?
Because reports get shared, archived and exported in ways files do not. Redaction means the report can travel to reviewers and tickets without becoming a second copy of the secret.

Does an environment-variable reference still trigger the class?
No — the class matches a literal quoted value assigned in the file. A reference to a manager path or an environment name contains no credential, which is exactly the end state the remediation aims at.

How is this different from generic_api_key?
generic_api_key matches a specific famous shape — the sk- key — wherever it appears. generic_secret_assignment matches the assignment structure itself: a secret-shaped name bound to a literal, whatever the value's format.