Hardcoded sensitive information.
ID |
objectivec.storage.ios_hardcoded_secret |
Severity |
low |
Remediation Complexity |
medium |
Remediation Risk |
medium |
Remediation Effort |
medium |
Resource |
Storage |
Language |
Objective-C |
Description
Source files may contain hardcoded sensitive information like usernames, passwords, keys etc.
Rationale
Source files may contain hardcoded sensitive information like usernames, passwords, keys etc.
The following code illustrates a vulnerable pattern detected by this rule:
// ============================================
// POSITIVE CASES (should trigger findings)
// ============================================
void badHardcodedPassword() {
// VULNERABLE: Hardcoded sensitive information.
NSString *password = @"mysecretpass123";
}
Remediation
Follow secure coding practices and review the references below for detailed remediation guidance.
References
-
OWASP Top 10 2025 - A04 : Cryptographic Failures.