-
-
Notifications
You must be signed in to change notification settings - Fork 612
fix: clear stale suspicious flag when VT verdict improves #418
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -787,7 +787,7 @@ export const rescanActiveSkills = internalAction({ | |
| `[vt:rescan] Processing batch of ${batch.skills.length} skills (cursor=${cursor}, accumulated=${accTotal})`, | ||
| ) | ||
|
|
||
| for (const { versionId, sha256hash, slug } of batch.skills) { | ||
| for (const { versionId, sha256hash, slug, wasFlagged } of batch.skills) { | ||
| try { | ||
| const vtResult = await checkExistingFile(apiKey, sha256hash) | ||
|
|
||
|
|
@@ -834,6 +834,15 @@ export const rescanActiveSkills = internalAction({ | |
| status, | ||
| }) | ||
| accUpdated++ | ||
| } else if (wasFlagged && status === 'clean') { | ||
| // Verdict improved from suspicious → clean: clear the stale moderation flag | ||
| console.log(`[vt:rescan] ${slug}: verdict improved to clean, clearing suspicious flag`) | ||
| await ctx.runMutation(internal.skills.approveSkillByHashInternal, { | ||
| sha256hash, | ||
| scanner: 'vt', | ||
| status, | ||
| }) | ||
|
Comment on lines
+840
to
+844
|
||
| accUpdated++ | ||
| } else { | ||
| accUnchanged++ | ||
| } | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.