-
Notifications
You must be signed in to change notification settings - Fork 4
31 lines (25 loc) · 898 Bytes
/
scraper.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
name: Daily scraper of CISA KEV
on:
workflow_dispatch:
schedule:
- cron: '6 18 * * *'
jobs:
scheduled:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Scrape CISA KEV CSV
run: curl --silent --output docs/$(date -I)-cisa-kev.csv https://www.cisa.gov/sites/default/files/csv/known_exploited_vulnerabilities.csv
- name: Scrape CISA KEV JSON
run: curl --silent --output docs/$(date -I)-cisa-kev-json https://www.cisa.gov/sites/default/files/feeds/known_exploited_vulnerabilities.json
- name: Commit and push if it changed
run: |-
git config user.name "Automated"
git config user.email "actions@users.noreply.github.com"
git add -A
timestamp=$(date -u)
git commit -m "Update data: ${timestamp}" || exit 0
git push