{"id":27361217,"url":"https://github.com/kamushadenes/cefevent","last_synced_at":"2025-09-11T22:32:47.889Z","repository":{"id":49284512,"uuid":"63816485","full_name":"kamushadenes/cefevent","owner":"kamushadenes","description":"ArcSight's Common Event Format library","archived":false,"fork":false,"pushed_at":"2023-11-03T09:29:41.000Z","size":94,"stargazers_count":39,"open_issues_count":0,"forks_count":15,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-09-02T04:40:03.338Z","etag":null,"topics":["arcsight","cef","syslog"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kamushadenes.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","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},"funding":{"github":["kamushadenes"]}},"created_at":"2016-07-20T21:40:59.000Z","updated_at":"2025-07-21T07:16:23.000Z","dependencies_parsed_at":"2024-06-19T05:29:36.249Z","dependency_job_id":"4fd97abd-daa4-4a5e-8d3b-ff9b3b1bc422","html_url":"https://github.com/kamushadenes/cefevent","commit_stats":{"total_commits":58,"total_committers":7,"mean_commits":8.285714285714286,"dds":0.5344827586206897,"last_synced_commit":"faef889024c93cbb4fc3b7a8e548d72efd646178"},"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"purl":"pkg:github/kamushadenes/cefevent","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kamushadenes%2Fcefevent","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kamushadenes%2Fcefevent/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kamushadenes%2Fcefevent/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kamushadenes%2Fcefevent/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kamushadenes","download_url":"https://codeload.github.com/kamushadenes/cefevent/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kamushadenes%2Fcefevent/sbom","scorecard":{"id":549049,"data":{"date":"2025-08-11","repo":{"name":"github.com/kamushadenes/cefevent","commit":"c85e51dfac47a78544e8e6d78168bfaff4d5c72c"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.4,"checks":[{"name":"Code-Review","score":0,"reason":"Found 1/25 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/pr.yml:11: update your workflow using https://app.stepsecurity.io/secureworkflow/kamushadenes/cefevent/pr.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/pr.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/kamushadenes/cefevent/pr.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yml:12: update your workflow using https://app.stepsecurity.io/secureworkflow/kamushadenes/cefevent/publish.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/kamushadenes/cefevent/publish.yml/master?enable=pin","Warn: pipCommand not pinned by hash: .github/workflows/pr.yml:20","Warn: pipCommand not pinned by hash: .github/workflows/pr.yml:21","Warn: pipCommand not pinned by hash: .github/workflows/publish.yml:21","Warn: pipCommand not pinned by hash: .github/workflows/publish.yml:22","Info:   0 out of   4 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   4 pipCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/pr.yml:1","Warn: no topLevel permission defined: .github/workflows/publish.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 8 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-20T10:17:33.913Z","repository_id":49284512,"created_at":"2025-08-20T10:17:33.914Z","updated_at":"2025-08-20T10:17:33.914Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274717985,"owners_count":25337023,"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","status":"online","status_checked_at":"2025-09-11T02:00:13.660Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["arcsight","cef","syslog"],"created_at":"2025-04-13T01:30:00.413Z","updated_at":"2025-09-11T22:32:47.860Z","avatar_url":"https://github.com/kamushadenes.png","language":"Python","readme":"\u003ch1 align=\"center\"\u003ecefevent\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\nArcSight's Common Event Format library\n\u003c/p\u003e\n\n\u003chr\u003e\n\n[![Downloads](https://pepy.tech/badge/cefevent)](https://pepy.tech/project/cefevent)\n![GitHub](https://img.shields.io/github/license/kamushadenes/cefevent)\n![GitHub release (latest by date)](https://img.shields.io/github/v/release/kamushadenes/cefevent)\n![Libraries.io dependency status for GitHub repo](https://img.shields.io/librariesio/github/kamushadenes/cefevent)\n![GitHub code size in bytes](https://img.shields.io/github/languages/code-size/kamushadenes/cefevent)\n![PyPI - Format](https://img.shields.io/pypi/format/cefevent)\n\n\n\u003chr\u003e\n\nThis library is able to generate, validate and send CEF events.\n\n\u003chr\u003e\n\n## Usage\n\n```\nusage: run.py [-h] --host HOST [--port PORT] [--tcp] [--auto_send] [--eps EPS] DEFINITION_FILE [DEFINITION_FILE ...]\n\nCEF builder and replayer\n\npositional arguments:\n  DEFINITION_FILE  an file containing event definitions\n\noptional arguments:\n  -h, --help       show this help message and exit\n  --host HOST      Syslog destination host\n  --port PORT      Syslog destination port\n  --tcp            Use TCP instead of UDP\n  --auto_send      Auto send logs\n  --eps EPS        Max EPS\n```\n\nBy default, it will read the definition file and send each log line once.\n\nIf instead `--auto_send` is specified, it will send at `--eps` events per second.\n\nYou can use either TCP or UDP Syslog servers as destination.\n\n### DEFINITION_FILE format\nThe definition file is a CSV file, delimited by `;`, with the CEF field names as headers in the first line.\n\n### Send Once Example\n```\npython run.py --host localhost --port 10514 /tmp/example_cef_csv\n[*] [2022-05-11T03:12:40] 42 events sent\n```\n\n### Replay Example\n```\npython run.py --host localhost --port 10514 --auto_send --eps 10000 /tmp/example_cef_csv\n[*] [2016-07-21T03:27:30] There are 149 events in the poll. The max EPS is set to 10000\n[*] [2016-07-21T03:27:40] Current EPS: 3479.0691266185677\n[*] [2016-07-21T03:27:50] Current EPS: 3909.1143903948505\n[*] [2016-07-21T03:28:00] Current EPS: 3703.146674687884\n[*] [2016-07-21T03:28:10] Current EPS: 3521.793641832017\n[*] [2016-07-21T03:28:20] Current EPS: 3678.019083580161\n[*] [2016-07-21T03:28:30] Current EPS: 3649.0109641324752\n[*] [2016-07-21T03:28:33] 228248 events sent since 2016-07-21 03:27:30.502906\n```\n\n### API Usage\n\n#### Get field metadata\n\n```python\n\u003e\u003e\u003e from cefevent.event import CEFEvent\n\u003e\u003e\u003e c = CEFEvent()\n\n\u003e\u003e\u003e c.get_field_metadata('c6a1', 'full_name')\n\n'deviceCustomIPv6Address1'\n\n\n\u003e\u003e\u003e c.get_field_metadata('c6a1', 'data_type')\n\n'IPv6 Address'\n\n\n\u003e\u003e\u003e c.get_field_metadata('c6a1', 'description')\n\n'One of four IPV6 address fields available to map fields that do not apply to any other in this dictionary.'\n\n\n\u003e\u003e\u003e c.get_field_metadata('c6a1')\n \n{'data_type': 'IPv6 Address',\n 'description': 'One of four IPV6 address fields available to map fields that do not apply to any other in this dictionary.',\n 'full_name': 'deviceCustomIPv6Address1',\n 'length': 0,\n 'name': 'c6a1'}\n```\n\n#### Convert ArcSight Naming to CEF Naming\n\n```python\n\u003e\u003e\u003e from cefevent.event import CEFEvent\n\u003e\u003e\u003e c = CEFEvent()\n\n\u003e\u003e\u003e c.get_cef_field_name('deviceAddress')\n\n'dvc'\n```\n\n#### Build an CEF event from scratch\n\n```python\n\u003e\u003e\u003e from cefevent.event import CEFEvent\n\u003e\u003e\u003e c = CEFEvent()\n\n\u003e\u003e\u003e c.set_field('name', 'Event Name')\n\u003e\u003e\u003e c.set_field('deviceVendor', 'Hyades Inc.')\n\u003e\u003e\u003e c.set_field('deviceProduct', 'cefevent')\n\n# Equal signs will be automatically escaped (and so will pipes (|) and backslashes (\\\\), as per the white paper specification)\n\u003e\u003e\u003e c.set_field('message', 'This is a test event (Answer=42)')\n\n# All fields have some sort of validation, check the test() function for examples\n\u003e\u003e\u003e c.set_field('sourceAddress', '192.168.67.1')\n\u003e\u003e\u003e c.set_field('sourcePort', 12345)\n\n# Finally, generate the CEF line\n\u003e\u003e\u003e c.build_cef()\n\nCEF:0|Hyades Inc.|cefevent|1.0|0|Event Name|5|spt=12345 src=192.168.67.1 msg=This is a test event (Answer\\\\=42)\n```\n\n#### Event Generation\n\nThe library is able to generate events using random data, respecting each field's data type and length limits.\n\n```python\n\u003e\u003e\u003e from cefevent.generator import generate_random_events\n\u003e\u003e\u003e events = generate_random_events(field_count=10, event_count=100)\n\n\u003e\u003e\u003e len(events)\n100\n\n\u003e\u003e\u003e events[0]\nCEF:0|CEF Vendor|CEF Product|1.0|0|Random CEF Event|5|cs5=okppjRMb57C3dLmTZc0gF2xcwCR9B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FmGdOsvRDBoZx5Cu0zriA8cm0oSdWjhyP4vkYnT9oWmNAW0iCP8U0IM5sojtFaqSDLiDGFf6Gt45e2AvVoYZaIsjg8JhGmHOQ2zkoSql5dcNCIatmiMAwuNmh3DG3HBJREY23hR03LI1VNIPZH2YtmfeYQ4S7hzh2ulpYaAX7qrJtMKWdkEGAwsfaB6TgijL04nq7Hj9e0mnWrxcSPixlm98THZIhefYamh9ywq2hGzrgjEW1sNrvAUqKYhoQg6ORxvsoHVPT oldFilePermission=TEUtuXQWIM0qXlHJEK0HsM1TuWDvUOUKkIlTg8ZIdfJvxdT5CD6OXAXSkaaP4RsLRRnTGdpC4N8hbNbtBPVpug9XZHwQH9NCbKq8tE8j1VMWzilorUa60SAI4NcVhlmCF40NOH4A4kIcmvBAriU8DViCsySJ2DEBPKffXlNlnoZd38xCI9SOVzk7Y8dIRc34DRwqdjrKYNStbDA1xDvC9IlujF90W5TWutrh1tiRV16PqW7jPzggbVHYOZx0o8QimK5SMknQmERL2OsmIByc8RiZGzQbMfBKUGjJZNSR6d4RT68XvyN8Qqz9F9fmiWcPjx40yDkp4ATXIyhc8ClphIydsgbT7ucqvTwtnMi2w27Dp5MtxpiyLDRXcUlKu7yFwIlbU5JCIIj6esnM5zHK9e7VAxM5B1IWxYE0lxS7T8Y73vI3k0kziko1fQeckavQxjjKADloiMChkHwscOzF6k52tUzph8nqexVeclC9XoEMioQpTyKZTib4tYOqPvLW6vE7QtwmyOpOEFWpMb6nKRBZdprhI7jpzABSi5iF91IKHUgmaloiIAeaYC4J9NmEFUZwb7DTKL3MD7tSTbuIMbzhE3pAnwNTA3zMcjakULGgF8yJDijCDGogMFFjVQFyiYJfnZiNeAjpcV5YWMhc0gHB4wlaTuZPPhW0AxO0CdeaRKjM5St66EJ4QsMyvUiuUudH5DPHLRaGqfJJS0cjl3QhSD8MZ64l5MXb1OB1W1os4q cfp1=551727113.03403 destinationTranslatedPort=28984019 cn2Label=Ed7RC17O8V4v5XVB8hTbxypElVp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EBuNoEJAcrUWsLSThf33MYvA1veIACUa7w1TcLsWeCBGoQ165fJa4m3LO0p5dEpMPkMlC7uiqItjpwofDchXSdqSVvF25AZ2XZ2h6pTodPF3Z7mwAbTlfLjyk00ncbziWuv2LYxNuvng81BNqp7mPhOzidIsT265SnZS69SQNzOzHciepWMMcJBu2aYyk4xyFUuClo6LQrn7ZzC5JPoQUhghpEajVE9vE4wRulW53qePJ9IDKjzXe1kWcnaMo3D0P3E4mZaohXZ1ApvJZxWFEnKP\n```\n\n#### Raise errors\n\nBy default, the methods `set_field()` and `set_prefix()` return `False` if the name or the value or the CEF field is invalid.  \n\nSet `CEFEvent.strict=True` to raise `ValueError` if any invalid field name / values are passed.  \n\n```python\n\u003e\u003e\u003e from cefevent.event import CEFEvent\n\u003e\u003e\u003e c = CEFEvent(strict=True)\n\u003e\u003e\u003e c.set_field('sourceAddress', '192.168.67.500')\n```\n\n```\nTraceback (most recent call last):\n  File \"\u003cstdin\u003e\", line 1, in \u003cmodule\u003e\n  File \"cefevent/cefevent/__init__.py\", line 249, in set_field\n    raise ValueError(\"Invalid value for field: {}\\nThe following rules apply: {}\".format(field, self.get_field_metadata(field)))\nValueError: Invalid value for field: sourceAddress\nThe following rules apply: {'full_name': 'sourceAddress', 'data_type': 'IPv4 Address', 'length': 0, 'description': 'Identifies the source that an event refers to in an IP network. The format is an IPv4 address. Example: \"192.168.10.1\"', 'name': 'src'}\n```\n\n## Running Tests\n\nThe project uses [pytest](https://pytest.org/).\n\n```bash\npytest -v\n```\n\n```\n================================================================== test session starts ==================================================================\nplatform darwin -- Python 3.9.12, pytest-7.1.2, pluggy-1.0.0 -- /opt/homebrew/opt/python@3.9/bin/python3.9\ncachedir: .pytest_cache\nrootdir: /Users/henrique.goncalves/Dropbox/Projects/Personal/Code/cefevent\ncollected 9 items\n\ntest_event.py::test_load PASSED                                                                                                                   [ 11%]\ntest_event.py::test_source_address PASSED                                                                                                         [ 22%]\ntest_event.py::test_source_mac_address PASSED                                                                                                     [ 33%]\ntest_event.py::test_source_port PASSED                                                                                                            [ 44%]\ntest_event.py::test_message PASSED                                                                                                                [ 55%]\ntest_event.py::test_strict PASSED                                                                                                                 [ 66%]\ntest_generator.py::test_random_addr PASSED                                                                                                        [ 77%]\ntest_generator.py::test_generate_random_events PASSED                                                                                             [ 88%]\ntest_sender.py::test_sender PASSED                                                                                                                [100%]\n\n=================================================================== 9 passed in 6.71s ===================================================================\n```\n","funding_links":["https://github.com/sponsors/kamushadenes"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkamushadenes%2Fcefevent","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkamushadenes%2Fcefevent","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkamushadenes%2Fcefevent/lists"}