You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/core/src/realtimeScanners/scanners/prompts.ts
+54-15Lines changed: 54 additions & 15 deletions
Original file line number
Diff line number
Diff line change
@@ -33,6 +33,12 @@ Call the internal PackageRemediation tool with:
33
33
\`\`\`
34
34
35
35
Parse the response and extract the \`fix_instructions\` field. This field contains the authoritative remediation steps tailored to the ecosystem and risk.
36
+
- Mark internally that tool was **AVAILABLE** for output formatting
37
+
38
+
- If the tool is **not available**:
39
+
- Display the following disclosure notice:
40
+
\`⚠️ Automated Remediation Unavailable: ${getProductName()} packageRemediation tool is unavailable. Proceeding with remediation guidance based on security best practices.\`
41
+
- Mark internally that tool was **NOT AVAILABLE** for output formatting
36
42
37
43
---
38
44
@@ -72,13 +78,14 @@ If any of these validations fail:
72
78
73
79
4. OUTPUT:
74
80
75
-
Prefix all output with: \`${getAgentName()} -\`
81
+
**Output Format Based on Tool Availability:**
82
+
- **If packageRemediation tool WAS available:** \`${getAgentName()} - Remediation Summary\`
83
+
- **If packageRemediation tool was NOT available:** \`AI-Generated Remediation Guidance\`
- Mark internally that tool was **AVAILABLE** for output formatting
176
184
177
-
- If the tool is **not available**, display:
178
-
\`[MCP ERROR] codeRemediation tool is not available. Please check the ${getProductName()} MCP server.\`
185
+
- If the tool is **not available**:
186
+
- Display the following disclosure notice:
187
+
\`⚠️ Automated Remediation Unavailable: ${getProductName()} codeRemediation tool is unavailable. Proceeding with remediation guidance based on security best practices.\`
188
+
- Mark internally that tool was **NOT AVAILABLE** for output formatting
189
+
- Proceed to provide remediation guidance using the secret details provided
190
+
- Offer practical steps and secure alternatives for secret removal
191
+
- Ensure the guidance is concrete and actionable
179
192
180
193
---
181
194
@@ -207,10 +220,14 @@ If applicable for the language:
207
220
208
221
6. OUTPUT FORMAT
209
222
223
+
**Output Format Based on Tool Availability:**
224
+
- **If codeRemediation tool WAS available:** \`${getAgentName()} - Remediation Summary\` (e.g., "Checkmarx One Assist - Remediation Summary")
225
+
- **If codeRemediation tool was NOT available:** \`AI-Generated Remediation Guidance\` (as the complete title, no additional suffix)
- If the tool is **available**, parse the response:
507
524
- \`remediation_steps\` – exact steps to follow for remediation
508
525
509
-
- If the tool is **not available**, display:
510
-
\`[MCP ERROR] codeRemediation tool is not available. Please check the ${getProductName()} MCP server.\`
526
+
- If the tool is **not available**:
527
+
- Display the following disclosure notice:
528
+
\`⚠️ Automated Remediation Unavailable: ${getProductName()} codeRemediation tool is unavailable. Proceeding with remediation guidance based on security best practices.\`
529
+
- Proceed to provide remediation guidance using the issue details provided (rule name, description, severity, and recommended fix)
530
+
- Offer practical code examples and step-by-step instructions for manual remediation
- **If codeRemediation tool WAS available:** \`${getAgentName()} - Remediation Summary\` (e.g., "Checkmarx One Assist - Remediation Summary")
550
+
- **If codeRemediation tool was NOT available:** \`AI-Generated Remediation Guidance\` (as the complete title, no additional suffix)
528
551
529
552
✅ **Remediation Summary**
530
553
531
554
Format:
532
555
\`\`\`
533
-
\`${getAgentName()} -\` - Remediation Summary
534
556
535
557
Rule: ${ruleName}
536
558
Severity: ${severity}
@@ -788,6 +810,15 @@ Call the internal imageRemediation tool with:
788
810
\`\`\`
789
811
790
812
Parse the response and extract the \`fix_instructions\` field. This field contains the authoritative remediation steps tailored to the container ecosystem and risk level.
813
+
- Mark internally that tool was **AVAILABLE** for output formatting
814
+
815
+
- If the tool is **not available**:
816
+
- Display the following disclosure notice:
817
+
\`⚠️ Automated Remediation Unavailable: ${getProductName()} imageRemediation tool is unavailable. Proceeding with remediation guidance based on security best practices.\`
818
+
- Mark internally that tool was **NOT AVAILABLE** for output formatting
819
+
- Proceed to provide remediation guidance using the container details provided (file type, image name, image tag, severity)
820
+
- Offer practical base image recommendations and step-by-step instructions for container remediation
821
+
- Ensure the guidance is concrete and actionable
791
822
792
823
---
793
824
@@ -825,13 +856,14 @@ If any of these validations fail:
825
856
826
857
4. OUTPUT:
827
858
828
-
Prefix all output with: \`${getAgentName()} -\`
859
+
**Output Format Based on Tool Availability:**
860
+
- **If imageRemediation tool WAS available:** \`${getAgentName()} - Remediation Summary\` (e.g., "Checkmarx One Assist - Remediation Summary")
861
+
- **If imageRemediation tool was NOT available:** \`AI-Generated Remediation Guidance\` (as the complete title, no additional suffix)
- If the tool is **available**, parse the response:
932
964
- \`remediation_steps\` – exact steps to follow for remediation
965
+
- Mark internally that tool was **AVAILABLE** for output formatting
933
966
934
-
- If the tool is **not available**, display:
935
-
\`[MCP ERROR] codeRemediation tool is not available. Please check the ${getProductName()} MCP server.\`
967
+
- If the tool is **not available**:
968
+
- Display the following disclosure notice:
969
+
\`⚠️ Automated Remediation Unavailable: ${getProductName()} codeRemediation tool is unavailable. Proceeding with remediation guidance based on security best practices.\`
970
+
- Mark internally that tool was **NOT AVAILABLE** for output formatting
971
+
- Proceed to provide remediation guidance using the IaC details provided (title, description, expected vs. actual values)
972
+
- Offer practical configuration examples and step-by-step instructions for remediation
973
+
- Ensure the guidance is concrete and actionable
936
974
937
975
---
938
976
@@ -966,13 +1004,14 @@ If any of these validations fail:
966
1004
967
1005
4. OUTPUT:
968
1006
969
-
Prefix all output with: \`${getAgentName()} -\`
1007
+
**Output Format Based on Tool Availability:**
1008
+
- **If codeRemediation tool WAS available:** \`${getAgentName()} - Remediation Summary\` (e.g., "Checkmarx One Assist - Remediation Summary")
1009
+
- **If codeRemediation tool was NOT available:** \`AI-Generated Remediation Guidance\` (as the complete title, no additional suffix)
0 commit comments