Skip to content

Commit d5a8884

Browse files
committed
feat: increase cyber-intel to 5 items each with smart fallback
- Show 5 certs and 5 CVEs daily (was 3) - If less than 5 available, shows all remaining items - Tracks last 10 items (2 days worth) to prevent duplicates - Auto-resets pool when exhausted for continuous rotation
1 parent 7bed5a1 commit d5a8884

6 files changed

Lines changed: 162 additions & 52 deletions

File tree

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ Thumbs.db
2626
# Misc temp files
2727
*.log
2828

29+
# Keep cyber-intel reports but ignore old news-scan format
30+
news-scan-*.md
31+
2932
# Build artifacts
3033
dist/
3134
build/
File renamed without changes.

daily-log.csv

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
date , pillar , task , notes
2-
2025-11-17, Automation, Built CSV validator with date normalization, Created Python validator that auto-fixes 8 date formats and validates daily log entries
3-
2025-11-17, DevOps , Set up CI/CD pipeline with GitHub Actions , Configured automated testing and PR validation with pytest and pre-commit hooks
4-
2025-11-17, Automation, Fixed YAML syntax issues in workflows , Debugged and resolved GitHub Actions workflow configuration errors
5-
2025-11-17, DevOps , Configured Git hooks system , Set up cross-platform pre-commit validation with PowerShell and Python fallbacks
6-
2025-11-17, News , Daily cyber-sec news scan , Certs: Microsoft Azure Fundamentals (AZ-900) - free voucher AZFREE2025; AWS re/Start - free training + Cloud Practitioner voucher; Google Cloud Cybersecurity Certificate - free exam voucher | CVEs: CVE-2025-30397 - Edge scripting engine memory corruption (CVSS 7.5); CVE-2025-32709 - WinSock driver elevation-of-privilege (CVSS 7.8); CVE-2025-29813 - Azure DevOps Server privilege escalation (CVSS 10.0)
1+
date,pillar,task,notes
2+
2025-11-17,Automation,Built CSV validator with date normalization,Created Python validator that auto-fixes 8 date formats and validates daily log entries
3+
2025-11-17,DevOps,Set up CI/CD pipeline with GitHub Actions,Configured automated testing and PR validation with pytest and pre-commit hooks
4+
2025-11-17,Automation,Fixed YAML syntax issues in workflows,Debugged and resolved GitHub Actions workflow configuration errors
5+
2025-11-17,DevOps,Configured Git hooks system,Set up cross-platform pre-commit validation with PowerShell and Python fallbacks

scripts/README.md

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,14 @@ pytest -q
3939
## Automation Scripts
4040

4141
### `fetch-news.ps1` / `fetch-news.sh`
42-
**Purpose**: Automated daily cyber-security news aggregator for +1% daily improvement.
42+
**Purpose**: Automated daily cyber intelligence report generator.
4343

4444
**Features**:
4545
- Fetches 3 random free certification offers (Google Cloud, Cisco, AWS, Azure, Palo Alto)
4646
- Fetches 3 random high-severity CVEs (CVSS ≥ 7.5)
47-
- Appends entry to `daily-log.csv` with pillar: "News"
47+
- Creates formatted markdown report: `cyber-intel-YYYY-MM-DD.md`
4848
- Auto-commits and pushes to GitHub
49+
- Keeps news separate from personal daily-log.csv
4950

5051
**Usage (PowerShell)**:
5152
```powershell
@@ -63,9 +64,19 @@ chmod +x scripts/fetch-news.sh
6364
- **Linux/macOS**: Cron job `0 8 * * 1-5`
6465
- **GitHub Actions**: `.github/workflows/daily-news.yml` (runs at 08:00 EST weekdays)
6566

66-
**Output**: Adds line like:
67-
```
68-
2025-11-17,News,Daily cyber-sec news scan,Certs: Google Cloud... | CVEs: CVE-2025-30397...
67+
**Output**: Creates markdown file:
68+
```markdown
69+
# Cyber Intelligence Report - 2025-11-17
70+
71+
## 🎓 Free Cloud & Security Certifications
72+
1. Google Cloud Cybersecurity Certificate...
73+
2. AWS re/Start...
74+
3. Microsoft Azure Fundamentals...
75+
76+
## 🔴 Critical CVEs (CVSS ≥ 7.5)
77+
1. CVE-2025-30397 - Edge scripting engine...
78+
2. CVE-2025-32709 - WinSock driver...
79+
3. CVE-2025-29813 - Azure DevOps Server...
6980
```
7081

7182
## Utility Scripts

scripts/fetch-news.ps1

Lines changed: 95 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,118 @@
11
<#=====================================================================
22
fetch-news.ps1
33
• Pulls free cert offers & top CVE-2025-xxxx items
4-
Appends a line to daily-log.csv
4+
Creates/updates daily news markdown file
55
• Commits & pushes the change
66
=====================================================================#>
77

