-
Notifications
You must be signed in to change notification settings - Fork 474
proofpoint_on_demand: fix handling of objects with whitespace keys #13541
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
The key is whitespace, which gets past our checks at the end of the pipeline.
@@ -19,3 +19,4 @@ | |||
{"final_rule":"clean","connection":{"country":"us","sid":"2abcdefgs98n3","protocol":"smtp:smtp","ip":"89.160.20.112","tls":{"inbound":{"cipherBits":128,"version":"TLSv1.2","cipher":"ECDHE-RSA-AES128-GCM-SHA256"}},"helo":"mail-abcd-1234.google.com","host":"mail-abcd-1234.google.com","resolveStatus":"ok"},"pps":{"agent":"m0000001.ppops.net","cid":"pphosted_prodmgt_hosted","version":"8.14.0.396"},"final_module":"av","action_dmarc":[{"rule":"pass","action":"continue","module":"dmarc"}],"ts":"2024-05-10T08:14:49.410504-0800","final_action":"continue","action_spf":[{"rule":"test_5_pass","action":"continue","module":"spf"},{"rule":"pass","action":"continue","module":"spf"}],"msg":{"header":{"toHashed":["a7e7e2f59b128bdb0aa60f56f5211efe@example.net"],"to":["temple@example.net"],"from":["G Suite Alerts <gsuite-alerts-noreply@google.com>"],"message-id":["<Rohkdsbvbkousdvbdsvpf8ITrw.0@notifications.google.com>"],"subject":["G Suite Alert: test123"],"fromHashed":["dc8352b494f0b14f0baefd8eb51e47ec@google.com>"]},"sizeBytes":6637,"lang":"en"},"filter":{"routeDirection":"inbound","durationSecs":0.656005,"startTime":"2020-02-07T08:34:49.410504-0800","isMsgEncrypted":false,"disposition":"continue","isMsgReinjected":false,"quarantine":{"rule":"audit","folder":"Audit"},"qid":"017ABCDEFGH28006","routes":["default_inbound"],"msgSizeBytes":9625,"suborgs":{"sender":"0","rcpts":["0"]},"modules":{"spf":{"domain":"chime-notifications.bounces.google.com","result":"pass"},"dkimv":[{"domain":"google.com","selector":"20161025","result":"pass"}],"pdr":{"v2":{"response":"pass"}},"urldefense":{"version":{"engine":"15"},"counts":{"unique":3,"rewritten":4,"total":4}}}},"action_dkimv":[{"rule":"dkim_policy_partner_temperror","action":"continue","module":"dkimv"}],"metadata":{"origin":{"data":{"agent":"m0000001.ppops.net","cid":"pphosted_prodmgt_hosted","version":"8.14.0.396"}}},"envelope":{"from":"3qje9xhukfdsdsdhsd-123456-msdvsdvdsvfkd.bnl@chime-notifications.bounces.google.com","fromHashed":"2a1a927f37b8e66067d0d97aea42f67f@chime-notifications.bounces.google.com","rcptsHashed":["a7e7edfviushdjhbsdjbvjhsd6f5211efe@example.net"],"rcpts":["temple@example.net"]},"guid":"3uE0HBMzAocroyCG_8ABCDEFGHIJECQu"} | |||
{"connection":{"country":"us","ip":"89.160.20.112","protocol":"smtp:smtp","sid":"2y1234560gm","helo":"mail-123456.google.com","tls":{"inbound":{"cipherBits":128,"version":"TLSv1.2","cipher":"ECDHE-RSA-AES128-GCM-SHA256"}},"host":"mail-123456.google.com","resolveStatus":"ok"},"metadata":{"origin":{"data":{"agent":"m0000123.ppops.net","cid":"pphosted_prodmgt_hosted","version":"8.14.0.396"}}},"pps":{"agent":"m0000123.ppops.net","cid":"pphosted_prodmgt_hosted","version":"8.14.0.396"},"final_module":"spam","action_dmarc":[{"rule":"pass","action":"continue","module":"dmarc"}],"ts":"2024-06-17T09:38:49.929101-0800","action_spf":[{"rule":"test_5_pass","action":"continue","module":"spf"},{"rule":"pass","action":"continue","module":"spf"}],"final_rule":"bulk","msg":{"header":{"toHashed":["87fad3bbab2sdvdsvsdvfdbfd5f116c3986@example.com"],"to":["abcdefg@example.com"],"from":["G Suite Alerts <gsuite-alerts-noreply@google.com>"],"message-id":["<VtuqyZOABCDFrgjbrrEqg.0@notifications.google.com>"],"fromHashed":["dc8352b494f0b14f0baefd8eb51e47ec@google.com>"],"subject":["G Suite Alert: test123"]},"sizeBytes":6651,"lang":"en"},"filter":{"routeDirection":"inbound","durationSecs":0.286712,"startTime":"2020-02-07T08:34:49.929101-0800","isMsgEncrypted":false,"disposition":"continue","qid":"017ABCDEFGH5228","routes":["default_inbound"],"quarantine":{"rule":"audit","folder":"Bulk"},"msgSizeBytes":9635,"isMsgReinjected":false,"suborgs":{"sender":"0","rcpts":["0"]},"modules":{"spf":{"domain":"chime-notifications.bounces.google.com","result":"pass"},"dkimv":[{"domain":"google.com","selector":"20161025","result":"pass"}],"pdr":{"v2":{"response":"pass"}},"urldefense":{"version":{"engine":"15"},"counts":{"rewritten":4,"unique":3,"total":4}}}},"action_dkimv":[{"rule":"dkim_policy_partner_temperror","action":"continue","module":"dkimv"}],"guid":"81Of8J5YghkL1r--abcdefghijk-OBCFg7u","envelope":{"from":"khbsdkjvbsdjkbvkjsdv-zkdqsr-ahbckdsbcjbsdkjvsd.bnl@chime-notifications.bounces.google.com","fromHashed":"2a1a927f37b8esvsvsdvsdvsdvsdvsdvsdv7f@chime-notifications.bounces.google.com","rcptsHashed":["87fadvhjhsdvsdvbksdbvidseddad5f116c3986@example.com"],"rcpts":["abcdef@example.com"]},"final_action":"continue"} | |||
{"final_rule":"notspam","connection":{"country":"us","sid":"2abcdefgs98n3","protocol":"smtp:smtp","ip":"67.43.156.0","tls":{"inbound":{"cipherBits":128,"version":"TLSv1.2","cipher":"ECDHE-RSA-AES128-GCM-SHA256"}},"helo":"mail-abcd-1234.google.com","host":"mail-abcd-1234.google.com","resolveStatus":"ok"},"msgParts":[{"labeledCharset":"UTF-8","md5":"5d41402abc4b2a76b9719d911017c592","sha256":"2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824","disposition":"inline","isArchive":false,"isCorrupted":false,"isTimedOut":false,"isProtected":false,"sizeDecodedBytes":388,"isVirtual":false,"detectedSizeBytes":388,"dataBase64":"U0NBTEFSKDB4N2ZhYjY3ZTlhOGI4KQ==\n","detectedMime":"text/plain","detectedName":"text.txt","urls":[{"isRewritten":true,"url":"https://www.googleapis.com/auth/admin.reports.audit.readonly","src":["urldefense"]}],"detectedExt":"TXT","metadata":{"":"missing header label"},"labeledExt":"txt","detectedCharset":"utf-8","isDeleted":false,"labeledMime":"text/plain","labeledName":"text.txt","textExtracted":"U0NBTEFSKDB4N2ZhYjY3ZjI0NjQ4KQ==\n","structureId":"0"},{"labeledCharset":"UTF-8","md5":"dbcc9cc02056791cb01fa952370ced27","sha256":"f276ba3212372f31f52b22a4f18cb2b2b8e29ea8641032fcb5fc6f18e571019b","disposition":"inline","isArchive":false,"isCorrupted":false,"isTimedOut":false,"dataBase64":"U0NBTEFACBJDBDSJVJDY3Yjc1NDY4KQ==\n","isVirtual":false,"labeledMime":"text/html","detectedMime":"text/html","detectedName":"text.html","detectedSizeBytes":3056,"urls":[{"isRewritten":true,"url":"https://support.google.com/a/answer/3230421?hl=en","src":["urldefense"]},{"isRewritten":true,"url":"https://admin.google.com/AdminHome#Reports:subtab=manage-alerts","src":["urldefense"]}],"metadata":{},"isDeleted":false,"detectedCharset":"UTF-8","labeledExt":"html","isProtected":false,"sizeDecodedBytes":3056,"labeledName":"text.html","textExtracted":"U0NBTEFSKABCDEFHGJIKzZjQ4KQ==\n","structureId":"0","detectedExt":"HTML"}],"pps":{"agent":"m0000001.ppops.net","cid":"pphosted_prodmgt_hosted","version":"8.14.0.396"},"final_module":"spam","action_dmarc":[{"rule":"pass","action":"continue","module":"dmarc"}],"ts":"2024-05-27T08:34:49.410504-0800","final_action":"continue","action_spf":[{"rule":"test_5_pass","action":"continue","module":"spf"},{"rule":"pass","action":"continue","module":"spf"}],"msg":{"normalizedHeader":{"toHashed":["a7e7e2f59bvhbfvjksdbvkjsdbvkjbvn5211efe@example.net"],"to":["temple@example.net"],"from":["G Suite Alerts <gsuite-alerts-noreply@google.com>"],"message-id":["Ro1ylYaq9Xmy7ZIpf8ITrw.0@notifications.google.com"],"fromHashed":["dc8352b494f0b14f0baefd8eb51e47ec@google.com>"],"subject":["G Suite Alert: test123"]},"header":{"toHashed":["a7e7e2f59b128bdb0aa60f56f5211efe@example.net"],"to":["temple@example.net"],"from":["G Suite Alerts <gsuite-alerts-noreply@google.com>"],"message-id":["<Rohkdsbvbkousbdsvpf8ITrw.0@notifications.google.com>"],"subject":["G Suite Alert: test123"],"fromHashed":["dc8352b494f0b14f0baefd8eb51e47ec@google.com>"]},"sizeBytes":6637,"parsedAddresses":{"toHashed":["a7e7e2f59b128bdb0aa60f56f5211efe@example.net"],"to":["temple@example.net"],"from":["gsuite-alerts-noreply@google.com"],"fromHashed":["8e0a7ed672474ebcd2555e8484eadb61@google.com"]},"lang":"en"},"filter":{"routeDirection":"inbound","durationSecs":0.656005,"startTime":"2020-02-07T08:34:49.410504-0800","isMsgEncrypted":false,"disposition":"continue","isMsgReinjected":false,"quarantine":{"rule":"audit","folder":"Audit"},"qid":"017ABCDEFGH28006","routes":["default_inbound"],"msgSizeBytes":9625,"pe":{"branding":"4","module":"access","rcpts":["i_am@not_an_object.com"]},"actions":[{"rule":"pass","action":"continue","isFinal":true,"module":"pdr"},{"rule":"pp_external_tag","action":"audit","module":"access"},{"rule":"pp_external_tag","action":"reply-sender","module":"access"},{"rule":"pp_external_tag","action":"continue","module":"access"},{"rule":"test_5_pass","action":"continue","module":"spf"},{"rule":"pass","action":"continue","module":"spf"},{"rule":"clean","action":"add-header","module":"av"},{"rule":"clean","action":"continue","module":"av"},{"rule":"dkim_policy_partner_temperror","action":"continue","module":"dkimv"},{"rule":"pass","action":"continue","module":"dmarc"},{"rule":"notspam","action":"audit","module":"spam"},{"rule":"notspam","action":"add-header","module":"spam"},{"rule":"notspam","action":"continue","module":"spam"}],"suborgs":{"sender":"0","rcpts":["0"]},"modules":{"dmarc":{"authResults":[{"method":"spf","reason":"","result":"pass","emailIdentities":{"smtp.mailfromHashed":"0984d6cbdghvcjhdsbjhcsdbj7ca9a87cb@chime-notifications.bounces.google.com","smtp.mailfrom":"3qJE9XhUKALkfrthsd-123456-dhvjhdschjsdbjchnfkd.bnl@chime-notifications.bounces.google.com"}},{"method":"dkim","reason":"","result":"pass","propspec":{"header.d":"google.com","header.s":"20161025"}},{"method":"dmarc","reason":"","result":"pass","emailIdentities":{"header.from":"google.com"}}],"filterdResult":"pass","alignment":[{"fromDomain":"google.com","results":[{"method":"spf","result":"relaxed","identity":"chime-notifications.bounces.google.com","identityOrg":"google.com"},{"method":"dkim","result":"strict","identity":"google.com","identityOrg":"google.com"}]}],"srvid":"000123456.pphosted.com"},"spf":{"domain":"chime-notifications.bounces.google.com","result":"pass"},"dkimv":[{"domain":"google.com","selector":"20161025","result":"pass"}],"pdr":{"v2":{"response":"pass"}},"urldefense":{"version":{"engine":"15"},"counts":{"unique":3,"rewritten":4,"total":4}}}},"action_dkimv":[{"rule":"dkim_policy_partner_temperror","action":"continue","module":"dkimv"}],"metadata":{"origin":{"data":{"agent":"m0000001.ppops.net","cid":"pphosted_prodmgt_hosted","version":"8.14.0.396"}}},"envelope":{"from":"3qje9xhukfdsdsdhsd-123456-msdvsdvdsvfkd.bnl@chime-notifications.bounces.google.com","fromHashed":"2a1a927f37b8e66067d0d97aea42f67f@chime-notifications.bounces.google.com","rcptsHashed":["a7e7edfviushdjhbsdjbvjhsd6f5211efe@example.net"],"rcpts":["temple@example.net"]},"guid":"3uE0HBMzAocroyCG_8ABCDEFGHIJECQu"} | |||
{"final_rule":"notspam","connection":{"country":"us","sid":"2abcdefgs98n3","protocol":"smtp:smtp","ip":"67.43.156.0","tls":{"inbound":{"cipherBits":128,"version":"TLSv1.2","cipher":"ECDHE-RSA-AES128-GCM-SHA256"}},"helo":"mail-abcd-1234.google.com","host":"mail-abcd-1234.google.com","resolveStatus":"ok"},"msgParts":[{"labeledCharset":"UTF-8","md5":"5d41402abc4b2a76b9719d911017c592","sha256":"2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824","disposition":"inline","isArchive":false,"isCorrupted":false,"isTimedOut":false,"isProtected":false,"sizeDecodedBytes":388,"isVirtual":false,"detectedSizeBytes":388,"dataBase64":"U0NBTEFSKDB4N2ZhYjY3ZTlhOGI4KQ==\n","detectedMime":"text/plain","detectedName":"text.txt","urls":[{"isRewritten":true,"url":"https://www.googleapis.com/auth/admin.reports.audit.readonly","src":["urldefense"]}],"detectedExt":"TXT","metadata":{"":"missing header label"," ":" "," ":"not empty"},"labeledExt":"txt","detectedCharset":"utf-8","isDeleted":false,"labeledMime":"text/plain","labeledName":"text.txt","textExtracted":"U0NBTEFSKDB4N2ZhYjY3ZjI0NjQ4KQ==\n","structureId":"0"},{"labeledCharset":"UTF-8","md5":"dbcc9cc02056791cb01fa952370ced27","sha256":"f276ba3212372f31f52b22a4f18cb2b2b8e29ea8641032fcb5fc6f18e571019b","disposition":"inline","isArchive":false,"isCorrupted":false,"isTimedOut":false,"dataBase64":"U0NBTEFACBJDBDSJVJDY3Yjc1NDY4KQ==\n","isVirtual":false,"labeledMime":"text/html","detectedMime":"text/html","detectedName":"text.html","detectedSizeBytes":3056,"urls":[{"isRewritten":true,"url":"https://support.google.com/a/answer/3230421?hl=en","src":["urldefense"]},{"isRewritten":true,"url":"https://admin.google.com/AdminHome#Reports:subtab=manage-alerts","src":["urldefense"]}],"metadata":{},"isDeleted":false,"detectedCharset":"UTF-8","labeledExt":"html","isProtected":false,"sizeDecodedBytes":3056,"labeledName":"text.html","textExtracted":"U0NBTEFSKABCDEFHGJIKzZjQ4KQ==\n","structureId":"0","detectedExt":"HTML"}],"pps":{"agent":"m0000001.ppops.net","cid":"pphosted_prodmgt_hosted","version":"8.14.0.396"},"final_module":"spam","action_dmarc":[{"rule":"pass","action":"continue","module":"dmarc"}],"ts":"2024-05-27T08:34:49.410504-0800","final_action":"continue","action_spf":[{"rule":"test_5_pass","action":"continue","module":"spf"},{"rule":"pass","action":"continue","module":"spf"}],"msg":{"normalizedHeader":{"toHashed":["a7e7e2f59bvhbfvjksdbvkjsdbvkjbvn5211efe@example.net"],"to":["temple@example.net"],"from":["G Suite Alerts <gsuite-alerts-noreply@google.com>"],"message-id":["Ro1ylYaq9Xmy7ZIpf8ITrw.0@notifications.google.com"],"fromHashed":["dc8352b494f0b14f0baefd8eb51e47ec@google.com>"],"subject":["G Suite Alert: test123"]},"header":{"toHashed":["a7e7e2f59b128bdb0aa60f56f5211efe@example.net"],"to":["temple@example.net"],"from":["G Suite Alerts <gsuite-alerts-noreply@google.com>"],"message-id":["<Rohkdsbvbkousbdsvpf8ITrw.0@notifications.google.com>"],"subject":["G Suite Alert: test123"],"fromHashed":["dc8352b494f0b14f0baefd8eb51e47ec@google.com>"]},"sizeBytes":6637,"parsedAddresses":{"toHashed":["a7e7e2f59b128bdb0aa60f56f5211efe@example.net"],"to":["temple@example.net"],"from":["gsuite-alerts-noreply@google.com"],"fromHashed":["8e0a7ed672474ebcd2555e8484eadb61@google.com"]},"lang":"en"},"filter":{"routeDirection":"inbound","durationSecs":0.656005,"startTime":"2020-02-07T08:34:49.410504-0800","isMsgEncrypted":false,"disposition":"continue","isMsgReinjected":false,"quarantine":{"rule":"audit","folder":"Audit"},"qid":"017ABCDEFGH28006","routes":["default_inbound"],"msgSizeBytes":9625,"pe":{"branding":"4","module":"access","rcpts":["i_am@not_an_object.com"]},"actions":[{"rule":"pass","action":"continue","isFinal":true,"module":"pdr"},{"rule":"pp_external_tag","action":"audit","module":"access"},{"rule":"pp_external_tag","action":"reply-sender","module":"access"},{"rule":"pp_external_tag","action":"continue","module":"access"},{"rule":"test_5_pass","action":"continue","module":"spf"},{"rule":"pass","action":"continue","module":"spf"},{"rule":"clean","action":"add-header","module":"av"},{"rule":"clean","action":"continue","module":"av"},{"rule":"dkim_policy_partner_temperror","action":"continue","module":"dkimv"},{"rule":"pass","action":"continue","module":"dmarc"},{"rule":"notspam","action":"audit","module":"spam"},{"rule":"notspam","action":"add-header","module":"spam"},{"rule":"notspam","action":"continue","module":"spam"}],"suborgs":{"sender":"0","rcpts":["0"]},"modules":{"dmarc":{"authResults":[{"method":"spf","reason":"","result":"pass","emailIdentities":{"smtp.mailfromHashed":"0984d6cbdghvcjhdsbjhcsdbj7ca9a87cb@chime-notifications.bounces.google.com","smtp.mailfrom":"3qJE9XhUKALkfrthsd-123456-dhvjhdschjsdbjchnfkd.bnl@chime-notifications.bounces.google.com"}},{"method":"dkim","reason":"","result":"pass","propspec":{"header.d":"google.com","header.s":"20161025"}},{"method":"dmarc","reason":"","result":"pass","emailIdentities":{"header.from":"google.com"}}],"filterdResult":"pass","alignment":[{"fromDomain":"google.com","results":[{"method":"spf","result":"relaxed","identity":"chime-notifications.bounces.google.com","identityOrg":"google.com"},{"method":"dkim","result":"strict","identity":"google.com","identityOrg":"google.com"}]}],"srvid":"000123456.pphosted.com"},"spf":{"domain":"chime-notifications.bounces.google.com","result":"pass"},"dkimv":[{"domain":"google.com","selector":"20161025","result":"pass"}],"pdr":{"v2":{"response":"pass"}},"urldefense":{"version":{"engine":"15"},"counts":{"unique":3,"rewritten":4,"total":4}}}},"action_dkimv":[{"rule":"dkim_policy_partner_temperror","action":"continue","module":"dkimv"}],"metadata":{"origin":{"data":{"agent":"m0000001.ppops.net","cid":"pphosted_prodmgt_hosted","version":"8.14.0.396"}}},"envelope":{"from":"3qje9xhukfdsdsdhsd-123456-msdvsdvdsvfkd.bnl@chime-notifications.bounces.google.com","fromHashed":"2a1a927f37b8e66067d0d97aea42f67f@chime-notifications.bounces.google.com","rcptsHashed":["a7e7edfviushdjhbsdjbvjhsd6f5211efe@example.net"],"rcpts":["temple@example.net"]},"guid":"3uE0HBMzAocroyCG_8ABCDEFGHIJECQu"} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is just the line above with the poisoned fields inserted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"metadata":{"":"missing header label"}
vs "metadata":{"":"missing header label"," ":" "," ":"not empty"}
🚀 Benchmarks reportTo see the full report comment with |
|
💚 Build Succeeded
cc @efd6 |
Pinging @elastic/security-service-integrations (Team:Security-Service Integrations) |
Package proofpoint_on_demand - 1.5.2 containing this change is available at https://epr.elastic.co/package/proofpoint_on_demand/1.5.2/ |
Proposed commit message
Checklist
changelog.yml
file.Author's Checklist
How to test this PR locally
Related issues
Screenshots