Skip to content

Commit baaadc8

Browse files
committed
readme and pattern updates
1 parent f92a99f commit baaadc8

File tree

3 files changed

+27
-8
lines changed

3 files changed

+27
-8
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
## CipherScope
22

3+
<div align="center">
4+
<img src="cipherscope.png" alt="CipherScope Logo" width="350" height="350">
5+
</div>
6+
37
Fast, low-false-positive static scanner that finds third-party cryptographic libraries and call sites across 11 programming languages: Go, Java, C, C++, Rust, Python, PHP, Swift, Objective-C, Kotlin, and Erlang.
48

59
### Install & Run

cipherscope.png

1.53 MB
Loading

patterns.toml

Lines changed: 23 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -335,11 +335,11 @@ include = [
335335
]
336336
apis = [
337337
"\\bFernet\\(",
338-
"\\.encrypt\\(",
339-
"\\.decrypt\\(",
340338
"\\bAESGCM\\(",
341339
"\\bhmac\\.HMAC\\(",
342340
"\\.finalize\\(",
341+
"\\b(?:cryptography\\.|from\\s+cryptography\\s+import).*?\\.(?:encrypt|decrypt)\\(",
342+
"\\b(?:Fernet|AESGCM|ChaCha20Poly1305|AES|Blowfish|CAST5|ARC4|ChaCha20|Salsa20|XOR)\\(",
343343
"\\.verify\\(",
344344
"\\.sign\\(",
345345
]
@@ -354,11 +354,11 @@ include = [
354354
]
355355
apis = [
356356
"\\bCrypto\\.Cipher\\.AES\\.new\\(",
357-
"\\.encrypt\\(",
358-
"\\.decrypt\\(",
359357
"\\bCrypto\\.Hash\\.HMAC\\.new\\(",
360358
"\\bCrypto\\.Signature\\.pkcs1_15\\.new\\(.*\\)\\.sign\\(",
361359
"\\bCrypto\\.Signature\\.pkcs1_15\\.new\\(.*\\)\\.verify\\(",
360+
"\\bCrypto\\.(?:Cipher|Hash|Signature|Protocol|PublicKey)\\.",
361+
"\\b(?:AES|DES|DES3|Blowfish|CAST|ARC2|ARC4|ChaCha20|Salsa20|XOR)\\(",
362362
]
363363

364364
[[library]]
@@ -386,10 +386,8 @@ apis = [
386386
"\\bSigningKey\\.sign\\(",
387387
"\\bVerifyKey\\.verify\\(",
388388
"\\bSignedMessage\\.",
389-
"\\.encrypt\\(",
390-
"\\.decrypt\\(",
391-
"\\.sign\\(",
392-
"\\.verify\\(",
389+
"\\bnacl\\.(?:secret|signing|encoding|hash|pwhash)\\.",
390+
"\\b(?:SecretBox|SigningKey|VerifyKey|SignedMessage)\\.",
393391
"\\bHexEncoder",
394392
"\\bBase64Encoder",
395393
]
@@ -530,6 +528,23 @@ apis = [
530528
"\\bTINK(?:Aead|Mac|Hybrid(?:Encrypt|Decrypt)|PublicKey(?:Sign|Verify)|KeysetHandle|Config)\\b",
531529
"\\b\\[TINK[A-Za-z0-9_]+Factory\\s+[A-Za-z0-9_]+WithKeysetHandle:.*\\]",
532530
]
531+
# =========================
532+
# Google Tink (Python)
533+
[[library]]
534+
name = "Google Tink (Python)"
535+
languages = ["Python"]
536+
[library.patterns]
537+
include = [
538+
"^\\s*from\\s+tink\\b",
539+
"^\\s*import\\s+tink\\b",
540+
]
541+
apis = [
542+
"\\btink\\.(?:aead|mac|hybrid|signature|prf|streaming_aead)\\b",
543+
"\\b(?:JsonKeysetReader|JsonKeysetWriter|cleartext_keyset_handle|KeysetHandle)\\b",
544+
"\\b(?:Aead|Mac|HybridEncrypt|HybridDecrypt|PublicKeySign|PublicKeyVerify)\\b",
545+
"\\btink\\.core\\.PrimitiveSet\\b",
546+
]
547+
533548
# =========================
534549
# Erlang / OTP primitives
535550
# =========================

0 commit comments

Comments
 (0)