nsecx

- NSEC[3] Walking for DNSSEC
git clone git://git.acid.vegas/nsecx.git
Log | Files | Refs | Archive | README | LICENSE

dnssec-stats.yml (2039B)

      1 name: DNSSEC Statistics Update
      2 
      3 on:
      4   schedule:
      5     - cron: '0 0 * * *'  # Run at midnight UTC daily
      6   workflow_dispatch:      # Allow manual trigger
      7 
      8 jobs:
      9   update-stats:
     10     runs-on: ubuntu-latest
     11     permissions:
     12       contents: write
     13     
     14     steps:
     15       - uses: actions/checkout@v4
     16 
     17       - name: Install dependencies
     18         run: |
     19           sudo apt-get update
     20           sudo apt-get install -y bind9-utils
     21 
     22       - name: Run tldsec script
     23         run: |
     24           chmod +x extras/tldsec
     25           ./extras/tldsec
     26 
     27       - name: Update README statistics
     28         run: |
     29           # Calculate statistics
     30           nsec3_count=$(wc -l < dnssec_stats/nsec3.txt)
     31           nsec_count=$(wc -l < dnssec_stats/nsec.txt)
     32           nodnssec_count=$(wc -l < dnssec_stats/nodnssec.txt)
     33           total=$((nsec3_count + nsec_count + nodnssec_count))
     34           
     35           # Calculate percentages
     36           nsec3_percent=$(awk "BEGIN {printf \"%.0f\", ($nsec3_count/$total)*100}")
     37           nsec_percent=$(awk "BEGIN {printf \"%.0f\", ($nsec_count/$total)*100}")
     38           nodnssec_percent=$(awk "BEGIN {printf \"%.0f\", ($nodnssec_count/$total)*100}")
     39           
     40           # Update README.md statistics section
     41           sed -i "/## DNSSEC Statistics/,/^$/ c\## DNSSEC Statistics\n| Status                                   | Percentage | TLDs  |\n| ---------------------------------------- | ---------- | ----- |\n| [NSEC3](./dnssec_stats/nsec3.txt)        | ${nsec3_percent}%        | ${nsec3_count} |\n| [NSEC](./dnssec_stats/nsec.txt)          | ${nsec_percent}%         | ${nsec_count}    |\n| [NO DNSSEC](./dnssec_stats/nodnssec.txt) | ${nodnssec_percent}%         | ${nodnssec_count}    |\n" README.md
     42 
     43       - name: Commit and push changes
     44         run: |
     45           git config --local user.email "github-actions[bot]@users.noreply.github.com"
     46           git config --local user.name "github-actions[bot]"
     47           git add dnssec_stats/* README.md
     48           git commit -m "Update DNSSEC statistics [skip ci]" || exit 0
     49           git push