diff --git a/.github/workflows/security-scan.yml b/.github/workflows/security-scan.yml new file mode 100644 index 00000000..8f8dd184 --- /dev/null +++ b/.github/workflows/security-scan.yml @@ -0,0 +1,39 @@ +name: Weekly Security Scan + +on: + schedule: + - cron: "0 9 * * 1" # Every Monday at 09:00 UTC + workflow_dispatch: # Allow manual trigger + +permissions: + contents: write + +jobs: + scan: + runs-on: ubuntu-latest + timeout-minutes: 120 + + steps: + - uses: actions/checkout@v4 + + - uses: astral-sh/setup-uv@v5 + with: + enable-cache: true + + - name: Install dependencies + run: uv sync + + - name: Run security scan + env: + SKILL_SCANNER_LLM_API_KEY: ${{ secrets.SKILL_SCANNER_LLM_API_KEY }} + SKILL_SCANNER_LLM_MODEL: ${{ vars.SKILL_SCANNER_LLM_MODEL || 'claude-sonnet-4-6' }} + run: uv run python scan_skills.py + + - name: Commit updated SECURITY.md + run: | + git diff --quiet SECURITY.md && exit 0 + git config user.name "github-actions[bot]" + git config user.email "41898282+github-actions[bot]@users.noreply.github.com" + git add SECURITY.md + git commit -m "chore: update security scan report [skip ci]" + git push