(_args, context)
| 203 | pluginName: 'security-review', |
| 204 | pluginCommand: 'security-review', |
| 205 | async getPromptWhileMarketplaceIsPrivate(_args, context) { |
| 206 | // Parse frontmatter from the markdown |
| 207 | const parsed = parseFrontmatter(SECURITY_REVIEW_MARKDOWN) |
| 208 | |
| 209 | // Parse allowed tools from frontmatter |
| 210 | const allowedTools = parseSlashCommandToolsFromFrontmatter( |
| 211 | parsed.frontmatter['allowed-tools'], |
| 212 | ) |
| 213 | |
| 214 | // Execute bash commands in the prompt |
| 215 | const processedContent = await executeShellCommandsInPrompt( |
| 216 | parsed.content, |
| 217 | { |
| 218 | ...context, |
| 219 | getAppState() { |
| 220 | const appState = context.getAppState() |
| 221 | return { |
| 222 | ...appState, |
| 223 | toolPermissionContext: { |
| 224 | ...appState.toolPermissionContext, |
| 225 | alwaysAllowRules: { |
| 226 | ...appState.toolPermissionContext.alwaysAllowRules, |
| 227 | command: allowedTools, |
| 228 | }, |
| 229 | }, |
| 230 | } |
| 231 | }, |
| 232 | }, |
| 233 | 'security-review', |
| 234 | ) |
| 235 | |
| 236 | return [ |
| 237 | { |
| 238 | type: 'text', |
| 239 | text: processedContent, |
| 240 | }, |
| 241 | ] |
| 242 | }, |
| 243 | }) |
| 244 | |
| 245 |
no test coverage detected