Skip to content

Commit 07349e6

Browse files
committed
chore(moderation): block ClawdAuthenticatorTool listing
1 parent 5ef00e8 commit 07349e6

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

convex/lib/moderation.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
import type { Doc } from '../_generated/dataModel'
22

33
const FLAG_RULES: Array<{ flag: string; pattern: RegExp }> = [
4+
// Known-bad / known-suspicious identifiers.
5+
// NOTE: keep these narrowly scoped; use staff review to confirm removals.
6+
{ flag: 'blocked.malware', pattern: /(keepcold131\/ClawdAuthenticatorTool|ClawdAuthenticatorTool)/i },
7+
48
{ flag: 'suspicious.keyword', pattern: /(malware|stealer|phish|phishing|keylogger)/i },
59
{ flag: 'suspicious.secrets', pattern: /(api[-_ ]?key|token|password|private key|secret)/i },
610
{ flag: 'suspicious.crypto', pattern: /(wallet|seed phrase|mnemonic|crypto)/i },

convex/lib/public.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ export function toPublicUser(user: Doc<'users'> | null | undefined): PublicUser
5353

5454
export function toPublicSkill(skill: Doc<'skills'> | null | undefined): PublicSkill | null {
5555
if (!skill || skill.softDeletedAt) return null
56+
if (skill.moderationStatus && skill.moderationStatus !== 'active') return null
57+
if (skill.moderationFlags?.includes('blocked.malware')) return null
5658
return {
5759
_id: skill._id,
5860
_creationTime: skill._creationTime,
@@ -73,6 +75,8 @@ export function toPublicSkill(skill: Doc<'skills'> | null | undefined): PublicSk
7375

7476
export function toPublicSoul(soul: Doc<'souls'> | null | undefined): PublicSoul | null {
7577
if (!soul || soul.softDeletedAt) return null
78+
if (soul.moderationStatus && soul.moderationStatus !== 'active') return null
79+
if (soul.moderationFlags?.includes('blocked.malware')) return null
7680
return {
7781
_id: soul._id,
7882
_creationTime: soul._creationTime,

0 commit comments

Comments
 (0)