@theihtisham/agent-shadow-brain 1.1.0 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/brain/framework-presets.d.ts +34 -0
- package/dist/brain/framework-presets.d.ts.map +1 -0
- package/dist/brain/framework-presets.js +556 -0
- package/dist/brain/framework-presets.js.map +1 -0
- package/dist/brain/health-score.d.ts +42 -0
- package/dist/brain/health-score.d.ts.map +1 -0
- package/dist/brain/health-score.js +257 -0
- package/dist/brain/health-score.js.map +1 -0
- package/dist/brain/orchestrator.d.ts +26 -0
- package/dist/brain/orchestrator.d.ts.map +1 -1
- package/dist/brain/orchestrator.js +113 -3
- package/dist/brain/orchestrator.js.map +1 -1
- package/dist/brain/report-generator.d.ts +20 -0
- package/dist/brain/report-generator.d.ts.map +1 -0
- package/dist/brain/report-generator.js +386 -0
- package/dist/brain/report-generator.js.map +1 -0
- package/dist/brain/smart-fix.d.ts +24 -0
- package/dist/brain/smart-fix.d.ts.map +1 -0
- package/dist/brain/smart-fix.js +276 -0
- package/dist/brain/smart-fix.js.map +1 -0
- package/dist/cli.js +340 -57
- package/dist/cli.js.map +1 -1
- package/dist/dashboard/server.d.ts +22 -0
- package/dist/dashboard/server.d.ts.map +1 -0
- package/dist/dashboard/server.js +502 -0
- package/dist/dashboard/server.js.map +1 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +11 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export type Framework = 'nextjs' | 'react' | 'vue' | 'svelte' | 'angular' | 'express' | 'fastify' | 'nestjs' | 'hono' | 'django' | 'flask' | 'fastapi' | 'laravel' | 'spring' | 'go' | 'rust-axum' | 'unknown';
|
|
2
|
+
export interface FrameworkPreset {
|
|
3
|
+
name: string;
|
|
4
|
+
displayName: string;
|
|
5
|
+
language: string[];
|
|
6
|
+
rules: FrameworkRule[];
|
|
7
|
+
securityChecks: string[];
|
|
8
|
+
performanceChecks: string[];
|
|
9
|
+
conventionChecks: string[];
|
|
10
|
+
suggestedModels: string[];
|
|
11
|
+
docsUrl: string;
|
|
12
|
+
}
|
|
13
|
+
export interface FrameworkRule {
|
|
14
|
+
pattern: RegExp | ((files: string[], content: string) => boolean);
|
|
15
|
+
message: string;
|
|
16
|
+
priority: 'critical' | 'high' | 'medium' | 'low';
|
|
17
|
+
type: 'warning' | 'suggestion' | 'review';
|
|
18
|
+
fix?: string;
|
|
19
|
+
}
|
|
20
|
+
export declare const FRAMEWORK_PRESETS: Record<Framework, FrameworkPreset>;
|
|
21
|
+
/**
|
|
22
|
+
* Auto-detect the framework from project context
|
|
23
|
+
*/
|
|
24
|
+
export declare function detectFramework(files: string[], pkgDeps?: Record<string, string>, language?: string[]): Framework;
|
|
25
|
+
/**
|
|
26
|
+
* Apply framework-specific rules to file changes
|
|
27
|
+
*/
|
|
28
|
+
export declare function applyFrameworkRules(framework: Framework, files: string[], content: string): Array<{
|
|
29
|
+
message: string;
|
|
30
|
+
priority: string;
|
|
31
|
+
type: string;
|
|
32
|
+
fix?: string;
|
|
33
|
+
}>;
|
|
34
|
+
//# sourceMappingURL=framework-presets.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"framework-presets.d.ts","sourceRoot":"","sources":["../../src/brain/framework-presets.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,SAAS,GACjB,QAAQ,GAAG,OAAO,GAAG,KAAK,GAAG,QAAQ,GAAG,SAAS,GACjD,SAAS,GAAG,SAAS,GAAG,QAAQ,GAAG,MAAM,GACzC,QAAQ,GAAG,OAAO,GAAG,SAAS,GAAG,SAAS,GAC1C,QAAQ,GAAG,IAAI,GAAG,WAAW,GAC7B,SAAS,CAAC;AAEd,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAA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|
|
4
|
+
name: 'nextjs',
|
|
5
|
+
displayName: 'Next.js',
|
|
6
|
+
language: ['TypeScript', 'JavaScript'],
|
|
7
|
+
rules: [
|
|
8
|
+
{
|
|
9
|
+
pattern: /getServerSideProps.*fetch.*http:\/\//,
|
|
10
|
+
message: 'Using HTTP (not HTTPS) in server-side data fetching — this may expose data in transit.',
|
|
11
|
+
priority: 'high', type: 'warning',
|
|
12
|
+
fix: 'Replace http:// with https:// for all external fetch calls',
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
pattern: /pages\/api\/.*\.ts/,
|
|
16
|
+
message: 'API route changed — verify authentication middleware is applied and rate limiting is configured.',
|
|
17
|
+
priority: 'medium', type: 'review',
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
pattern: /next\.config/,
|
|
21
|
+
message: 'next.config changed — review: headers, rewrites, image domains, experimental flags.',
|
|
22
|
+
priority: 'high', type: 'review',
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
pattern: /useEffect.*fetch/,
|
|
26
|
+
message: 'Data fetching in useEffect — consider React Query, SWR, or Next.js Server Components for better caching.',
|
|
27
|
+
priority: 'low', type: 'suggestion',
|
|
28
|
+
fix: 'Use useSWR() or React Query for automatic caching, deduplication, and error handling.',
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
pattern: (files) => files.some(f => f.startsWith('pages/') && f.endsWith('.tsx')),
|
|
32
|
+
message: 'Pages Router detected — consider migrating to App Router (Next.js 13+) for better performance and layouts.',
|
|
33
|
+
priority: 'low', type: 'suggestion',
|
|
34
|
+
},
|
|
35
|
+
],
|
|
36
|
+
securityChecks: ['CORS headers in API routes', 'next-auth configuration', 'CSP headers', 'env var exposure in client bundles'],
|
|
37
|
+
performanceChecks: ['Image optimization (next/image)', 'Font optimization (next/font)', 'Bundle size with @next/bundle-analyzer', 'ISR/SSG vs SSR choice'],
|
|
38
|
+
conventionChecks: ['app/ vs pages/ consistency', 'layout.tsx hierarchy', 'loading.tsx/error.tsx files', 'API route naming'],
|
|
39
|
+
suggestedModels: ['llama3', 'codellama', 'deepseek-coder'],
|
|
40
|
+
docsUrl: 'https://nextjs.org/docs',
|
|
41
|
+
},
|
|
42
|
+
react: {
|
|
43
|
+
name: 'react',
|
|
44
|
+
displayName: 'React',
|
|
45
|
+
language: ['TypeScript', 'JavaScript'],
|
|
46
|
+
rules: [
|
|
47
|
+
{
|
|
48
|
+
pattern: /useEffect\s*\(\s*async/,
|
|
49
|
+
message: 'async directly in useEffect — this creates an unhandled promise. Use an inner async function.',
|
|
50
|
+
priority: 'high', type: 'warning',
|
|
51
|
+
fix: 'useEffect(() => { const load = async () => { ... }; load(); }, [deps])',
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
pattern: /useState.*\[\s*\]/,
|
|
55
|
+
message: 'Array state initialized as [] — consider using proper TypeScript typing: useState<Item[]>([])',
|
|
56
|
+
priority: 'low', type: 'suggestion',
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
pattern: /key=\{index\}|key=\{i\}/,
|
|
60
|
+
message: 'Using array index as React key — causes issues with reordering. Use stable unique IDs.',
|
|
61
|
+
priority: 'medium', type: 'warning',
|
|
62
|
+
fix: 'Use item.id or a unique property as key, not the array index.',
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
pattern: /dangerouslySetInnerHTML/,
|
|
66
|
+
message: 'dangerouslySetInnerHTML detected — ensure content is sanitized with DOMPurify to prevent XSS.',
|
|
67
|
+
priority: 'critical', type: 'warning',
|
|
68
|
+
fix: 'import DOMPurify from "dompurify"; ... __html: DOMPurify.sanitize(content)',
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
pattern: /import React from/,
|
|
72
|
+
message: 'Old React import style — React 17+ with JSX transform doesn\'t require importing React.',
|
|
73
|
+
priority: 'low', type: 'suggestion',
|
|
74
|
+
fix: 'Remove "import React from \'react\'" — not needed with modern JSX transform.',
|
|
75
|
+
},
|
|
76
|
+
],
|
|
77
|
+
securityChecks: ['XSS via dangerouslySetInnerHTML', 'eval in components', 'exposed sensitive data in Redux state'],
|
|
78
|
+
performanceChecks: ['React.memo usage', 'useMemo/useCallback', 'lazy loading (React.lazy)', 'avoiding inline function props'],
|
|
79
|
+
conventionChecks: ['Component naming (PascalCase)', 'Hook naming (useXxx)', 'prop-types or TypeScript types'],
|
|
80
|
+
suggestedModels: ['llama3', 'mistral'],
|
|
81
|
+
docsUrl: 'https://react.dev',
|
|
82
|
+
},
|
|
83
|
+
express: {
|
|
84
|
+
name: 'express',
|
|
85
|
+
displayName: 'Express.js',
|
|
86
|
+
language: ['TypeScript', 'JavaScript'],
|
|
87
|
+
rules: [
|
|
88
|
+
{
|
|
89
|
+
pattern: /app\.use\s*\(\s*express\.json\s*\(\s*\)\s*\)/,
|
|
90
|
+
message: 'express.json() without size limit — add a limit to prevent DoS: express.json({ limit: "10mb" })',
|
|
91
|
+
priority: 'medium', type: 'suggestion',
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
pattern: /res\.json\s*\(err\)|res\.send\s*\(err\)/,
|
|
95
|
+
message: 'Sending raw error object to client — may expose stack traces. Send sanitized error responses.',
|
|
96
|
+
priority: 'high', type: 'warning',
|
|
97
|
+
fix: 'res.status(500).json({ error: "Internal server error" }) // never expose err.stack in production',
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
pattern: /app\.use\s*\([^)]*cors/,
|
|
101
|
+
message: 'CORS middleware detected — verify allowed origins are restricted in production.',
|
|
102
|
+
priority: 'medium', type: 'review',
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
pattern: (files) => !files.some(f => /helmet/.test(f)) && files.some(f => /app\.ts|server\.ts|index\.ts/.test(f)),
|
|
106
|
+
message: 'No helmet.js detected — add it for essential security headers (CSP, HSTS, etc.)',
|
|
107
|
+
priority: 'high', type: 'suggestion',
|
|
108
|
+
fix: 'npm i helmet && app.use(helmet())',
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
pattern: /router\.get|router\.post|router\.put|router\.delete/,
|
|
112
|
+
message: 'Route handler changed — verify: input validation (zod/joi), authentication middleware, rate limiting.',
|
|
113
|
+
priority: 'medium', type: 'review',
|
|
114
|
+
},
|
|
115
|
+
],
|
|
116
|
+
securityChecks: ['helmet.js', 'rate-limiting (express-rate-limit)', 'input validation', 'SQL injection in queries', 'JWT verification'],
|
|
117
|
+
performanceChecks: ['compression middleware', 'caching headers', 'async/await vs callbacks', 'connection pooling'],
|
|
118
|
+
conventionChecks: ['router separation', 'middleware order', 'error handler placement (last)', 'async error catching'],
|
|
119
|
+
suggestedModels: ['llama3', 'deepseek-coder'],
|
|
120
|
+
docsUrl: 'https://expressjs.com',
|
|
121
|
+
},
|
|
122
|
+
fastapi: {
|
|
123
|
+
name: 'fastapi',
|
|
124
|
+
displayName: 'FastAPI',
|
|
125
|
+
language: ['Python'],
|
|
126
|
+
rules: [
|
|
127
|
+
{
|
|
128
|
+
pattern: /def\s+\w+\s*\(.*\)\s*:/,
|
|
129
|
+
message: 'Sync endpoint detected in FastAPI — use async def for I/O-bound operations for better concurrency.',
|
|
130
|
+
priority: 'medium', type: 'suggestion',
|
|
131
|
+
fix: 'Change "def endpoint()" to "async def endpoint()" for I/O operations.',
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
pattern: /print\s*\(/,
|
|
135
|
+
message: 'print() in FastAPI handler — use Python logging module instead.',
|
|
136
|
+
priority: 'low', type: 'suggestion',
|
|
137
|
+
fix: 'import logging; logger = logging.getLogger(__name__); logger.info("...")',
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
pattern: /Depends\s*\(\s*\)/,
|
|
141
|
+
message: 'FastAPI dependency with no function — verify dependency injection is set up correctly.',
|
|
142
|
+
priority: 'medium', type: 'review',
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
pattern: /\.env/,
|
|
146
|
+
message: 'Env file reference — use pydantic-settings (BaseSettings) for typed env var management.',
|
|
147
|
+
priority: 'low', type: 'suggestion',
|
|
148
|
+
fix: 'from pydantic_settings import BaseSettings; class Settings(BaseSettings): API_KEY: str',
|
|
149
|
+
},
|
|
150
|
+
],
|
|
151
|
+
securityChecks: ['OAuth2 / JWT with python-jose', 'CORS origins restriction', 'input validation via Pydantic', 'SQL injection in raw queries'],
|
|
152
|
+
performanceChecks: ['async def vs def', 'background tasks', 'response caching', 'database connection pooling (SQLAlchemy async)'],
|
|
153
|
+
conventionChecks: ['Pydantic models for request/response', 'APIRouter for route grouping', 'dependency injection patterns'],
|
|
154
|
+
suggestedModels: ['llama3', 'codellama'],
|
|
155
|
+
docsUrl: 'https://fastapi.tiangolo.com',
|
|
156
|
+
},
|
|
157
|
+
django: {
|
|
158
|
+
name: 'django',
|
|
159
|
+
displayName: 'Django',
|
|
160
|
+
language: ['Python'],
|
|
161
|
+
rules: [
|
|
162
|
+
{
|
|
163
|
+
pattern: /DEBUG\s*=\s*True/,
|
|
164
|
+
message: 'DEBUG=True detected — never run with DEBUG=True in production. Exposes stack traces and disables security.',
|
|
165
|
+
priority: 'critical', type: 'warning',
|
|
166
|
+
fix: 'Set DEBUG = config("DEBUG", default=False, cast=bool) using python-decouple',
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
pattern: /ALLOWED_HOSTS\s*=\s*\[['"]?\*['"]?\]/,
|
|
170
|
+
message: 'ALLOWED_HOSTS = ["*"] — too permissive. Specify exact hostnames for production.',
|
|
171
|
+
priority: 'critical', type: 'warning',
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
pattern: /SECRET_KEY\s*=\s*['"][^'"]{5,}/,
|
|
175
|
+
message: 'Hardcoded Django SECRET_KEY — move to environment variable immediately.',
|
|
176
|
+
priority: 'critical', type: 'warning',
|
|
177
|
+
fix: 'SECRET_KEY = os.environ["DJANGO_SECRET_KEY"]',
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
pattern: /objects\.filter.*format\(|objects\.filter.*%s/,
|
|
181
|
+
message: 'Possible raw SQL string formatting in Django ORM — use F() expressions or parameterized queries.',
|
|
182
|
+
priority: 'high', type: 'warning',
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
pattern: /migrations\//,
|
|
186
|
+
message: 'Django migration changed — review for: data migrations, irreversible operations, index creation on large tables.',
|
|
187
|
+
priority: 'high', type: 'review',
|
|
188
|
+
},
|
|
189
|
+
],
|
|
190
|
+
securityChecks: ['CSRF protection', 'SECRET_KEY in env', 'DEBUG=False in production', 'ALLOWED_HOSTS', 'XSS via mark_safe'],
|
|
191
|
+
performanceChecks: ['select_related/prefetch_related for N+1', 'database indexes', 'caching with django-cache', 'celery for async tasks'],
|
|
192
|
+
conventionChecks: ['model __str__ methods', 'view function vs class-based', 'serializer validation', 'URL naming'],
|
|
193
|
+
suggestedModels: ['llama3', 'codellama'],
|
|
194
|
+
docsUrl: 'https://docs.djangoproject.com',
|
|
195
|
+
},
|
|
196
|
+
nestjs: {
|
|
197
|
+
name: 'nestjs',
|
|
198
|
+
displayName: 'NestJS',
|
|
199
|
+
language: ['TypeScript'],
|
|
200
|
+
rules: [
|
|
201
|
+
{
|
|
202
|
+
pattern: /@Get|@Post|@Put|@Delete/,
|
|
203
|
+
message: 'Controller endpoint changed — verify: Guards (@UseGuards), pipes (@UsePipes), interceptors, and Swagger decorators.',
|
|
204
|
+
priority: 'medium', type: 'review',
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
pattern: /ConfigService.*process\.env/,
|
|
208
|
+
message: 'Direct process.env access instead of ConfigService — use @nestjs/config for typed env management.',
|
|
209
|
+
priority: 'low', type: 'suggestion',
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
pattern: /@Injectable\(\)/,
|
|
213
|
+
message: 'Injectable service changed — check for circular dependencies and proper module imports.',
|
|
214
|
+
priority: 'low', type: 'review',
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
pattern: /prisma\.|TypeORM|mongoose/i,
|
|
218
|
+
message: 'ORM usage detected — ensure transactions are used for multi-step operations and N+1 is avoided.',
|
|
219
|
+
priority: 'medium', type: 'suggestion',
|
|
220
|
+
},
|
|
221
|
+
],
|
|
222
|
+
securityChecks: ['AuthGuard usage', 'CORS configuration', 'helmet integration', 'rate limiting (ThrottlerModule)', 'class-validator pipes'],
|
|
223
|
+
performanceChecks: ['caching with CacheModule', 'async providers', 'lazy modules', 'database N+1 prevention'],
|
|
224
|
+
conventionChecks: ['module organization', 'DTO classes with validation', 'exception filters', 'interceptors for logging'],
|
|
225
|
+
suggestedModels: ['llama3', 'deepseek-coder'],
|
|
226
|
+
docsUrl: 'https://docs.nestjs.com',
|
|
227
|
+
},
|
|
228
|
+
vue: {
|
|
229
|
+
name: 'vue',
|
|
230
|
+
displayName: 'Vue.js',
|
|
231
|
+
language: ['TypeScript', 'JavaScript'],
|
|
232
|
+
rules: [
|
|
233
|
+
{
|
|
234
|
+
pattern: /v-html/,
|
|
235
|
+
message: 'v-html directive used — renders raw HTML, which is vulnerable to XSS. Sanitize with DOMPurify.',
|
|
236
|
+
priority: 'critical', type: 'warning',
|
|
237
|
+
fix: 'Use v-text for plain text or sanitize: v-html="DOMPurify.sanitize(content)"',
|
|
238
|
+
},
|
|
239
|
+
{
|
|
240
|
+
pattern: /v-for.*:key="index"/,
|
|
241
|
+
message: 'Using array index as v-for key — causes rendering issues with reordering. Use unique IDs.',
|
|
242
|
+
priority: 'medium', type: 'warning',
|
|
243
|
+
},
|
|
244
|
+
],
|
|
245
|
+
securityChecks: ['v-html XSS', 'CSP configuration', 'Pinia store exposure'],
|
|
246
|
+
performanceChecks: ['v-once for static content', 'v-memo', 'async components (defineAsyncComponent)', 'Pinia vs Vuex'],
|
|
247
|
+
conventionChecks: ['Composition API vs Options API consistency', 'script setup syntax', 'component naming'],
|
|
248
|
+
suggestedModels: ['llama3', 'mistral'],
|
|
249
|
+
docsUrl: 'https://vuejs.org',
|
|
250
|
+
},
|
|
251
|
+
svelte: {
|
|
252
|
+
name: 'svelte',
|
|
253
|
+
displayName: 'Svelte / SvelteKit',
|
|
254
|
+
language: ['TypeScript', 'JavaScript'],
|
|
255
|
+
rules: [
|
|
256
|
+
{
|
|
257
|
+
pattern: /@html/,
|
|
258
|
+
message: '{@html ...} directive — renders raw HTML. Sanitize with DOMPurify to prevent XSS.',
|
|
259
|
+
priority: 'critical', type: 'warning',
|
|
260
|
+
},
|
|
261
|
+
{
|
|
262
|
+
pattern: /\+server\.ts|\+page\.server\.ts/,
|
|
263
|
+
message: 'SvelteKit server endpoint changed — verify: authentication, input validation, rate limiting.',
|
|
264
|
+
priority: 'medium', type: 'review',
|
|
265
|
+
},
|
|
266
|
+
],
|
|
267
|
+
securityChecks: ['@html XSS', 'server load function auth', 'form action validation'],
|
|
268
|
+
performanceChecks: ['reactive statement efficiency', 'lazy loading with import()', 'SSR vs CSR choice'],
|
|
269
|
+
conventionChecks: ['file-based routing conventions', 'load function patterns', 'stores usage'],
|
|
270
|
+
suggestedModels: ['llama3'],
|
|
271
|
+
docsUrl: 'https://svelte.dev',
|
|
272
|
+
},
|
|
273
|
+
angular: {
|
|
274
|
+
name: 'angular',
|
|
275
|
+
displayName: 'Angular',
|
|
276
|
+
language: ['TypeScript'],
|
|
277
|
+
rules: [
|
|
278
|
+
{
|
|
279
|
+
pattern: /bypassSecurityTrust/,
|
|
280
|
+
message: 'bypassSecurityTrust* used — this bypasses Angular\'s built-in XSS protection. Sanitize content first.',
|
|
281
|
+
priority: 'critical', type: 'warning',
|
|
282
|
+
},
|
|
283
|
+
{
|
|
284
|
+
pattern: /ChangeDetectionStrategy\.Default/,
|
|
285
|
+
message: 'Default change detection — consider OnPush strategy for better performance.',
|
|
286
|
+
priority: 'low', type: 'suggestion',
|
|
287
|
+
fix: 'changeDetection: ChangeDetectionStrategy.OnPush',
|
|
288
|
+
},
|
|
289
|
+
],
|
|
290
|
+
securityChecks: ['bypassSecurityTrust', 'CSRF tokens', 'HttpClient interceptors'],
|
|
291
|
+
performanceChecks: ['OnPush change detection', 'trackBy in ngFor', 'lazy loading modules'],
|
|
292
|
+
conventionChecks: ['component structure', 'service injection', 'module imports'],
|
|
293
|
+
suggestedModels: ['llama3', 'deepseek-coder'],
|
|
294
|
+
docsUrl: 'https://angular.dev',
|
|
295
|
+
},
|
|
296
|
+
flask: {
|
|
297
|
+
name: 'flask',
|
|
298
|
+
displayName: 'Flask',
|
|
299
|
+
language: ['Python'],
|
|
300
|
+
rules: [
|
|
301
|
+
{
|
|
302
|
+
pattern: /app\.run\s*\(.*debug\s*=\s*True/,
|
|
303
|
+
message: 'Flask running with debug=True — this enables the Werkzeug debugger which is a major security risk in production.',
|
|
304
|
+
priority: 'critical', type: 'warning',
|
|
305
|
+
fix: 'Set debug=False in production. Use FLASK_ENV=production env var.',
|
|
306
|
+
},
|
|
307
|
+
{
|
|
308
|
+
pattern: /SECRET_KEY\s*=\s*['"][^'"]+['"]/,
|
|
309
|
+
message: 'Hardcoded Flask SECRET_KEY — move to environment variable.',
|
|
310
|
+
priority: 'critical', type: 'warning',
|
|
311
|
+
},
|
|
312
|
+
],
|
|
313
|
+
securityChecks: ['debug mode', 'SECRET_KEY in env', 'CORS with flask-cors', 'SQL injection in raw queries'],
|
|
314
|
+
performanceChecks: ['async routes (Flask 2.0+)', 'caching with flask-caching', 'gunicorn workers'],
|
|
315
|
+
conventionChecks: ['blueprints for route grouping', 'application factory pattern', 'config objects'],
|
|
316
|
+
suggestedModels: ['llama3', 'codellama'],
|
|
317
|
+
docsUrl: 'https://flask.palletsprojects.com',
|
|
318
|
+
},
|
|
319
|
+
laravel: {
|
|
320
|
+
name: 'laravel',
|
|
321
|
+
displayName: 'Laravel',
|
|
322
|
+
language: ['PHP'],
|
|
323
|
+
rules: [
|
|
324
|
+
{
|
|
325
|
+
pattern: /DB::statement.*\$/,
|
|
326
|
+
message: 'Raw DB statement with variable — use query builder bindings to prevent SQL injection.',
|
|
327
|
+
priority: 'critical', type: 'warning',
|
|
328
|
+
fix: 'DB::statement("... WHERE id = ?", [$id])',
|
|
329
|
+
},
|
|
330
|
+
{
|
|
331
|
+
pattern: /APP_DEBUG=true/i,
|
|
332
|
+
message: 'APP_DEBUG=true in .env — must be false in production.',
|
|
333
|
+
priority: 'critical', type: 'warning',
|
|
334
|
+
},
|
|
335
|
+
],
|
|
336
|
+
securityChecks: ['CSRF tokens', 'SQL injection', 'mass assignment ($fillable)', 'APP_DEBUG=false', 'validation rules'],
|
|
337
|
+
performanceChecks: ['eager loading (with())', 'query caching', 'queue jobs for heavy operations', 'N+1 detection'],
|
|
338
|
+
conventionChecks: ['resource controllers', 'form requests', 'policies', 'repository pattern'],
|
|
339
|
+
suggestedModels: ['llama3', 'codellama'],
|
|
340
|
+
docsUrl: 'https://laravel.com/docs',
|
|
341
|
+
},
|
|
342
|
+
spring: {
|
|
343
|
+
name: 'spring',
|
|
344
|
+
displayName: 'Spring Boot',
|
|
345
|
+
language: ['Java'],
|
|
346
|
+
rules: [
|
|
347
|
+
{
|
|
348
|
+
pattern: /@RequestMapping|@GetMapping|@PostMapping/,
|
|
349
|
+
message: 'REST endpoint changed — verify: @Valid annotation, security config, OpenAPI documentation.',
|
|
350
|
+
priority: 'medium', type: 'review',
|
|
351
|
+
},
|
|
352
|
+
{
|
|
353
|
+
pattern: /createQuery.*\+|nativeQuery.*true/,
|
|
354
|
+
message: 'Raw or concatenated query in Spring — use JPQL named parameters or Spring Data to prevent injection.',
|
|
355
|
+
priority: 'high', type: 'warning',
|
|
356
|
+
},
|
|
357
|
+
],
|
|
358
|
+
securityChecks: ['Spring Security config', 'CORS configuration', 'JWT filter', '@Valid on inputs', 'actuator endpoints'],
|
|
359
|
+
performanceChecks: ['lazy loading (@Fetch)', 'N+1 with EntityGraph', '@Cacheable', 'connection pool (HikariCP)'],
|
|
360
|
+
conventionChecks: ['layered architecture (Controller/Service/Repository)', '@Transactional usage', 'DTOs vs entities in controllers'],
|
|
361
|
+
suggestedModels: ['llama3', 'codellama'],
|
|
362
|
+
docsUrl: 'https://docs.spring.io/spring-boot',
|
|
363
|
+
},
|
|
364
|
+
go: {
|
|
365
|
+
name: 'go',
|
|
366
|
+
displayName: 'Go',
|
|
367
|
+
language: ['Go'],
|
|
368
|
+
rules: [
|
|
369
|
+
{
|
|
370
|
+
pattern: /fmt\.Sprintf.*sql|db\.Query.*fmt\./,
|
|
371
|
+
message: 'String formatting in SQL query — use parameterized queries with db.Query("... $1", val).',
|
|
372
|
+
priority: 'critical', type: 'warning',
|
|
373
|
+
},
|
|
374
|
+
{
|
|
375
|
+
pattern: /err\s*!=\s*nil\s*\{[\s\n]*\}/,
|
|
376
|
+
message: 'Empty error handler — never silently ignore errors in Go. At minimum log them.',
|
|
377
|
+
priority: 'high', type: 'warning',
|
|
378
|
+
fix: 'if err != nil { log.Printf("operation failed: %v", err); return err }',
|
|
379
|
+
},
|
|
380
|
+
{
|
|
381
|
+
pattern: /go\s+func\s*\(/,
|
|
382
|
+
message: 'Goroutine spawned — ensure proper synchronization (WaitGroup/channel) and handle panics.',
|
|
383
|
+
priority: 'medium', type: 'review',
|
|
384
|
+
},
|
|
385
|
+
],
|
|
386
|
+
securityChecks: ['SQL injection', 'context timeout/deadline', 'TLS certificate verification', 'input validation'],
|
|
387
|
+
performanceChecks: ['goroutine pool vs unbounded spawning', 'sync.Pool for allocations', 'pprof profiling', 'defer in loops'],
|
|
388
|
+
conventionChecks: ['error wrapping (fmt.Errorf("%w", err))', 'interface naming', 'package structure', 'context propagation'],
|
|
389
|
+
suggestedModels: ['llama3', 'deepseek-coder'],
|
|
390
|
+
docsUrl: 'https://go.dev/doc',
|
|
391
|
+
},
|
|
392
|
+
'rust-axum': {
|
|
393
|
+
name: 'rust-axum',
|
|
394
|
+
displayName: 'Rust (Axum)',
|
|
395
|
+
language: ['Rust'],
|
|
396
|
+
rules: [
|
|
397
|
+
{
|
|
398
|
+
pattern: /unwrap\(\)|expect\("/,
|
|
399
|
+
message: 'unwrap()/expect() in production code — panics the thread on None/Err. Use ? operator or handle errors.',
|
|
400
|
+
priority: 'high', type: 'warning',
|
|
401
|
+
fix: 'Use the ? operator or match/if let for proper error handling.',
|
|
402
|
+
},
|
|
403
|
+
{
|
|
404
|
+
pattern: /unsafe\s*\{/,
|
|
405
|
+
message: 'unsafe block detected — document WHY it\'s safe, minimize scope, and add tests.',
|
|
406
|
+
priority: 'high', type: 'review',
|
|
407
|
+
},
|
|
408
|
+
],
|
|
409
|
+
securityChecks: ['unsafe blocks', 'integer overflow in release mode', 'deserialization of untrusted input'],
|
|
410
|
+
performanceChecks: ['clone() frequency', 'Arc vs Rc', 'async trait overhead', 'tokio task spawning'],
|
|
411
|
+
conventionChecks: ['Result/Option propagation', 'error types (thiserror)', 'module visibility', 'clippy lints'],
|
|
412
|
+
suggestedModels: ['llama3', 'deepseek-coder'],
|
|
413
|
+
docsUrl: 'https://docs.rs/axum',
|
|
414
|
+
},
|
|
415
|
+
fastify: {
|
|
416
|
+
name: 'fastify',
|
|
417
|
+
displayName: 'Fastify',
|
|
418
|
+
language: ['TypeScript', 'JavaScript'],
|
|
419
|
+
rules: [
|
|
420
|
+
{
|
|
421
|
+
pattern: /reply\.send\(err\)|reply\.send\(error\)/,
|
|
422
|
+
message: 'Sending raw error to client — may expose stack traces. Use a sanitized error response.',
|
|
423
|
+
priority: 'high', type: 'warning',
|
|
424
|
+
fix: 'reply.status(500).send({ error: "Internal server error" })',
|
|
425
|
+
},
|
|
426
|
+
{
|
|
427
|
+
pattern: /fastify\.register/,
|
|
428
|
+
message: 'Plugin registered — verify encapsulation scope and that hooks/decorators are correctly scoped.',
|
|
429
|
+
priority: 'low', type: 'review',
|
|
430
|
+
},
|
|
431
|
+
{
|
|
432
|
+
pattern: /schema:\s*\{/,
|
|
433
|
+
message: 'Route schema detected — ensure JSON Schema validation covers all input fields (body, params, querystring).',
|
|
434
|
+
priority: 'medium', type: 'suggestion',
|
|
435
|
+
},
|
|
436
|
+
],
|
|
437
|
+
securityChecks: ['@fastify/helmet', '@fastify/cors origins', '@fastify/rate-limit', 'schema validation on all routes', 'JWT verification'],
|
|
438
|
+
performanceChecks: ['serialization schemas (faster-json-stringify)', 'async route handlers', 'connection pooling', 'caching with @fastify/caching'],
|
|
439
|
+
conventionChecks: ['plugin encapsulation', 'decorators usage', 'lifecycle hooks order', 'schema-first development'],
|
|
440
|
+
suggestedModels: ['llama3', 'deepseek-coder'],
|
|
441
|
+
docsUrl: 'https://fastify.dev',
|
|
442
|
+
},
|
|
443
|
+
hono: {
|
|
444
|
+
name: 'hono',
|
|
445
|
+
displayName: 'Hono',
|
|
446
|
+
language: ['TypeScript'],
|
|
447
|
+
rules: [
|
|
448
|
+
{
|
|
449
|
+
pattern: /c\.req\.raw/,
|
|
450
|
+
message: 'Accessing raw request — validate and sanitize all input before use.',
|
|
451
|
+
priority: 'medium', type: 'review',
|
|
452
|
+
},
|
|
453
|
+
],
|
|
454
|
+
securityChecks: ['CORS middleware', 'bearer auth', 'csrf middleware', 'rate limiting'],
|
|
455
|
+
performanceChecks: ['edge runtime compatibility', 'streaming responses', 'caching headers'],
|
|
456
|
+
conventionChecks: ['middleware ordering', 'type-safe RPC (hc)', 'zod-openapi'],
|
|
457
|
+
suggestedModels: ['llama3'],
|
|
458
|
+
docsUrl: 'https://hono.dev',
|
|
459
|
+
},
|
|
460
|
+
unknown: {
|
|
461
|
+
name: 'unknown',
|
|
462
|
+
displayName: 'Generic Project',
|
|
463
|
+
language: [],
|
|
464
|
+
rules: [],
|
|
465
|
+
securityChecks: ['hardcoded secrets', 'SQL injection', 'XSS', 'eval usage'],
|
|
466
|
+
performanceChecks: ['async vs sync I/O', 'N+1 patterns', 'memory leaks'],
|
|
467
|
+
conventionChecks: ['naming consistency', 'error handling', 'logging'],
|
|
468
|
+
suggestedModels: ['llama3', 'mistral'],
|
|
469
|
+
docsUrl: '',
|
|
470
|
+
},
|
|
471
|
+
};
|
|
472
|
+
/**
|
|
473
|
+
* Auto-detect the framework from project context
|
|
474
|
+
*/
|
|
475
|
+
export function detectFramework(files, pkgDeps, language) {
|
|
476
|
+
const fileStr = files.join('\n').toLowerCase();
|
|
477
|
+
const deps = Object.keys(pkgDeps || {}).join(' ').toLowerCase();
|
|
478
|
+
const allDeps = deps;
|
|
479
|
+
// Next.js
|
|
480
|
+
if (allDeps.includes('next') && (allDeps.includes('react') || fileStr.includes('next.config')))
|
|
481
|
+
return 'nextjs';
|
|
482
|
+
// React (standalone)
|
|
483
|
+
if (allDeps.includes('react') && !allDeps.includes('next') && !allDeps.includes('@angular'))
|
|
484
|
+
return 'react';
|
|
485
|
+
// Vue
|
|
486
|
+
if (allDeps.includes('vue') || fileStr.includes('.vue'))
|
|
487
|
+
return 'vue';
|
|
488
|
+
// Svelte
|
|
489
|
+
if (allDeps.includes('svelte') || fileStr.includes('.svelte'))
|
|
490
|
+
return 'svelte';
|
|
491
|
+
// Angular
|
|
492
|
+
if (allDeps.includes('@angular/core'))
|
|
493
|
+
return 'angular';
|
|
494
|
+
// NestJS
|
|
495
|
+
if (allDeps.includes('@nestjs/core'))
|
|
496
|
+
return 'nestjs';
|
|
497
|
+
// Express
|
|
498
|
+
if (allDeps.includes('express') && !allDeps.includes('@nestjs'))
|
|
499
|
+
return 'express';
|
|
500
|
+
// Hono
|
|
501
|
+
if (allDeps.includes('hono'))
|
|
502
|
+
return 'hono';
|
|
503
|
+
// Fastify
|
|
504
|
+
if (allDeps.includes('fastify'))
|
|
505
|
+
return 'fastify';
|
|
506
|
+
// Django (Python)
|
|
507
|
+
if (fileStr.includes('manage.py') || fileStr.includes('django'))
|
|
508
|
+
return 'django';
|
|
509
|
+
// FastAPI
|
|
510
|
+
if (fileStr.includes('fastapi') || deps.includes('fastapi'))
|
|
511
|
+
return 'fastapi';
|
|
512
|
+
// Flask
|
|
513
|
+
if (deps.includes('flask') || fileStr.includes('flask'))
|
|
514
|
+
return 'flask';
|
|
515
|
+
// Laravel (PHP)
|
|
516
|
+
if (fileStr.includes('artisan') || fileStr.includes('laravel'))
|
|
517
|
+
return 'laravel';
|
|
518
|
+
// Spring Boot
|
|
519
|
+
if (fileStr.includes('pom.xml') || fileStr.includes('build.gradle') || deps.includes('spring'))
|
|
520
|
+
return 'spring';
|
|
521
|
+
// Go
|
|
522
|
+
if (fileStr.includes('go.mod') || (language || []).includes('Go'))
|
|
523
|
+
return 'go';
|
|
524
|
+
// Rust
|
|
525
|
+
if (fileStr.includes('cargo.toml') || (language || []).includes('Rust'))
|
|
526
|
+
return 'rust-axum';
|
|
527
|
+
return 'unknown';
|
|
528
|
+
}
|
|
529
|
+
/**
|
|
530
|
+
* Apply framework-specific rules to file changes
|
|
531
|
+
*/
|
|
532
|
+
export function applyFrameworkRules(framework, files, content) {
|
|
533
|
+
const preset = FRAMEWORK_PRESETS[framework];
|
|
534
|
+
if (!preset)
|
|
535
|
+
return [];
|
|
536
|
+
const results = [];
|
|
537
|
+
for (const rule of preset.rules) {
|
|
538
|
+
let matched = false;
|
|
539
|
+
if (rule.pattern instanceof RegExp) {
|
|
540
|
+
matched = rule.pattern.test(content);
|
|
541
|
+
}
|
|
542
|
+
else if (typeof rule.pattern === 'function') {
|
|
543
|
+
matched = rule.pattern(files, content);
|
|
544
|
+
}
|
|
545
|
+
if (matched) {
|
|
546
|
+
results.push({
|
|
547
|
+
message: rule.message,
|
|
548
|
+
priority: rule.priority,
|
|
549
|
+
type: rule.type,
|
|
550
|
+
fix: rule.fix,
|
|
551
|
+
});
|
|
552
|
+
}
|
|
553
|
+
}
|
|
554
|
+
return results;
|
|
555
|
+
}
|
|
556
|
+
//# sourceMappingURL=framework-presets.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"framework-presets.js","sourceRoot":"","sources":["../../src/brain/framework-presets.ts"],"names":[],"mappings":"AAAA,oEAAoE;AA6BpE,MAAM,CAAC,MAAM,iBAAiB,GAAuC;IACnE,MAAM,EAAE;QACN,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,SAAS;QACtB,QAAQ,EAAE,CAAC,YAAY,EAAE,YAAY,CAAC;QACtC,KAAK,EAAE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