{"id":23226167,"url":"https://github.com/shuffle/detection-parser","last_synced_at":"2025-07-21T07:33:04.224Z","repository":{"id":246718059,"uuid":"821948152","full_name":"Shuffle/detection-parser","owner":"Shuffle","description":"Open-source email security rules. Written in go, importable in python :)","archived":false,"fork":false,"pushed_at":"2024-09-26T13:59:30.000Z","size":38501,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-20T00:38:10.051Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://pypi.org/project/shuffle-heimdall/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Shuffle.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-06-29T22:11:23.000Z","updated_at":"2024-09-26T13:59:34.000Z","dependencies_parsed_at":null,"dependency_job_id":"0c4ca95a-e899-4730-b1cc-914a60814263","html_url":"https://github.com/Shuffle/detection-parser","commit_stats":null,"previous_names":["shuffle/shuffle-email-rules","shuffle/detection-parser"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/Shuffle/detection-parser","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shuffle%2Fdetection-parser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shuffle%2Fdetection-parser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shuffle%2Fdetection-parser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shuffle%2Fdetection-parser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Shuffle","download_url":"https://codeload.github.com/Shuffle/detection-parser/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shuffle%2Fdetection-parser/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266261216,"owners_count":23901287,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-19T00:16:22.524Z","updated_at":"2025-07-21T07:32:59.217Z","avatar_url":"https://github.com/Shuffle.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Introduction\n\nDetection rule parser for everyone with focus on Email\n\n## Installation\n\n```bash\npip3 install shuffle-heimdall\n```\n\n\n## Usage\n\n```python\nfrom heimdall.evaluate import evaluate_email_expression\nsender = \"\"\"{\n    \"email\": {\n        \"domain\": {\n            \"domain\": \"shuffler.io\"\n        },\n        \"email\": \"support@shuffler.io\"\n    }\n}\"\"\"\n\nexpression = 'sender.email.domain.domain == \"twitter.com\"'\nresult = evaluate_email_expression(sender, expression)\nprint(result)\n\n## Try out file based evaluation\nfrom heimdall.evaluate import evaluate_file_expression\n\nfile_path = \"rules/impersonation_of_twitter.yml\"\n\nsender = \"\"\"{\n    \"email\": {\n        \"domain\": {\n            \"domain\": \"nottwitter.com\"\n        }\n    }\n}\"\"\"\n\nresult = evaluate_file_expression(file_path, sender)\nprint(result)\n```\n\nTo see more examples, check out the [main.py](./heimdall/main.py) file.\n\n## To-do\n\nWorks on most platforms. The power of heimdall should shine when you have a lot of emails to process but you want to write simple code that is also fast.\n\n- [ ] Add support for outlook API result\n- [x] Add support for gmail API result (`evaluate_gmail_expression()`)\n- [ ] Add support for gmail API when in mass\n- [ ] Make setup.py pull the right binary during install instead of having everything in the repo.\n\n\n## Dev\n\n1. Building the package\n```bash\npython3 setup.py sdist bdist_wheel\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshuffle%2Fdetection-parser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshuffle%2Fdetection-parser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshuffle%2Fdetection-parser/lists"}