[medium] semgrep: A password, token or key is stored in NSUserDefaults, an unencrypted plist in the app container that backups and device… #903

Closed
opened 2026-11-05 16:55:12 +00:00 by pruefwerk · 2 comments
Member

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

## 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)
pruefwerk added the severity:mediumcra:annex-ipruefwerk labels 2026-11-05 16:55:12 +00:00
Author
Member

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.
Author
Member

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.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: platform/pruefwerk#903