Skip to content

Daily scraper of CISA KEV json #527

Daily scraper of CISA KEV json

Daily scraper of CISA KEV json #527

name: Daily scraper of CISA KEV json
on:
workflow_dispatch:
schedule:
- cron: '0 0 * * *'
jobs:
scheduled:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Scrape CISA KEV
run: curl -f --silent --output cisa-kev.json https://www.cisa.gov/sites/default/files/feeds/known_exploited_vulnerabilities.json
- name: Scrape InTheWIld
run: curl -f --silent --output inthewild_exploited_cves.json https://inthewild.io/api/exploited
- name: Scrape InTheWIld.db
run: |-
history_folder="inthewild_db/historical"
if [ -d "$history_folder" ]; then
rm -rf "$history_folder"
echo "Removed $history_folder"
fi
mkdir -p $history_folder
mv inthewild_db/inthewild.db.part* $history_folder
curl -f --silent https://pub-4c1eae2a180542b19ea7c88f1e4ccf07.r2.dev/inthewild.db | split -b 15M -d - inthewild_db/inthewild.db.part
- name: Commit and push if it changed
run: |-
git config user.name "AutomatedDailyUpdater"
git config user.email "benji@no.reply"
git add -A
timestamp=$(date -u)
git commit -m "Update json: ${timestamp}" || exit 0
git push