Skip to content

Commit 1b577c0

Browse files
authored
feat(ci): Add security vulnerability skill action (#19355)
Closes #19368 (added automatically)
1 parent 8938323 commit 1b577c0

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Fix Security Vulnerability
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
alert:
7+
description:
8+
'Dependabot alert number or URL (e.g. 1046 or
9+
https://github.com/getsentry/sentry-javascript/security/dependabot/1046)'
10+
required: true
11+
12+
concurrency:
13+
group: fix-security-vuln-${{ github.event.inputs.alert }}
14+
cancel-in-progress: false
15+
16+
jobs:
17+
fix-vulnerability:
18+
runs-on: ubuntu-latest
19+
environment: ci-triage
20+
permissions:
21+
contents: write
22+
pull-requests: write
23+
security-events: read
24+
issues: write
25+
steps:
26+
- uses: actions/checkout@v4
27+
with:
28+
ref: develop
29+
30+
- uses: anthropics/claude-code-action@v1
31+
with:
32+
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
33+
prompt: |
34+
/fix-security-vulnerability ${{ github.event.inputs.alert }}
35+
36+
IMPORTANT: Do NOT dismiss any alerts. Do NOT wait for approval.
37+
38+
If you can fix the vulnerability:
39+
Create a branch named fix/security-<alert-number>, apply the fix, and open a PR with your analysis
40+
in the PR description. Target the develop branch.
41+
42+
If you determine the alert should NOT be fixed:
43+
Do NOT dismiss the alert. Instead, open a GitHub issue with:
44+
- Title: "Security: Dismiss Dependabot alert #<number> - <package-name>"
45+
- Label: "Security"
46+
- Body: Include the full vulnerability details, your analysis,
47+
the recommended dismissal reason, and why the alert cannot/should not be fixed.
48+
claude_args: |
49+
--max-turns 20 --allowedTools "Bash(gh api repos/getsentry/sentry-javascript/dependabot/alerts/*),Bash(gh pr create *),Bash(gh issue create *),Bash(yarn why *),Bash(yarn install*),Bash(yarn dedupe-deps:*),Bash(npm view *),Bash(git checkout *),Bash(git add *),Bash(git commit *),Edit,Write"

0 commit comments

Comments
 (0)