High severityPHPAuthentication & SecretsMEDIUM confidence
Hardcoded Credentials
A credential or secret appears to be hardcoded as a string literal (CWE-798).
Standards mapping
- OWASP ASVS
- V6.4.1 (L2)V2.10.4 (L2)
Vulnerable vs. safe
Flagged by this check
$password = "s3cr3tP@ssw0rd";Passes - the safe pattern
$password = getenv("APP_PASSWORD");Why it matters & how to fix it
A credential or secret appears to be hardcoded as a string literal (CWE-798). Hardcoded secrets are exposed to anyone with source access and cannot be rotated easily. Load secrets from environment variables (getenv()) or a secrets manager, and remove the value from version control.
References
Rule ID integsec-php-hardcoded-credentials - engine: Opengrep - license: MIT - Copyright (c) IntegSec Inc.
TurboPentest runs this check automatically
Connect a GitHub repo and this check runs on every white-box pentest - AI-validated and reported with proof, from $99 per target.
Start a pentestRelated checks
- JavaScript / TypeScript - Authentication & SecretsHardcoded JWT Secret
- JavaScript / TypeScript - Authentication & SecretsHardcoded Secret
- JavaScript / TypeScript - Authentication & SecretsInsecure Cookie Flags
- JavaScript / TypeScript - Authentication & SecretsJWT Algorithm None
- JavaScript / TypeScript - Authentication & SecretsJWT Decode Without Verify
- JavaScript / TypeScript - Authentication & SecretsTLS Verification Disabled