-
Notifications
You must be signed in to change notification settings - Fork 121
47 lines (35 loc) · 1.47 KB
/
wordfence-crawler.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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
name: 🕷 Wordfence crawler
on:
schedule:
- cron: '25 3 * * *'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
# run src/main.py for API if there are new vulns found
- name: Process vulnerabilities of Wordfence API source (production)
run: |
python src/main.py --api_endpoint https://www.wordfence.com/api/intelligence/v2/vulnerabilities/production
- name: Process vulnerabilities of Wordfence API source (scanner aka fresh/unfinished issues)
run: |
python src/main.py --api_endpoint https://www.wordfence.com/api/intelligence/v2/vulnerabilities/scanner
- name: Commit new vulnerability templates
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git status | grep "yaml" | while read -r line; do git add "$line" && git commit -m "New Nuclei template for $(basename $line) [$(date)] :robot:" ; done
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.SECRET_TOKEN }}