HIGH AI PREVALENCE: HIGH auth.csharp.cors.reflect-any-origin-credentials
A CORS policy combines credentialed requests with a wildcard or reflected origin (AllowCredentials() together with AllowAnyOrigin() or SetIsOriginAllowed(...) that returns true for everything).
Why AI tools produce this: AI coding tools generate this anti-pattern by default, it appears in a large share of AI-written auth code.
Why this matters
This lets any website make cross-origin requests carrying the user's cookies and read the response, which is a cross-site data-theft and CSRF primitive (CWE-942). This is a common AI-generated mistake made to "just make CORS work".
Never pair AllowCredentials() with a wildcard/reflected origin. Pin an explicit allow-list with WithOrigins("https://app.example.com") and only then call AllowCredentials().
VULNERABLE
SAFE
Suppressing this rule
If a finding is a genuine false positive, scope the suppression to the exact line and leave a reason, never disable the rule project-wide. Disable directives are line-scoped by design.
// oauthlint-disable-next-line auth.csharp.cors.reflect-any-origin-credentials -- <reason>