تخطَّ إلى المحتوى

Insecure Deserialization (ARCH9109)

هذا المحتوى غير متوفر بلغتك بعد.

Key swift.security.insecure-deserialization · Severity critical · Category security · CWE CWE-502

Flags NSKeyedUnarchiver.unarchiveObject(with:) / unarchiveTopLevelObjectWithData and requiresSecureCoding = false.

let obj = NSKeyedUnarchiver.unarchiveObject(with: data)
let obj = try NSKeyedUnarchiver.unarchivedObject(ofClass: Payload.self, from: data)

Use the secure-coding API with an explicit class allowlist, or Codable.