Skip to content

Commit 0751c65

Browse files
committed
feat: [AG-22] Create Initial MCP Smart Apply Rule
1 parent 8d38397 commit 0751c65

File tree

3 files changed

+17
-1
lines changed

3 files changed

+17
-1
lines changed
File renamed without changes.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
description: After implementing code changes run snyk_code_scan to ensure code security best practices
3+
alwaysApply: false
4+
---
5+
6+
# Project security best practices
7+
8+
9+
- BEFORE declaring task complete: Run snyk_code_scan tool when a significant change has been made in first party code.
10+
- This shoule only apply for Snyk-supported coding language
11+
- If any security issues are found based on newly introduced or modified code or dependencies, attempt to fix the issues using the results context from Snyk.
12+
- Rescan the code after fixing the issues to ensure that the issues were fixed and that there are no newly introduced issues.
13+
- Repeat this process until no new issues are found.

src/snyk/cli/mcp/mcp.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,10 @@ async function ensureMcpServerInJson(
240240
}
241241

242242
async function readBundledRules(vsCodeContext: vscode.ExtensionContext): Promise<string> {
243-
return await fs.promises.readFile(path.join(vsCodeContext.extensionPath, 'out', 'assets', 'snyk_rules.md'), 'utf8');
243+
return await fs.promises.readFile(
244+
path.join(vsCodeContext.extensionPath, 'out', 'assets', 'snyk_rules_always_apply.md'),
245+
'utf8',
246+
);
244247
}
245248

246249
async function writeLocalRulesForIde(relativeRulesPath: string, rulesContent: string): Promise<void> {

0 commit comments

Comments
 (0)