Monitor Vulnerabilities #678
This file contains hidden or 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: Monitor Vulnerabilities | |
| on: | |
| schedule: | |
| - cron: '0 */6 * * *' # Every 6 hours | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| issues: write | |
| concurrency: | |
| group: monitor | |
| cancel-in-progress: false # Don't cancel - avoid state corruption | |
| jobs: | |
| monitor: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Read repos config | |
| id: repos | |
| run: | | |
| echo "json<<REPOS_EOF" >> "$GITHUB_OUTPUT" | |
| cat repos.json >> "$GITHUB_OUTPUT" | |
| echo "REPOS_EOF" >> "$GITHUB_OUTPUT" | |
| - uses: spaceraccoon/vulnerability-spoiler-alert-action@d562548647b7b14eb66a0c45f334adda027e7994 | |
| with: | |
| api-key: ${{ secrets.OPENAI_API_KEY }} | |
| provider: openai | |
| model: gpt-4.1-mini | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| issue-repo: ${{ github.repository }} | |
| repositories: ${{ steps.repos.outputs.json }} | |
| max-commits: 50 | |
| enable-repo-context: false | |
| enable-judge: false | |
| - name: Commit state changes | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git add .vulnerability-spoiler-state.json | |
| git diff --staged --quiet || git commit -m "Update vulnerability monitor state" | |
| git push |