⚡ (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
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
8
packages/radar/tsconfig.json
Normal file
8
packages/radar/tsconfig.json
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"extends": "@typebot.io/tsconfig/base.json",
|
||||
"include": ["**/*.ts"],
|
||||
"exclude": ["node_modules"],
|
||||
"compilerOptions": {
|
||||
"target": "ES2015"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user