Follow-up azure

This commit is contained in:
Zach committed 2023-06-15 07:38:22 -05:00
1 parent 7911ac60d7
commit 4a1ce8d02f
4 files changed
+328 -487

No files matched your search

+1 -172
View File
@@ -154,177 +154,6 @@ keywords = [
"mii",
]
[[rules]]
description = "CSCAN0240 - Found Azure Devops personal access token in source file."
id = "azure-devops-pat"
regex = '''(?i)\b((access_token).*?['="][a-zA-Z0-9/+]{10,99}['"])(?:['|\"|\n|\r|\s|\x60|;]|$)'''
secretGroup = 1
keywords = [
]
[[rules]]
description = "CSCAN0200 - Found Azure DevDiv TFVC repo secrets."
id = "azure-devtfvc-secrets"
regex = '''(?i)\b(enc_username=.+[\n\r\s]+enc_password=.{3,})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
secretGroup = 1
keywords = [
]
[[rules]]
description = "CSCAN0160 - Found Azure domain credential in source file."
id = "azure-network-credential"
regex = '''(?i)\b(NetworkCredential\((\s*).*,(\s*).*,(\s*)(corp|europe|middleeast|northamerica|southpacific|southamerica|fareast|africa|redmond|exchange|extranet|partners|extranettest|parttest|noe|ntdev|ntwksta|sys-wingroup|windeploy|wingroup|winse|segroup|xcorp|xrep|phx|gme|usme|cdocidm|mslpa)\))(?:['|\"|\n|\r|\s|\x60|;]|$)'''
secretGroup = 1
keywords = [
]
[[rules]]
description = "CSCAN0160 - Found Azure domain credential in source file."
id = "azure-network-credential-dotnet"
regex = '''(?i)\b(new-object\s*System.Net.NetworkCredential\(.*?,\s*['"][^"]+['"])(?:['|\"|\n|\r|\s|\x60|;]|$)'''
secretGroup = 1
keywords = [
]
[[rules]]
description = "CSCAN0160 - Found Azure domain credential in source file."
id = "azure-network-credential-schtasks"
regex = '''(?i)\b(schtasks.*/ru\s(corp|europe|middleeast|northamerica|southpacific|southamerica|fareast|africa|redmond|exchange|extranet|partners|extranettest|parttest|noe|ntdev|ntwksta|sys\-wingroup|windeploy|wingroup|winse|segroup|xcorp|xrep|phx|gme|usme|cdocidm|mslpa).*/rp.*)(?:['|\"|\n|\r|\s|\x60|;]|$)'''
secretGroup = 1
keywords = [
]
[[rules]]
description = "CSCAN0090 - Found Azure password, symmetric key or storage credential in source file."
id = "azure-password-addkey"
regex = '''(?i)\b([<add].*([key](s|[0-9])?|(credential)s?|(secret)(s|S|[0-9])?|[password|token|key](primary|secondary|orsas|sas|encrypted))['"]\s*value\s*=['"].*['"])(?:['|\"|\n|\r|\s|\x60|;]|$)'''
secretGroup = 1
keywords = [
]
[[rules]]
description = "CSCAN0090 - Found Azure password, symmetric key or storage credential in source file."
id = "azure-password-connstring"
regex = '''(?i)\b((connectionstring|connstring)[^=]*?=["'][^"']*?(password)=[^\$\s;][^"'\s]*?(;|['"]))(?:['|\"|\n|\r|\s|\x60|;]|$)'''
secretGroup = 1
keywords = [
]
[[rules]]
description = "CSCAN0090 - Found Azure password, symmetric key or storage credential in source file."
id = "azure-password-machinekey"
regex = '''(?i)\b((decryptionKey\s*\=\s*['"].*['"]|validationKey\s*\=\s*['"].*['"]))(?:['|\"|\n|\r|\s|\x60|;]|$)'''
secretGroup = 1
keywords = [
]
[[rules]]
description = "CSCAN0090, CSCAN0150 - Found Azure password, symmetric key or storage credential in source file."
id = "azure-password-uidpw"
regex = '''(?i)\b(((user) ?(id|name)|uid)=.{2,128}?\s*?;\s*?((password|(pwd))=[^'$%@'";\[\{][^;"']{2,350}?(;|"|')))(?:['|\"|\n|\r|\s|\x60|;]|$)'''
secretGroup = 1
keywords = [
]
[[rules]]
description = "CSCAN0090 - Found Azure password, symmetric key or storage credential in source file."
id = "azure-password-value-string"
regex = '''(?i)\b(value\s?=\s?['"]((([A-Za-z0-9+/]){4}){1,200})==['"])(?:['|\"|\n|\r|\s|\x60|;]|$)'''
secretGroup = 1
keywords = [
]
[[rules]]
description = "CSCAN0030, CSCAN0090, CSCAN0150 - Found Azure storage credential in source code file."
id = "azure-storage-credential-43char"
regex = '''(?i)\b([a-zA-Z0-9/+]{43}=[^{@\d%])(?:['|\"|\n|\r|\s|\x60|;]|$)'''
secretGroup = 1
keywords = [
]
[[rules]]
description = "CSCAN0030, CSCAN0090, CSCAN0150 - Found Azure storage credential in source code file."
id = "azure-storage-credential-86char"
regex = '''(?i)\b([ \t]{0,10}[a-zA-Z0-9/+]{86}==)(?:['|\"|\n|\r|\s|\x60|;]|$)'''
secretGroup = 1
keywords = [
]
[[rules]]
description = "CSCAN0030 - Found Azure storage credential in source code file."
id = "azure-storage-credential-accountkey"
regex = '''(?i)\b(AccountKey\s*=\s*MII[a-zA-Z0-9/+]{43,}?={0,2})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
secretGroup = 1
keywords = [
]
[[rules]]
description = "CSCAN0110 - Found Azure storage credential in source code file."
id = "azure-storage-credential-bloburl"
regex = '''(?i)\b((?i)https://[a-zA-Z0-9-]+.blob.core.windows.net/.*?sig=[a-zA-Z0-9%]{30,})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
secretGroup = 1
keywords = [
]
[[rules]]
description = "CSCAN0130 - Found Azure storage credential in MonitoringAgent config file."
id = "azure-storage-credential-monikerkey"
regex = '''(?i)\b(Account moniker\s?=.*key\s?=.*)(?:['|\"|\n|\r|\s|\x60|;]|$)'''
secretGroup = 1
keywords = [
]
[[rules]]
description = "CSCAN0100 - Found Azure storage credential in source code file."
id = "azure-storage-credential-servicebus"
regex = '''(?i)\b([<ServiceBusAccountInfo].*SharedAccessKey\s*=\s*[a-zA-Z0-9/+]{10,}['"])(?:['|\"|\n|\r|\s|\x60|;]|$)'''
secretGroup = 1
keywords = [
]
[[rules]]
description = "CSCAN0030, CSCAN0090, CSCAN0150 - Found Azure storage credential in source code file."
id = "azure-storage-credential-sig53"
regex = '''(?i)\b(((sig|sas|password)=|>)[a-zA-Z0-9%]{43,53}%3d[^{a-zA-Z0-9%])(?:['|\"|\n|\r|\s|\x60|;]|$)'''
secretGroup = 1
keywords = [
]
[[rules]]
description = "CSCAN0030 - Found Azure storage credential in source code file."
id = "azure-storage-credential-useridpw"
regex = '''(?i)\b(((user) ?(id|name)|uid)=.{2,128}?\s*?;\s*?((password)|(pwd))=[^'$%>@'";\[\{][^;"']{2,350}?(;|"|'))(?:['|\"|\n|\r|\s|\x60|;]|$)'''
secretGroup = 1
keywords = [
]
[[rules]]
description = "CSCAN0100 - Found Azure storage credential in source code file."
id = "azure-storage-credential-xstore"
regex = '''(?i)\b([<XstoreAccountInfo].*accountSharedKey\s*=\s*['"].*['"])(?:['|\"|\n|\r|\s|\x60|;]|$)'''
secretGroup = 1
keywords = [
]
[[rules]]
description = "Beamer API token"
id = "beamer-api-token"
@@ -2566,7 +2395,7 @@ id = "openai-api-key"
regex = '''(?i)\b(sk-[a-zA-Z0-9]{20}T3BlbkFJ[a-zA-Z0-9]{20})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
secretGroup = 1
keywords = [
"sk-","t3blbkfj",
"t3blbkfj",
]
[[rules]]