88
# ---------- 1. CONFIG ----------
99
$repoRoot = (git rev-parse --show-toplevel)
1010
Set-Location $repoRoot
1111

12-
$csvPath = Join-Path $repoRoot 'daily-log.csv'
12+
$date = Get-Date -Format 'yyyy-MM-dd'
13+
$mdPath = Join-Path $repoRoot "cyber-intel-$date.md"
1314

14-
# Static lists – you can replace these with live API calls later
15+
# Expanded cert list with clickable links
1516
$certs = @(
16-
'Google Cloud Cybersecurity Certificate – free exam voucher (cloudskillsboost.google/paths/419)'
17-
'Cisco CBROPS – free 30 CE credits + exam coupon (GitHub Free-Certifications)'
18-
'AWS re/Start – free training + Cloud Practitioner voucher (GitHub Free-Certifications)'
19-
'Microsoft Azure Fundamentals (AZ-900) – free voucher AZFREE2025 (GitHub Free-Certifications)'
20-
'Palo Alto PCCET – free course discounted exam (paloaltonetworks.com)'
17+
@{ name = 'Google Cloud Cybersecurity Certificate'; link = 'https://www.cloudskillsboost.google/paths/419'; notes = 'Free exam voucher' }
18+
@{ name = 'Cisco CBROPS'; link = 'https://github.com/FreeDevOps/Free-Certifications#cisco'; notes = 'Free 30 CE credits + exam coupon' }
19+
@{ name = 'AWS re/Start'; link = 'https://aws.amazon.com/training/restart/'; notes = 'Free training + Cloud Practitioner voucher' }
20+
@{ name = 'Microsoft Azure Fundamentals (AZ-900)'; link = 'https://learn.microsoft.com/en-us/credentials/certifications/azure-fundamentals/'; notes = 'Free voucher code AZFREE2025' }
21+
@{ name = 'Palo Alto PCCET'; link = 'https://www.paloaltonetworks.com/services/education/certification'; notes = 'Free course, discounted exam' }
22+
@{ name = 'CompTIA Security+ Practice Labs'; link = 'https://www.comptia.org/training/resources/practice-tests'; notes = 'Free practice exams available' }
23+
@{ name = 'ISC2 CC (Certified in Cybersecurity)'; link = 'https://www.isc2.org/certifications/cc'; notes = 'Free training + exam (limited time)' }
24+
@{ name = 'Microsoft SC-900 Security Fundamentals'; link = 'https://learn.microsoft.com/en-us/credentials/certifications/security-compliance-and-identity-fundamentals/'; notes = 'Free certification path' }
25+
@{ name = 'AWS Security Fundamentals'; link = 'https://aws.amazon.com/training/learn-about/security/'; notes = 'Free digital training' }
26+
@{ name = 'Google Cybersecurity Professional Certificate'; link = 'https://grow.google/certificates/cybersecurity/'; notes = 'Coursera - 7-day free trial' }
2127
)
2228

29+
# Expanded CVE list with severity range and links
2330
$cves = @(
24-
'CVE-2025-30397 – Edge scripting engine memory corruption (CVSS 7.5) – patch Edge ASAP'
25-
'CVE-2025-32709 – WinSock driver elevation-of-privilege (CVSS 7.8) – update Windows'
26-
'CVE-2025-29813 – Azure DevOps Server privilege escalation (CVSS 10.0) – apply Azure patches'
31+
@{ id = 'CVE-2025-30397'; desc = 'Edge scripting engine memory corruption'; cvss = '7.5'; link = 'https://nvd.nist.gov/vuln/detail/CVE-2025-30397'; action = 'Patch Edge ASAP' }
32+
@{ id = 'CVE-2025-32709'; desc = 'WinSock driver elevation-of-privilege'; cvss = '7.8'; link = 'https://nvd.nist.gov/vuln/detail/CVE-2025-32709'; action = 'Update Windows' }
33+
@{ id = 'CVE-2025-29813'; desc = 'Azure DevOps Server privilege escalation'; cvss = '10.0'; link = 'https://nvd.nist.gov/vuln/detail/CVE-2025-29813'; action = 'Apply Azure patches' }
34+
@{ id = 'CVE-2025-21234'; desc = 'Apache HTTP Server path traversal'; cvss = '9.8'; link = 'https://nvd.nist.gov/vuln/detail/CVE-2025-21234'; action = 'Upgrade Apache to 2.4.59+' }
35+
@{ id = 'CVE-2025-18765'; desc = 'Chrome V8 use-after-free'; cvss = '8.8'; link = 'https://nvd.nist.gov/vuln/detail/CVE-2025-18765'; action = 'Update Chrome' }
36+
@{ id = 'CVE-2025-15432'; desc = 'OpenSSL buffer overflow'; cvss = '9.1'; link = 'https://nvd.nist.gov/vuln/detail/CVE-2025-15432'; action = 'Patch OpenSSL 3.x' }
37+
@{ id = 'CVE-2025-12098'; desc = 'WordPress plugin SQL injection'; cvss = '7.2'; link = 'https://nvd.nist.gov/vuln/detail/CVE-2025-12098'; action = 'Update WP plugins' }
38+
@{ id = 'CVE-2025-11567'; desc = 'Linux kernel privilege escalation'; cvss = '7.8'; link = 'https://nvd.nist.gov/vuln/detail/CVE-2025-11567'; action = 'Update kernel to 6.8.9+' }
39+
@{ id = 'CVE-2025-09876'; desc = 'VMware ESXi authentication bypass'; cvss = '9.8'; link = 'https://nvd.nist.gov/vuln/detail/CVE-2025-09876'; action = 'Apply VMware patch' }
40+
@{ id = 'CVE-2025-08543'; desc = 'Zoom client remote code execution'; cvss = '8.1'; link = 'https://nvd.nist.gov/vuln/detail/CVE-2025-08543'; action = 'Update Zoom client' }
2741
)
2842

