Skip to content

Commit c3a0663

Browse files
committed
Implement a local MCP server to calculate the final line numbers of the security findings.
1 parent 9038158 commit c3a0663

7 files changed

Lines changed: 1875 additions & 3 deletions

File tree

GEMINI.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ For each identified vulnerability, provide the following:
162162

163163
* **Vulnerability:** A brief name for the issue (e.g., "Cross-Site Scripting," "Hardcoded API Key").
164164
* **Severity:** Critical, High, Medium, or Low.
165-
* **Location:** The file path where the vulnerability was introduced.
165+
* **Location:** The file path where the vulnerability was introduced and the line numbers if that is available.
166166
* **Line Content:** The complete line of code where the vulnerability was found.
167167
* **Description:** A short explanation of the vulnerability and the potential impact stemming from this change.
168168
* **Recommendation:** A clear suggestion on how to remediate the issue within the new code.

commands/security/analyze.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,8 @@ You will now begin executing the plan. The following are your precise instructio
2626
2727
After completing these two initial tasks, continue executing the dynamically generated plan according to your **Core Operational Loop**.
2828
29+
**Final Report Generation**
30+
31+
When you have finished your analysis and are ready to generate the final report, you must use the `gemini-cli-security` MCP server to get the line numbers for each finding. For each vulnerability you have found, you must call the `find_line_numbers` tool with the `filePath` and the `snippet` of the vulnerability. You will then add the `startLine` and `endLine` to the final report.
32+
2933
Proceed with the Initial Planning Phase now."""

gemini-extension.json

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
{
22
"name": "gemini-cli-security",
3-
"version": "0.1.0",
4-
"contextFileName": "GEMINI.md"
3+
"version": "0.2.0",
4+
"contextFileName": "GEMINI.md",
5+
"mcpServers": {
6+
"securityServer": {
7+
"command": "node",
8+
"args": ["${extensionPath}/mcp-server/security.ts"],
9+
"env": {}
10+
}
11+
}
512
}

0 commit comments

Comments
 (0)