FM-046 Security and Identity

Security Policy and Secret Leakage Failures

Credentials, tokens, or internal configuration appear in logs, error responses, debugging endpoints, or diagnostic headers.

Failure explanation

Secrets or sensitive operational information appear in API responses, logs, traces, error messages, diagnostic endpoints, or headers. Even if normal requests are secure, exception handling may expose stack traces, connection strings, access tokens, API keys, internal hostnames, or personal data. Observability systems can become an unintended disclosure channel.

Example

An invalid request triggers a database exception, and the API returns a 500 body containing a JDBC connection string and database hostname. The same exception is copied into application logs with an authorization bearer token.

How to test

  • Trigger representative validation, authentication, and server errors using synthetic secrets.
  • Inspect response bodies, headers, logs, traces, and diagnostic output.
  • Verify masking, redaction, access control, and retention policy.
  • Ensure test artifacts themselves do not store live credentials.

Expected behavior

Secrets are never returned to unauthorized clients or written to unprotected telemetry. External errors are safe and actionable; detailed diagnostics remain access-controlled.

Runnable examples

Each example includes a broken server, a fixed server, an OpenAPI spec, and a clrsig scenario that detects the failure.