Language: TypeScript
Label: safe
CWE: CWE-287 \u2014 Improper Authentication
When an actor claims to have a given identity, the product does not prove or insufficiently proves that the claim is correct.

Code:
function getServiceAccountApiToken(): string {
  const serviceAccountApiToken = randomUUID();
  console.log(
    `Generated new service account API token ${serviceAccountApiToken}`,
  );
  return serviceAccountApiToken;
}