🕷 Wordfence crawler #617
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 "action@github.com" | |
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 }} | |