From 4594cad5e53df203fcb238bb3287ae7835a53123 Mon Sep 17 00:00:00 2001 From: patrickbeane Date: Thu, 5 Nov 2026 16:34:25 -0500 Subject: [PATCH] feat: render the AbuseIPDB report count from public/abuseipdb.json infra-monitor pushes the count; a push to the file now triggers the workflow, which shows it rounded down to the thousand. Falls back to the previous figure until the file is first published. Co-Authored-By: Claude Opus 5.5 --- .gitea/workflows/update-readme.yaml | 17 ++++++++++++++++- README.template | 2 +- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/update-readme.yaml b/.gitea/workflows/update-readme.yaml index c8d2658..7e8468a 100644 --- a/.gitea/workflows/update-readme.yaml +++ b/.gitea/workflows/update-readme.yaml @@ -4,6 +4,7 @@ on: paths: - 'public/code-stats.json' - 'public/heatmap.json' + - 'public/abuseipdb.json' workflow_dispatch: jobs: @@ -50,10 +51,24 @@ jobs: echo "FORMATTED_LOC=$FORMATTED_LOC" >> "$GITHUB_ENV" + # Pushed by infra-monitor's push_profile_stats.py. Shown rounded down to + # the thousand ("31,000+"); falls back to the last hand-written figure + # if the file hasn't been published yet. + ABUSE_FILE="public/abuseipdb.json" + if [ -f "$ABUSE_FILE" ]; then + ABUSE_REPORTS=$(jq -er '.total_reports' "$ABUSE_FILE") + FORMATTED_ABUSE=$(python3 -c \ + 'import sys; n=int(sys.argv[1]); print(f"{n // 1000 * 1000:,}+")' "$ABUSE_REPORTS") + else + FORMATTED_ABUSE="30,000+" + fi + echo "AbuseIPDB reports: $FORMATTED_ABUSE" + python3 scripts/generate_heatmap_svg.py public/heatmap.json public/heatmap.svg sed "s/REPLACE_ME_LOC/$FORMATTED_LOC/g" README.template | \ - sed "s/REPLACE_ME_COMMITS/$TOTAL_COMMITS/g" > README.md + sed "s/REPLACE_ME_COMMITS/$TOTAL_COMMITS/g" | \ + sed "s/REPLACE_ME_ABUSE/$FORMATTED_ABUSE/g" > README.md - name: Commit and Push run: | diff --git a/README.template b/README.template index 1cec4a8..d0f2851 100644 --- a/README.template +++ b/README.template @@ -13,7 +13,7 @@ I build and operate beane.me, a self-directed multi-cloud production platform. E | **Fleet** | 10+ nodes: 4 MicroK8s clusters (Flux v2), 8 Docker hosts (Doco-CD) | | **Uptime** | 99.97% measured (HetrixTools) | | **Security fleet** | 8 nodes running CrowdSec agents with nftables enforcement | -| **Threat reporting** | 30,000+ automated AbuseIPDB reports at 100% accuracy | +| **Threat reporting** | `REPLACE_ME_ABUSE` automated AbuseIPDB reports at 100% accuracy | | **Recovery** | Multiple daily encrypted Borgmatic snapshots offsite; automated restore tests monthly | | **Code** | `REPLACE_ME_LOC` lines of custom code, the majority in [tfSTRIDE](https://tfstride.beane.me) | | **Commits** | `REPLACE_ME_COMMITS` authored commits since January 1 (bot and dependency-update commits excluded) | -- 2.54.1