-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
feat(ci): Add security vulnerability skill action #19355
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+49
−0
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
ccd35f9
add security vulnerability action
nicohrubec 4b02e8d
yarn fix
nicohrubec 4d08691
remove issues write permission
nicohrubec 4035030
update workflow
nicohrubec f99bf8e
simplify
nicohrubec 60b1999
Merge branch 'develop' into nh/automatie-security-skill
nicohrubec c5b5389
add tools
nicohrubec 22a9e39
restrict permissions
nicohrubec f7828b0
reduce permissions
nicohrubec a00f700
.
nicohrubec 3d34fce
only manual trigger
nicohrubec 1f29914
Merge branch 'develop' into nh/automatie-security-skill
nicohrubec 14f5ae2
edit write
nicohrubec File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| name: Fix Security Vulnerability | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| inputs: | ||
| alert: | ||
| description: | ||
| 'Dependabot alert number or URL (e.g. 1046 or | ||
| https://github.com/getsentry/sentry-javascript/security/dependabot/1046)' | ||
| required: true | ||
|
|
||
| concurrency: | ||
| group: fix-security-vuln-${{ github.event.inputs.alert }} | ||
| cancel-in-progress: false | ||
|
|
||
| jobs: | ||
| fix-vulnerability: | ||
| runs-on: ubuntu-latest | ||
| environment: ci-triage | ||
| permissions: | ||
| contents: write | ||
| pull-requests: write | ||
| security-events: read | ||
| issues: write | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| with: | ||
| ref: develop | ||
|
|
||
| - uses: anthropics/claude-code-action@v1 | ||
| with: | ||
| anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }} | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. And you'll need |
||
| prompt: | | ||
| /fix-security-vulnerability ${{ github.event.inputs.alert }} | ||
|
|
||
| IMPORTANT: Do NOT dismiss any alerts. Do NOT wait for approval. | ||
sentry[bot] marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| If you can fix the vulnerability: | ||
| Create a branch named fix/security-<alert-number>, apply the fix, and open a PR with your analysis | ||
| in the PR description. Target the develop branch. | ||
|
|
||
| If you determine the alert should NOT be fixed: | ||
| Do NOT dismiss the alert. Instead, open a GitHub issue with: | ||
| - Title: "Security: Dismiss Dependabot alert #<number> - <package-name>" | ||
| - Label: "Security" | ||
| - Body: Include the full vulnerability details, your analysis, | ||
| the recommended dismissal reason, and why the alert cannot/should not be fixed. | ||
| claude_args: | | ||
| --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" | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.