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
fix(ai): enforce audit ownership and normalize formatting
Add a ForbiddenException check so users can only chat about their own
audits (fixes an IDOR), apply Prettier formatting, and resolve lint
warnings to satisfy CI (--max-warnings 0).
userContent=`[Context: User is asking about finding "${finding.title}" (${finding.severity}) in ${finding.filePath}:${finding.lineStart}-${finding.lineEnd}]\n\n${dto.message}`;
'AI service is temporarily unavailable. Please try again later.',
130
137
);
@@ -178,9 +185,10 @@ export class AiService {
178
185
{}asRecord<string,number>,
179
186
);
180
187
181
-
constscoreLine=audit.securityScore!==null
182
-
? `Security Score: ${audit.securityScore}/100`
183
-
: 'Security Score: Not yet scored';
188
+
constscoreLine=
189
+
audit.securityScore!==null
190
+
? `Security Score: ${audit.securityScore}/100`
191
+
: 'Security Score: Not yet scored';
184
192
185
193
letprompt=`You are Veridion, an expert smart contract security assistant. You help developers understand and fix vulnerabilities in their smart contracts.
0 commit comments