The file has no special protections associated with it.
ID |
objectivec.storage.ios_file_perm |
Severity |
low |
Remediation Complexity |
medium |
Remediation Risk |
medium |
Remediation Effort |
medium |
Resource |
Storage |
Language |
Objective-C |
Rationale
The file has no special protections associated with it.
The following code illustrates a vulnerable pattern detected by this rule:
// ============================================
// POSITIVE CASES (should trigger findings)
// ============================================
void badFileProtectionNone() {
NSString *filePath = @"/path/to/file";
NSError *error = nil;
// VULNERABLE: The file has no special protections associated with it.
NSDictionary *attributes = @{NSFileProtectionKey: NSFileProtectionNone};
[[NSFileManager defaultManager] setAttributes:attributes ofItemAtPath:filePath error:&error];
}
Remediation
Follow secure coding practices and review the references below for detailed remediation guidance.
References
-
OWASP Top 10 2025 - A04 : Cryptographic Failures.