Scanner: semgrep Severity: medium Rule: cra-ai-14-objc-secret-in-userdefaults CWE: CWE-312 CRA: cra-ai-14 — Speicher-Schutz (Data at Rest) (Annex I)
Description
A password, token or key is stored in NSUserDefaults, an unencrypted plist in the app container that backups and device extraction read (CWE-312). Store it in the Keychain (kSecClassGenericPassword, with a ThisDeviceOnly accessibility).
## medium Finding
**Scanner:** semgrep
**Severity:** medium
**Rule:** cra-ai-14-objc-secret-in-userdefaults
**CWE:** CWE-312
**CRA:** cra-ai-14 — Speicher-Schutz (Data at Rest) (Annex I)
### Description
A password, token or key is stored in NSUserDefaults, an unencrypted plist in the app container that backups and device extraction read (CWE-312). Store it in the Keychain (kSecClassGenericPassword, with a ThisDeviceOnly accessibility).
### Location
**File:** `compliance-agent/rules/cra_semgrep_objc.m` (line 8)
### Code
```
[[NSUserDefaults standardUserDefaults] setObject:password forKey:@"pumpPassword"];
```
---
*Fingerprint:* `877bacc39c8a5fd6f7bbc6064282cb20d55631d06ba87168f321f712766ce186`
*Generated by compliance-scanner*
[Open in Prüfwerk / In Prüfwerk öffnen](https://pruefwerk.breakpilot.com/findings?target=6ae9aa2160f5d8045fc570a7)
Prüfwerk: Die Datei liegt in Testdaten (z. B. fixtures/ oder testdata/), die von der Prüfung ausgenommen sind.
The file lies in test data (such as fixtures/ or testdata/), which is left out of the scan.
**Prüfwerk:** Die Datei liegt in Testdaten (z. B. fixtures/ oder testdata/), die von der Prüfung ausgenommen sind.
The file lies in test data (such as fixtures/ or testdata/), which is left out of the scan.
Prüfwerk: Die Datei liegt in Testdaten (z. B. fixtures/ oder testdata/), die von der Prüfung ausgenommen sind.
The file lies in test data (such as fixtures/ or testdata/), which is left out of the scan.
**Prüfwerk:** Die Datei liegt in Testdaten (z. B. fixtures/ oder testdata/), die von der Prüfung ausgenommen sind.
The file lies in test data (such as fixtures/ or testdata/), which is left out of the scan.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
medium Finding
Scanner: semgrep
Severity: medium
Rule: cra-ai-14-objc-secret-in-userdefaults
CWE: CWE-312
CRA: cra-ai-14 — Speicher-Schutz (Data at Rest) (Annex I)
Description
A password, token or key is stored in NSUserDefaults, an unencrypted plist in the app container that backups and device extraction read (CWE-312). Store it in the Keychain (kSecClassGenericPassword, with a ThisDeviceOnly accessibility).
Location
File:
compliance-agent/rules/cra_semgrep_objc.m(line 8)Code
Fingerprint:
877bacc39c8a5fd6f7bbc6064282cb20d55631d06ba87168f321f712766ce186Generated by compliance-scanner
Open in Prüfwerk / In Prüfwerk öffnen
Prüfwerk: Die Datei liegt in Testdaten (z. B. fixtures/ oder testdata/), die von der Prüfung ausgenommen sind.
The file lies in test data (such as fixtures/ or testdata/), which is left out of the scan.
Prüfwerk: Die Datei liegt in Testdaten (z. B. fixtures/ oder testdata/), die von der Prüfung ausgenommen sind.
The file lies in test data (such as fixtures/ or testdata/), which is left out of the scan.