Skip to content

Fail closed on ambiguous MobileMe plist matches #81

@pheidon

Description

@pheidon

Problem / intent

icloud-cli currently mines ~/Library/Preferences/MobileMeAccounts.plist by walking every nested dictionary and taking the first shape that looks plausible. That is convenient, but it is also order-dependent and can silently bind to the wrong account/device record if Apple changes the cache layout or if multiple matching dictionaries appear.

Acceptance criteria

  • Make storage status and devices list reject ambiguous matches instead of returning the first plausible nested dictionary.
  • Prefer explicit anchors or a narrow schema path where possible.
  • If the cache shape changes, fail closed with a clear unreadable/unsupported-cache error rather than emitting stale data.
  • Add fixtures that prove the parser prefers the intended account block and does not accept unrelated nested dictionaries.

Validation commands

bash scripts/ci/run-fast-checks.sh
swift test

Notes

  • Keep the command read-only.
  • Do not broaden the parser just to rescue old cache shapes unless the shape is documented and tested.

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:dataData, schema, storage, privacy, or migration surface.kind:bugBug fix.risk:domainDomain correctness risk requiring subject-matter review.state:ready-for-agent

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions