A Vapor CORSMiddleware.Configuration combines allowedOrigin: .all (the * wildcard) with allowCredentials: true.
Why AI tools produce this: AI coding tools produce this regularly, typically when prompted for a shortcut or a quick fix.
Why this matters
This tells browsers to send cookies and Authorization headers to a resource that accepts every origin, which lets any site read authenticated responses on the user's behalf, the classic wildcard-plus-credentials CORS misconfiguration (CWE-942). The browser will actually refuse * with credentials, so AI-generated fixes that "reflect the origin" recreate the same hole against every caller.
Restrict the origin to a known allow-list, e.g. allowedOrigin: .custom("https://app.example.com") (or .any([...])), or set allowCredentials: false if no cookies/credentials are needed.
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.swift.cors.wildcard-with-credentials -- <reason>