CWE Data Fetch and Update #4
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: CWE Data Fetch and Update | |
on: | |
schedule: | |
- cron: '0 0 * * 0' # Runs every Sunday at midnight | |
workflow_dispatch: # Allows manual triggering from GitHub UI | |
permissions: | |
contents: write # Grants write permissions for pushing changes | |
jobs: | |
fetch-and-process-cwe: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.9' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install requests lxml | |
- name: Run CWE script | |
run: python script.py | |
- name: Configure Git | |
run: | | |
git config --global user.name 'GitHub Actions' | |
git config --global user.email 'github-actions@users.noreply.github.com' | |
- name: Commit changes | |
run: | | |
git add cwe.json | |
git commit -m "Update CWE JSON data" | |
git push |