crypto-inventory 0.4.0: Swift and Kotlin detectors (CryptoKit, CommonCrypto, Security.framework, Android Keystore, Tink, OkHttp, the libsignal Swift and Android APIs), Apple and Android manifests; remediation recipes for Apache and HAProxy measured on real servers, HAProxy precondition fixed

This commit is contained in:
Aere Network committed 2026-10-18 08:53:13 +03:00
1 parent e453c0c42d
commit b6ed4d2b71
37 files changed
+1623 -82

No files matched your search

@@ -0,0 +1,22 @@
// Fixtura negativa Swift: Security importat pentru SecRandomCopyBytes (aleator, nu criptografie; forma din libsignal
// swift/Sources/LibSignalClient/Utils.swift:258-267), si numele API-urilor libsignal si CryptoKit FARA importurile lor: un fisier
// care nu importa modulul nu poate chema acel API, deci nu e o folosire. Nicio gasire.
import Foundation
#if canImport(Security)
import Security
#endif
func fillRandom(_ buffer: inout [UInt8]) throws {
let result = SecRandomCopyBytes(kSecRandomDefault, buffer.count, &buffer)
guard result == errSecSuccess else {
throw NSError(domain: "SecRandomCopyBytes failed (error code \(result))", code: Int(result))
}
}
func faraImport() {
let id = IdentityKeyPair.generate()
let d = SHA256.hash(data: Data())
let k = KEMKeyPair.generate()
let s = try? Aes256GcmSiv(key: [UInt8]())
_ = (id, d, k, s)
}