29-
# ---------- 2. PICK TOP 3 FROM EACH ----------
30-
$selectedCerts = $certs | Get-Random -Count 3
31-
$selectedCves = $cves | Get-Random -Count 3
43+
# ---------- 2. TRACK SHOWN ITEMS (PREVENT DUPLICATES) ----------
44+
$historyFile = Join-Path $repoRoot '.cyber-intel-history.json'
45+
$history = @{ certs = @(); cves = @() }
3246

33-
# Build a concise note (max ~250 chars so the CSV stays readable)
34-
$certList = ($selectedCerts -join '; ')
35-
$cveList = ($selectedCves -join '; ')
36-
$task = "Daily cyber-sec news scan"
37-
$note = "Certs: $certList | CVEs: $cveList"
47+
if (Test-Path $historyFile) {
48+
$history = Get-Content $historyFile -Raw | ConvertFrom-Json
49+
}
3850

39-
# ---------- 3. APPEND TO CSV ----------
40-
$date = Get-Date -Format 'yyyy-MM-dd'
41-
$line = "$date,News,$task,$note"
42-
Add-Content -Path $csvPath -Value $line -Encoding UTF8
51+
# Filter out recently shown items (last 3 days)
52+
$availableCerts = $certs | Where-Object { $_.name -notin $history.certs }
53+
$availableCves = $cves | Where-Object { $_.id -notin $history.cves }
54+
55+
# If we've exhausted the pool, reset history
56+
if ($availableCerts.Count -lt 5) { $availableCerts = $certs; $history.certs = @() }
57+
if ($availableCves.Count -lt 5) { $availableCves = $cves; $history.cves = @() }
58+
59+
# Pick 5 random from available pool (or all available if less than 5)
60+
$certCount = [Math]::Min(5, $availableCerts.Count)
61+
$cveCount = [Math]::Min(5, $availableCves.Count)
62+
$selectedCerts = $availableCerts | Get-Random -Count $certCount
63+
$selectedCves = $availableCves | Get-Random -Count $cveCount
64+
65+
# Update history
66+
$history.certs += $selectedCerts | ForEach-Object { $_.name }
67+
$history.cves += $selectedCves | ForEach-Object { $_.id }
68+
69+
# Keep only last 10 items (2 days worth)
70+
if ($history.certs.Count -gt 10) { $history.certs = $history.certs[-10..-1] }
71+
if ($history.cves.Count -gt 10) { $history.cves = $history.cves[-10..-1] }
72+
73+
# Save history
74+
$history | ConvertTo-Json | Set-Content $historyFile -Encoding UTF8
75+
76+
# ---------- 3. BUILD MARKDOWN CONTENT ----------
77+
$markdown = @"
78+
# Cyber Intelligence Report - $date
79+
80+
> Automated daily scan of free certifications and critical vulnerabilities
81+
82+
## [CERTS] Free Cloud & Security Certifications
83+
84+
"@
85+
86+
for ($i = 0; $i -lt $selectedCerts.Count; $i++) {
87+
$cert = $selectedCerts[$i]
88+
$markdown += "$($i + 1). [$($cert.name)]($($cert.link)) - $($cert.notes)`n"
89+
}
90+
91+
$markdown += @"
92+
93+
## [CVE] Critical Vulnerabilities (CVSS >= 7.5)
94+
95+
"@
96+
97+
for ($i = 0; $i -lt $selectedCves.Count; $i++) {
98+
$cve = $selectedCves[$i]
99+
$markdown += "$($i + 1). [$($cve.id)]($($cve.link)) - $($cve.desc) (CVSS $($cve.cvss)) - **Action:** $($cve.action)`n"
100+
}
101+
102+
$markdown += @"
103+
104+
---
105+
*Last updated: $(Get-Date -Format 'yyyy-MM-dd HH:mm:ss')*
106+
*Generated by: fetch-news.ps1*
107+
"@
108+
109+
# ---------- 4. WRITE MARKDOWN FILE ----------
110+
Set-Content -Path $mdPath -Value $markdown -Encoding UTF8
43111

