ethan zhou ed56c8b2ca Fix scanner false positives/negatives + harden temp creds
Tier 0 (verdict integrity), scanner-correctness batch:

- privacy: Required Reason stat()/statfs()/fstat() patterns now match real call
  sites with arguments (stat(path, &st)), not only the argument-less stat()
  form that almost never appears in source. Drop the broken \\.standard\\.
  UserDefaults clause (matched a literal backslash; UserDefaults already covers
  the real case).
- codescan: hardcoded-ipv4 validates 0-255 octets so version/build strings like
  "2020.10.5.1" / "8.4.1.2" aren't misread as IPv4; widen the ignore to
  version/build/sdk/revision lines.
- codescan: platform-reference no longer matches bare unquoted tokens (fired on
  virtually every React Native app via Platform.OS); only string/JSX literals,
  with ignores for Platform.*, imports, package names, and build config.
- preflight: drain the previously-swallowed scanner error channel so a crashed
  sub-scanner surfaces as a WARN instead of a clean "no issues found".
- verify: write the credential-bearing temp YAML at 0600, not 0644.
- Tests covering each regex change.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-26 11:14:02 -07:00
..