A real-time cyber threat visualization powered by Shodan and GitHub Actions.
The Live Threat Map Dashboard is an automated tool that fetches real-time threat data from Shodan and generates a clean, SVG-based world map of ongoing cyber activity.
- 📡 Uses Shodan API to gather live data
- ⚡ Updates every 6 hours automatically (via GitHub Actions)
- 🖼️ Produces a self-updating
threat-map.svgin your repo - 🌐 Easy to embed in README files, dashboards, or websites
Click the Fork button in the top-right corner to create your own copy.
-
Go to Settings → Secrets and variables → Actions
-
Click New repository secret
-
Add your Shodan key as:
- Name:
SHODAN_API_KEY - Value: your Shodan API key
- Name:
- Runs every 6 hours (UTC)
- Commits the new
threat-map.svgto your repo root - You can also run it manually from the Actions tab
Here’s the workflow that powers the map:
name: Generate Live Threat Map
on:
# Runs automatically every 6 hours (UTC)
schedule:
- cron: "0 */6 * * *"
# Allows manual trigger
workflow_dispatch:
jobs:
generate_threat_map:
runs-on: ubuntu-latest
name: Generate and Commit Live Threat Map
permissions:
contents: write
steps:
- name: Check out the user's repository
uses: actions/checkout@v4
- name: Generate Threat Map SVG
uses: RavinduRathnayaka/LiveThreatMap-dashboard@main
with:
SHODAN_API_KEY: ${{ secrets.SHODAN_API_KEY }}Here’s how the auto-generated map looks in action:
You can embed the SVG in any Markdown file:
Or add it to a dashboard/website as an image source:
<img src="https://raw.githubusercontent.com/<your-username>/<your-repo>/main/threat-map.svg" alt="Live Threat Map">- A valid Shodan API Key
- A GitHub repository with Actions enabled
- ✅ Automated – no manual updates needed
- ✅ Visual – global map for instant insights
- ✅ Lightweight – pure SVG, no heavy dependencies
- ✅ Customizable – fork, modify, and extend
This project is licensed under the MIT License.
Feel free to use, modify, and share!
- Want more frequent updates? Adjust the
cronschedule in.github/workflows/generate-threat-map.yml - Use GitHub Pages to serve the SVG as a live webpage
- Combine with other data feeds to build a security visualization hub