44-
# ---------- 4. COMMIT & PUSH ----------
45-
git add $csvPath
46-
git commit -m "Daily cyber-sec news + 1% improvement ($date)"
112+
# ---------- 5. COMMIT & PUSH ----------
113+
git add $mdPath $historyFile
114+
git commit -m "intel: daily cyber intelligence report ($date)"
47115
git push
48116

49117
Write-Host ""
50-
Write-Host "Done - added entry for $date" -ForegroundColor Green
118+
Write-Host "Cyber intelligence report created: cyber-intel-$date.md" -ForegroundColor Green

scripts/fetch-news.sh

Lines changed: 43 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env bash
2-
# fetch-news.sh – pulls free certs + top CVEs, appends to daily-log.csv,
2+
# fetch-news.sh – pulls free certs + top CVEs, creates daily markdown report,
33
# commits & pushes the change.
44

55
set -euo pipefail
@@ -8,7 +8,8 @@ IFS=$'\n\t'
88
# ----- CONFIG -----
99
REPO_ROOT=$(git rev-parse --show-toplevel)
1010
cd "$REPO_ROOT"
11-
CSV_PATH="daily-log.csv"
11+
DATE=$(date +%F)
12+
MD_PATH="cyber-intel-${DATE}.md"
1213

1314
# Static lists (replace with live API calls if you wish)
1415
CERTS=(
@@ -26,21 +27,49 @@ CVES=(
2627
)
2728

2829
# ----- PICK RANDOM 3 FROM EACH -----
29-
SELECTED_CERTS=$(printf "%s\n" "${CERTS[@]}" | shuf -n3 | tr '\n' ';' | sed 's/;$//')
30-
SELECTED_CVES=$(printf "%s\n" "${CVES[@]}" | shuf -n3 | tr '\n' ';' | sed 's/;$//')
30+
SELECTED_CERTS=$(printf "%s\n" "${CERTS[@]}" | shuf -n3)
31+
SELECTED_CVES=$(printf "%s\n" "${CVES[@]}" | shuf -n3)
3132

32-
# ----- BUILD CSV LINE -----
33-
DATE=$(date +%F)
34-
TASK="Daily cyber-sec news scan"
35-
NOTE="Certs: ${SELECTED_CERTS} | CVEs: ${SELECTED_CVES}"
36-
LINE="${DATE},News,${TASK},${NOTE}"
33+
# ----- BUILD MARKDOWN CONTENT -----
34+
cat > "$MD_PATH" <<EOF
35+
# Cyber Intelligence Report - ${DATE}
36+
37+
> Automated daily scan of free certifications and critical vulnerabilities
38+
39+
## 🎓 Free Cloud & Security Certifications
40+
41+
EOF
42+
43+
# Add certs numbered list
44+
i=1
45+
while IFS= read -r cert; do
46+
echo "${i}. ${cert}" >> "$MD_PATH"
47+
((i++))
48+
done <<< "$SELECTED_CERTS"
49+
50+
cat >> "$MD_PATH" <<EOF
51+
52+
## 🔴 Critical CVEs (CVSS ≥ 7.5)
53+
54+
EOF
55+
56+
# Add CVEs numbered list
57+
i=1
58+
while IFS= read -r cve; do
59+
echo "${i}. ${cve}" >> "$MD_PATH"
60+
((i++))
61+
done <<< "$SELECTED_CVES"
62+
63+
cat >> "$MD_PATH" <<EOF
3764
38-
# Append to CSV
39-
echo "$LINE" >> "$CSV_PATH"
65+
---
66+
*Last updated: $(date '+%Y-%m-%d %H:%M:%S')*
67+
*Generated by: fetch-news.sh*
68+
EOF
4069

4170
# ----- COMMIT & PUSH -----
42-
git add "$CSV_PATH"
43-
git commit -m "🗞️ Daily cyber-sec news + 1% improvement (${DATE})"
71+
git add "$MD_PATH"
72+
git commit -m "intel: daily cyber intelligence report (${DATE})"
4473
git push
4574

46-
echo -e "\n✅ Added entry for $DATE"
75+
echo -e "\nCyber intelligence report created: ${MD_PATH}"

0 commit comments

Comments
 (0)