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:
1 parent
e453c0c42d
commit
b6ed4d2b71
37 files changed
+1623
-82
No files matched your search
@@ -0,0 +1,23 @@
|
||||
// Fixtura negativa Kotlin: comentarii IMBRICATE, siruri obisnuite cu escape-uri, siruri brute """...""", sabloane ${ } cu apeluri si
|
||||
// siruri inauntru, literale char (inclusiv '"' si '\''): niciunul nu e o folosire si niciunul nu are voie sa deschida un sir peste
|
||||
// codul de dupa el. Numele JCA nu au nevoie de ancora, deci daca lexerul greseste, gasirea apare.
|
||||
package fixturi
|
||||
|
||||
/* import javax.crypto.Cipher
|
||||
/* val c = Cipher.getInstance("AES/ECB/PKCS5Padding") */
|
||||
val md = MessageDigest.getInstance("MD5")
|
||||
*/
|
||||
|
||||
/** KeyPairGenerator.getInstance("RSA") intr-un comentariu KDoc nu e o folosire. */
|
||||
class Comentarii {
|
||||
fun nimic(x: Int): String {
|
||||
val ghilimea = '"'
|
||||
val apostrof = '\''
|
||||
val unicode = 'A'
|
||||
val brut = """MessageDigest.getInstance("MD5") si Cipher.getInstance("DES") "ghilimele" """
|
||||
val sablon = "k=${listOf("MessageDigest.getInstance(\"SHA-1\")", "${x}").size} $x MessageDigest.getInstance(\"MD5\")"
|
||||
val text = "KeyPairGenerator.getInstance(\"RSA\") \\ CertPathValidator.getInstance(\"PKIX\")"
|
||||
val tm = "javax.net.ssl.X509TrustManager si TrustManagerFactory.getInstance(\"PKIX\")"
|
||||
return brut + sablon + text + tm + ghilimea + apostrof + unicode
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user