{"id":19167361,"url":"https://github.com/megamansec/sec-sec-incident-notifier","last_synced_at":"2025-08-31T20:05:25.878Z","repository":{"id":218254800,"uuid":"745976775","full_name":"MegaManSec/SEC-sec-incident-notifier","owner":"MegaManSec","description":"Automated discovery and AI-enhanced summarizing of 8-K Item 1.05 filings, with seamless Slack Webhook integration to ensure timely awareness of security incidents reported to the U.S. Securities and Exchange Commission.","archived":true,"fork":false,"pushed_at":"2025-02-08T03:03:26.000Z","size":610,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-08-31T20:04:35.733Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MegaManSec.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"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,"zenodo":null}},"created_at":"2024-01-20T18:05:03.000Z","updated_at":"2025-08-31T18:43:57.000Z","dependencies_parsed_at":"2024-01-25T04:23:57.608Z","dependency_job_id":"5052e109-c695-48f9-8d12-4f6a23bce5d5","html_url":"https://github.com/MegaManSec/SEC-sec-incident-notifier","commit_stats":null,"previous_names":["megamansec/sec-sec-incident-notifier"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/MegaManSec/SEC-sec-incident-notifier","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MegaManSec%2FSEC-sec-incident-notifier","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MegaManSec%2FSEC-sec-incident-notifier/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MegaManSec%2FSEC-sec-incident-notifier/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MegaManSec%2FSEC-sec-incident-notifier/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MegaManSec","download_url":"https://codeload.github.com/MegaManSec/SEC-sec-incident-notifier/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MegaManSec%2FSEC-sec-incident-notifier/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273032934,"owners_count":25034067,"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-08-31T02:00:09.071Z","response_time":79,"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":[],"created_at":"2024-11-09T09:36:58.504Z","updated_at":"2025-08-31T20:05:25.835Z","avatar_url":"https://github.com/MegaManSec.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SEC 8-K Security Incident Report Poster and Summarizer\n\n## Overview\n\nThis Python script automates the retrieval, notification, and summarization of security incident reports from the U.S. Securities and Exchange Commission's (SEC) RSS feed for 8-K filings.\n\nThe script retrieves all 8-K filings and detects whether any of the filings include an [item 1.05](https://www.sec.gov/news/press-release/2023-139).\n\nThe script then submits the item 1.05 text to a Slack Webhook with a link to the original 8-K filing.\n\nOptionally, the script can use OpenAI's API to summarize the whole filing (which may contain an additional exhibit or statement).\n\n## Usage\n\nRunning the script is as simple as installing the dependencies and just running the Python script:\n\n```bash\npip3 install feedparser beautifulsoup4 openai requests\nUSER_AGENT='Joshua Rogers Joshua@Joshua.hu' SLACK_WEBHOOK='https://hooks.slack.com/services/.....' OPENAI_KEY=sk-...... python3 ./sec-sec-incident-notifier.py\n```\n\nEach of those environmental values are optional, and they may also be set in the `sec-sec-incident-notifier.py` file instead.\n\n|![](Slack.png)An example of the Slack output from this script.|\n|:-:|\n\n\n## Environmental Values\n\nThere are three optional environmental values. Optionally, these values can be set directly in the script itself.\n\n- `OPENAI_KEY`: If set to a valid OpenAI API key, the script will attempt to summarize the 8-K filing.\n\n- `OPENAI_MAX_TOKENS`: The maximum tokens for each summary to use. The default is 300. Smaller values result in shorter summaries.\n\n- `SLACK_WEBHOOK`: If set to a valid Slack Webhook, the script will send a message containing the information of the filing to a Slack channel.\n\n- `USER_AGENT`: The SEC requirs [progmatic downloads to use a specific format for the user agent](https://www.sec.gov/os/webmaster-faq#code-support). An example is `Sample Company Name AdminContact@\u003csample company domain\u003e.com`. If this is not set, a default is used.\n\n## Prerequisites\n- Python 3.x\n- `feedparser` library (`pip install feedparser`).\n- `beautifulsoup4` library (`pip install beautifulsoup4`).\n- `requests` library (`pip install requests`).\n- `openai` library (`pip install openai`), if using OpenAI to summarize the filings.\n\n## Notes\n- The script runs indefinitely, periodically checking for updates based on the refresh interval (5-minutes).\n- If an 8-K filing with an item 1.05 is found but the script cannot parse the details, it still reports the filing in the slack message.\n- The script likely does not handle all error cases, as it was made in 15-minutes.\n\n## Installation\nIn addition to running the script manually, a small debian-based installation script [install.sh](install.sh) is provided which when run as root, will install a systemd service to run the script in the background and log the output. The script is installed as `/usr/local/bin/sec-sec-incident-notifier.py`, logs are stored in `/var/log/sec-sec-incident-notifier.log` and `/var/log/sec-sec-incident-notifier-error.log`, and a logrotate configuration file is created in `/etc/logrotate.d/sec-sec-incident-notifier`.\n\nThe environmental values are also respected, if set:\n\n```bash\n$ sudo USER_AGENT='Joshua Rogers Joshua@Joshua.hu' SLACK_WEBHOOK='https://hooks.slack.com/services/.....' OPENAI_KEY=sk-...... OPENAI_MAX_TOKENS=150 ./install.sh\"\nsec-sec-incident-notifier has been installed in /usr/local/bin/sec-sec-incident-notifier.py with OPENAI_KEY=..., OPENAI_MAX_TOKENS=150, SLACK_WEBHOOK_URL=..., and USER_AGENT=..., and a service has been installed in /etc/systemd/system/sec-sec-incident-notifier.service. The service is started and logging to /var/log/sec-sec-incident-notifier.log and /var/log/sec-sec-incident-notifier-error.log, and log rotation is set up in /etc/logrotate.d/sec-sec-incident-notifier.\n```\n\n## License\nThis project is licensed under [GPL3.0](/LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmegamansec%2Fsec-sec-incident-notifier","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmegamansec%2Fsec-sec-incident-notifier","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmegamansec%2Fsec-sec-incident-notifier/lists"}