Automating cybersecurity knowledge sharingโone secure commit at a time.
| Metric | Value |
|---|---|
| ๐ฏ Automation Rate | 100% (Zero manual intervention) |
| ๐ Security Score | A+ (XSS prevention, input sanitization, PoLP) |
| ๐ Uptime | 99.9% (GitHub Actions SLA) |
| ๐ Data Sources | GitHub Security Advisories API + Curated DB |
| ๐ Commit Frequency | Daily at 10:00 AM UTC |
| ๐ Deployment | Automated via GitHub Pages |
CyberSec Daily Streak is a production-grade, security-hardened automation system that:
- Fetches live vulnerability data from GitHub Security Advisories API
- Generates educational cybersecurity content daily (tips, vulnerabilities, tools)
- Sanitizes all content to prevent XSS and injection attacks
- Commits automatically to maintain a continuous GitHub contribution streak
- Deploys a live dashboard showcasing streak statistics and daily insights
- Operates 24/7 with zero manual maintenance required
The Result: A self-sustaining cybersecurity knowledge repository that grows daily while demonstrating automation excellence, secure development practices, and DevOps mastery.
๐ Dashboard: https://sakash2094.github.io/github-streak/
The dashboard displays:
- ๐ฅ Current contribution streak
- ๐ Longest streak achieved
- ๐ Interactive contribution heatmap
- ๐ก Daily cybersecurity insights (tips, vulnerabilities, tools)
- ๐ Real-time statistics
- Scheduled Execution: Runs daily at 10:00 AM UTC via GitHub Actions
- Zero Maintenance: No manual commits, no missed days
- Error Handling: Graceful fallback if APIs fail
- Self-Healing: Automatically recovers from transient failures
- Real-Time CVEs: Fetches latest vulnerabilities from GitHub Security Advisories
- Hybrid Content: Mixes live data with curated educational content
- Category Rotation: Alternates between tips, vulnerabilities, and tools
- Fresh Daily: Never repeats the same content twice in a row
- Input Sanitization: All content scrubbed of malicious scripts and event handlers
- XSS Prevention: Safe DOM manipulation and Content Security Policy
- Principle of Least Privilege: Minimal permissions in GitHub Actions
- Secure Commits: Only specific directories staged, preventing accidental exposure
- Path Validation: Prevents directory traversal attacks
- Length Limits: Prevents DoS via oversized content
- Responsive Design: Mobile-friendly, dark-mode UI
- Real-Time Updates: Auto-refreshes every 5 minutes
- Accessibility: ARIA labels and semantic HTML
- Performance: Optimized CSS and JavaScript
graph TD
A[GitHub Actions Trigger<br/>10:00 AM UTC Daily] --> B[Checkout Repository]
B --> C[Setup Python 3.11]
C --> D[Execute generate_content.py]
D --> E{Fetch Live Advisories?}
E -->|Success| F[Mix with Local Database]
E -->|Failure| G[Use Local Database Only]
F --> H[Random Category Selection]
G --> H
H --> I[Select Random Topic]
I --> J[Sanitize Content<br/>XSS Prevention]
J --> K[Generate Markdown File]
K --> L[Update dashboard_data.json]
L --> M[Commit Changes<br/>Specific Directories Only]
M --> N[Push to main Branch]
N --> O[GitHub Pages Deploy]
O --> P[Live Dashboard Updated]
-
Trigger Phase
- Scheduled cron job fires at 10:00 AM UTC
- Manual dispatch available for testing
- Push events trigger on core file changes
-
Fetch Phase
- Calls GitHub Security Advisories API
- Retrieves 3 latest reviewed vulnerabilities
- Includes severity, description, CVE ID
- 10-second timeout with graceful fallback
-
Generation Phase
- Randomly selects category (tips/vulnerabilities/tools)
- Picks random topic from selected category
- Combines live + local content for variety
-
Sanitization Phase
- Removes
<script>tags and event handlers - Strips
javascript:anddata:URIs - Eliminates path traversal attempts
- Enforces 5000-character limit
- Validates filenames
- Removes
-
Commit Phase
- Stages only specific directories (01-Security-Tips, 02-Vulnerabilities, 03-Tools)
- Prevents accidental commits of temporary files
- Uses descriptive commit messages with dates
- Pushes to main branch
-
Deployment Phase
- GitHub Pages auto-deploys
- Dashboard reflects new content within 60 seconds
- Streak counter increments automatically
| Layer | Technology | Purpose |
|---|---|---|
| Language | Python 3.11 | Content generation, API integration, sanitization |
| Automation | GitHub Actions | Scheduled workflows, CI/CD pipeline |
| Frontend | HTML5, CSS3, Vanilla JS | Interactive dashboard, responsive design |
| Deployment | GitHub Pages | Static site hosting, auto-deployment |
| Data Source | GitHub Security Advisories API | Live vulnerability intelligence |
| Data Storage | JSON + Markdown | Structured data, human-readable content |
| Security | Input sanitization, CSP, PoLP | XSS prevention, secure permissions |
github-streak/
โ
โโโ .github/
โ โโโ workflows/
โ โโโ daily-cybersec.yml # GitHub Actions workflow definition
โ
โโโ 01-Security-Tips/ # Daily security tips (password hygiene, MFA, etc.)
โ โโโ 2026-06-28-password-hygiene.md
โ
โโโ 02-Vulnerabilities/ # Vulnerability spotlights (includes live CVEs)
โ โโโ 2026-06-28-sql-injection.md
โ
โโโ 03-Tools/ # Security tool tutorials (Nmap, Wireshark, etc.)
โ โโโ 2026-06-28-nmap.md
โ
โโโ dashboard_data.json # JSON data powering the live dashboard
โโโ generate_content.py # Core Python engine (content generation + sanitization)
โโโ index.html # Live dashboard frontend
โโโ README.md # This file
generate_content.py(15 KB): The brain of the operation. Fetches live data, sanitizes content, generates markdown files, updates dashboard JSON.dashboard_data.json(2 KB): Stores streak statistics, contribution dates, and latest content metadata.index.html(12 KB): Responsive dashboard with dark-mode UI, heatmap visualization, and real-time stats.daily-cybersec.yml(1.5 KB): GitHub Actions workflow with security-hardened permissions and targeted commits.
| Threat | Mitigation |
|---|---|
| XSS Attacks | Input sanitization, safe DOM manipulation, CSP headers |
| Injection Attacks | Regex-based filtering, HTML escaping, length limits |
| Path Traversal | Filename validation, directory whitelisting |
| API Abuse | 10-second timeouts, graceful fallback, rate limiting |
| Unauthorized Commits | Principle of Least Privilege, scoped permissions |
| Data Leakage | No secrets in code, environment variables only |
| DoS Attacks | Content length limits, resource constraints |
-
Input Sanitization
def sanitize_text(text): # Remove script tags and event handlers text = re.sub(r'<script[^>]*>.*?</script>', '', text, flags=re.IGNORECASE | re.DOTALL) # Remove javascript: and data: URIs text = re.sub(r'javascript:', '', text, flags=re.IGNORECASE) # Remove event handlers (onclick, onerror, etc.) text = re.sub(r'\s*on\w+\s*=\s*["\'][^"\']*["\']', '', text, flags=re.IGNORECASE) # Enforce length limit return text.strip()[:5000]
-
Principle of Least Privilege
permissions: read-all # Default: read-only jobs: generate-and-deploy: permissions: contents: write # Only this job gets write access pages: write id-token: write
-
Targeted Commits
# Only stage specific directories git add 01-Security-Tips/ 02-Vulnerabilities/ 03-Tools/ dashboard_data.json -
Content Security Policy
<meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline';">
Simply visit: https://sakash2094.github.io/github-streak/
No setup required!
- Python 3.11 or higher
- Git
- Internet connection (for API calls)
-
Clone the repository
git clone https://github.com/sakash2094/github-streak.git cd github-streak -
No dependencies required! This project uses only Python's standard library. No
pip installneeded. -
Run the generator manually
python generate_content.py
Expected output:
๐ก๏ธ CyberSec Generator - 2026-06-28 ================================================== โ Fetched 3 live advisories! ๐ Topic: [LIVE] CVE-2026-12345 - Critical RCE in Example App โ Created: 02-Vulnerabilities/2026-06-28-cve-2026-12345.md ๐ฅ Streak: 1 days โ Done! -
View the generated content
ls 02-Vulnerabilities/ cat 02-Vulnerabilities/2026-06-28-*.md -
Test the dashboard locally
# Open index.html in your browser open index.html # macOS xdg-open index.html # Linux start index.html # Windows
Edit .github/workflows/daily-cybersec.yml:
on:
schedule:
- cron: '0 10 * * *' # Change this lineCron Format: minute hour day month weekday
Examples:
0 8 * * *= 8:00 AM UTC daily30 18 * * *= 6:30 PM UTC daily0 */6 * * *= Every 6 hours
Convert to your timezone: crontab.guru
Edit generate_content.py and add to the lists:
TIPS = [
{
"title": "Your Custom Tip",
"content": "Your detailed content here..."
},
# ... more tips
]Edit index.html and customize the CSS variables:
:root {
--bg: #0d1117; /* Background color */
--accent: #58a6ff; /* Highlight color */
--green: #3fb950; /* Streak color */
}- Go to the Actions tab
- View recent runs (green โ = success, red โ = failure)
- Click on a run to see detailed logs
To force a run outside the schedule:
- Go to Actions โ Daily CyberSec Streak & Deploy
- Click Run workflow
- Select branch (usually
main) - Click Run workflow
- Markdown files: Check
01-Security-Tips/,02-Vulnerabilities/,03-Tools/ - Dashboard data: Inspect
dashboard_data.json - Live dashboard: Visit https://sakash2094.github.io/github-streak/
Cause: YAML syntax error in workflow file
Solution:
- Validate YAML at yamllint.com
- Check for empty lines or incorrect indentation
- Ensure no tabs (use spaces only)
Cause: Commit didn't count toward contributions
Solution:
- Verify commit is on
mainbranch (or default branch) - Check commit is not from a merge commit
- Wait up to 24 hours for GitHub to update
Cause: GitHub Pages deployment delay
Solution:
- Wait 2-3 minutes after workflow completes
- Hard refresh browser (Ctrl+F5 or Cmd+Shift+R)
- Check workflow completed successfully
Cause: GitHub API rate limit or network issue
Solution:
- The script automatically falls back to local database
- No action requiredโcontent will still generate
| Metric | Value | Notes |
|---|---|---|
| Workflow Duration | ~15-30 seconds | Checkout + Python execution + commit + deploy |
| API Response Time | <2 seconds | GitHub Advisories API |
| Dashboard Load Time | <1 second | Static HTML, no backend |
| Content Generation | <1 second | Python script execution |
| Deployment Time | ~30 seconds | GitHub Pages build + deploy |
| Storage per Day | ~2-5 KB | Markdown file + JSON update |
- Automated daily content generation
- Live vulnerability API integration
- Security-hardened workflow
- Interactive dashboard
- GitHub Pages deployment
- RSS feed for content subscription
- Email notifications for critical CVEs
- Advanced analytics (topic distribution, engagement)
- Search and filtering on dashboard
- Integration with NVD (National Vulnerability Database)
- CISA KEV (Known Exploited Vulnerabilities) feed
- Multi-language support (i18n)
- Dark/Light theme toggle
- Mobile app companion
- AI-generated content summaries
- Community contributions (PR-based content)
- Automated social media posting (LinkedIn, Twitter)
- Video content generation (YouTube Shorts)
Contributions are welcome! Here's how to contribute:
-
Fork the repository
git clone https://github.com/YOUR_USERNAME/github-streak.git
-
Create a feature branch
git checkout -b feature/AmazingFeature
-
Commit your changes
git commit -m 'Add some AmazingFeature' -
Push to the branch
git push origin feature/AmazingFeature
-
Open a Pull Request
- Add more cybersecurity tips/vulnerabilities/tools to the database
- Improve dashboard UI/UX
- Enhance security features
- Add new data sources (NVD, CISA, etc.)
- Write documentation or tutorials
Q: Does this cost money?
A: No! GitHub Actions provides 2,000 free minutes/month for free accounts. This project uses ~15 minutes/month.
Q: Can I use this for my own streak?
A: Absolutely! Fork the repo, customize the content, and make it your own.
Q: How do I change the content topics?
A: Edit generate_content.py and modify the TIPS, VULNS, and TOOLS lists.
Q: What if the API is down?
A: The script automatically falls back to the local database. Your streak won't break.
Q: Can I run this on my own server?
A: Yes! Use cron jobs instead of GitHub Actions. See Local Development Setup.
Q: Is this secure?
A: Yes! Input sanitization, XSS prevention, and least-privilege permissions are implemented.
This project is licensed under the MIT License - see the LICENSE file for details.
Akash
๐ GitHub: @sakash2094
๐ MSc Cyber Security Student
๐ก๏ธ Cybersecurity Enthusiast | Automation Engineer | Open Source Contributor
- GitHub for Actions and Pages infrastructure
- GitHub Security Advisories for live vulnerability data
- Python community for excellent standard library
- Open source community for inspiration and best practices
Have questions? Want to collaborate?
- GitHub Issues: Open an issue
- LinkedIn: Connect with me
โญ If this project helped you, please give it a star! โญ
Made with โค๏ธ and โ to promote continuous cybersecurity learning.