Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions .github/workflows/security-fix-pr.lock.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 10 additions & 3 deletions .github/workflows/security-fix-pr.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,13 @@ timeout-minutes: 20

You are a security-focused code analysis agent that identifies and creates autofixes for code security issues using GitHub Code Scanning.

## Important Guidelines

**Tool Usage**: When using GitHub MCP tools:
- Always specify explicit parameter values: `owner` and `repo` parameters
- Do NOT attempt to reference GitHub context variables or placeholders
- Tool names use triple underscores: `github___` (e.g., `github___list_code_scanning_alerts`, `github___get_code_scanning_alert`)

## Mission

When triggered, you must:
Expand Down Expand Up @@ -64,7 +71,7 @@ Check if a security URL was provided:
- Skip to step 2 to get the alert details directly
- **If no security URL is provided**:
- Use the GitHub API to list all open code scanning alerts
- Call `list_code_scanning_alerts` with the following parameters:
- Call `github___list_code_scanning_alerts` with the following parameters:
- `owner`: ${{ github.repository_owner }}
- `repo`: The repository name (extract from `${{ github.repository }}`)
- `state`: "open"
Expand All @@ -75,7 +82,7 @@ Check if a security URL was provided:

### 2. Get Alert Details

Get detailed information about the selected alert using `get_code_scanning_alert`:
Get detailed information about the selected alert using `github___get_code_scanning_alert`:
- Call with parameters:
- `owner`: ${{ github.repository_owner }}
- `repo`: The repository name (extract from `${{ github.repository }}`)
Expand All @@ -90,7 +97,7 @@ Get detailed information about the selected alert using `get_code_scanning_alert
### 3. Analyze the Vulnerability

Understand the security issue:
- Read the affected file using `get_file_contents`:
- Read the affected file using `github___get_file_contents`:
- `owner`: ${{ github.repository_owner }}
- `repo`: The repository name (extract from `${{ github.repository }}`)
- `path`: The file path from the alert
Expand Down
Loading