⚡ (radar) Add radar cumulative keyword alternatives check
This commit is contained in:
@@ -13,8 +13,10 @@ export const computeRiskLevel = (typebot: any) => {
|
||||
if (
|
||||
env.RADAR_CUMULATIVE_KEYWORDS?.some((set) =>
|
||||
set.every((keyword) =>
|
||||
new RegExp(`(?<!https?://[^\\s"]*)\\b${keyword}\\b`, 'gi').test(
|
||||
stringifiedTypebot
|
||||
keyword.some((k) =>
|
||||
new RegExp(`(?<!https?://[^\\s"]*)\\b${k}\\b`, 'gi').test(
|
||||
stringifiedTypebot
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user