Two automated monitoring scripts for tracking corporate disclosures in SEC EDGAR filings for investigative journalism.
Monitors all SEC filings for disclosures of nation-state cyber attacks.
Monitors semiconductor companies for disclosures of China-related trade restrictions from the Bureau of Industry and Security (BIS).
- Python 3.8+
- Dependencies listed in
requirements.txt
pip install -r requirements.txtBoth scripts require updating the output directory path and email settings:
In sec_cyber_monitor.py and bis_china_monitor.py:
- Update
OUTPUT_DIRto your desired location - Configure email settings (Gmail address and app password)
- Update
ALERT_RECIPIENTSlist
- Polls SEC's RSS feed every 15 minutes for new filings
- Searches all filing types (10-K, 10-Q, 8-K, etc.) from all companies
- Uses proximity search to find cyber incident terms near nation-state references
- Logs matches to CSV with excerpts and links
python sec_cyber_monitor.pyResults saved to: cyber_incidents.csv
CSV columns:
- timestamp
- company_name
- cik (SEC Central Index Key)
- filing_type
- filing_date
- filing_url
- page_number (estimated, if detectable)
- cyber_terms_found
- nation_state_terms_found
- excerpt (~400 characters)
Cyber incident terms:
- cybersecurity incident, cyber incident, cyber attack, cyberattack
- data breach, security breach
- unauthorized access, network intrusion, security intrusion
- malicious actor, threat actor
Nation-state terms:
- nation-state, nation state
- state-sponsored, state sponsored
- foreign government, foreign actor, foreign threat
- china, chinese, russia, russian, iran, iranian, north korea
- advanced persistent threat, APT
Proximity: Terms must appear within 100 words of each other.
Ribbon Communications 10-Q (September 2025):
"In early September 2025, the Company became aware that unauthorized persons, reportedly associated with a nation-state actor, had gained access to the Company's IT network."
Link: https://www.sec.gov/ix?doc=/Archives/edgar/data/1708055/000170805525000035/rbbn-20250930x10q.htm
- Monitors filings from 31 Philadelphia Semiconductor Index (SOX) companies plus Cadence and Synopsys
- Checks every 5 minutes for new filings
- Searches for mentions of China-related trade restrictions from BIS
- Sends email alerts for matches
- Logs matches to CSV with excerpts and links
python bis_china_monitor.py31 SOX index constituents plus:
- Cadence Design Systems (CDNS)
- Synopsys (SNPS)
Full list includes: AMD, ADI, AMAT, AMKR, ARM, ASML, AVGO, CDNS, COHR, CRUS, ENTG, GFS, INTC, KLAC, LRCX, LSCC, MCHP, MPWR, MRVL, MTSI, MU, NVDA, NXPI, ON, ONTO, QCOM, QRVO, SWKS, TER, TSM, TXN, SNPS
Results saved to: bis_china_disclosures.csv
CSV columns:
- timestamp
- company_name
- ticker
- cik
- filing_type
- filing_date
- filing_url
- bis_terms_found
- china_terms_found
- excerpt (~500 characters)
BIS/Trade terms:
- bureau of industry and security, bis
- export control, export restriction
- export administration regulations, ear
- commerce department, trade restriction
- entity list, denied persons list, unverified list
- license required, license is now required
- licensing requirement, export license
- commerce control list
- military end use, military end user
- unacceptable risk
- export control classification
China terms:
- china, chinese, prc, people's republic of china
Proximity: Terms must appear within 150 words of each other.
Cadence Design Systems 8-K (May 2025):
Disclosure of BIS export control changes affecting sales to Chinese customers, including language "license is now required"
- Fetch SEC RSS feed (updated every 10 minutes by SEC)
- Parse filing metadata (company, type, date, URL)
- Download full filing HTML
- Extract text content
- Perform proximity search for term combinations
- Log matches to CSV
- Send email alerts (BIS monitor only)
- Track processed filings to avoid duplicates
- Repeat at configured interval
cyber_incidents.csv- Match resultsseen_filings.json- Tracking file
bis_china_disclosures.csv- Match resultsbis_seen_filings.json- Tracking file
- Both scripts respect SEC rate limits (0.1-0.15 second delays between requests)
- Use Reuters user agent for identification
- BIS monitor filters RSS feed to only process target companies
- Cyber monitor processes all companies
- Press Ctrl+C to stop either monitor
- Can run both simultaneously in separate terminal windows/screens
Run scripts directly in separate terminal windows.
Use screen or tmux to keep scripts running:
# Start cyber monitor
screen -S cyber
python3 sec_cyber_monitor.py
# Press Ctrl+A then D to detach
# Start BIS monitor
screen -S bis
python3 bis_china_monitor.py
# Press Ctrl+A then D to detach
# Reattach to check status
screen -r cyber
screen -r bisWhen scripts are updated:
git pull
# Then restart the appropriate monitor(s)