@runhalo/engine 0.5.0 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/context-analyzer.js +38 -31
- package/dist/context-analyzer.js.map +1 -1
- package/dist/fp-patterns.d.ts +36 -0
- package/dist/fp-patterns.js +426 -0
- package/dist/fp-patterns.js.map +1 -0
- package/dist/frameworks/angular.d.ts +11 -0
- package/dist/frameworks/angular.js +41 -0
- package/dist/frameworks/angular.js.map +1 -0
- package/dist/frameworks/index.js +6 -0
- package/dist/frameworks/index.js.map +1 -1
- package/dist/frameworks/react.d.ts +13 -0
- package/dist/frameworks/react.js +36 -0
- package/dist/frameworks/react.js.map +1 -0
- package/dist/frameworks/vue.d.ts +9 -0
- package/dist/frameworks/vue.js +39 -0
- package/dist/frameworks/vue.js.map +1 -0
- package/dist/graduation/fp-verdict-logger.d.ts +81 -0
- package/dist/graduation/fp-verdict-logger.js +130 -0
- package/dist/graduation/fp-verdict-logger.js.map +1 -0
- package/dist/graduation/graduation-codifier.d.ts +37 -0
- package/dist/graduation/graduation-codifier.js +205 -0
- package/dist/graduation/graduation-codifier.js.map +1 -0
- package/dist/graduation/graduation-validator.d.ts +73 -0
- package/dist/graduation/graduation-validator.js +204 -0
- package/dist/graduation/graduation-validator.js.map +1 -0
- package/dist/graduation/index.d.ts +71 -0
- package/dist/graduation/index.js +105 -0
- package/dist/graduation/index.js.map +1 -0
- package/dist/graduation/pattern-aggregator.d.ts +77 -0
- package/dist/graduation/pattern-aggregator.js +154 -0
- package/dist/graduation/pattern-aggregator.js.map +1 -0
- package/dist/index.d.ts +75 -0
- package/dist/index.js +632 -73
- package/dist/index.js.map +1 -1
- package/dist/review-board/two-agent-review.d.ts +152 -0
- package/dist/review-board/two-agent-review.js +463 -0
- package/dist/review-board/two-agent-review.js.map +1 -0
- package/package.json +5 -2
- package/rules/coppa-tier-1.yaml +17 -10
- package/rules/rules.json +408 -40
package/rules/rules.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"coppa": {
|
|
6
6
|
"id": "coppa",
|
|
7
7
|
"name": "COPPA 2.0 Core",
|
|
8
|
-
"description": "
|
|
8
|
+
"description": "26 rules for COPPA & COPPA 2.0 compliance. Effective April 22, 2026. Updated March 12, 2026 for 2025 final rule amendments.",
|
|
9
9
|
"jurisdiction": "US-Federal",
|
|
10
10
|
"jurisdiction_level": "federal",
|
|
11
11
|
"is_free": true,
|
|
@@ -95,7 +95,7 @@
|
|
|
95
95
|
"eu-ai-act": {
|
|
96
96
|
"id": "eu-ai-act",
|
|
97
97
|
"name": "EU AI Act (Children)",
|
|
98
|
-
"description": "
|
|
98
|
+
"description": "30 rules for EU AI Act compliance in children's AI systems — risk management (Art. 9), data governance (Art. 10), transparency (Art. 13), human oversight (Art. 14), accuracy & robustness (Art. 15), and constitutional AI principles.",
|
|
99
99
|
"jurisdiction": "EU",
|
|
100
100
|
"jurisdiction_level": "supranational",
|
|
101
101
|
"is_free": false,
|
|
@@ -129,7 +129,7 @@
|
|
|
129
129
|
{ "pattern": "LoginManager\\.getInstance\\s*\\(\\s*\\)\\s*\\.logIn", "flags": "gi" }
|
|
130
130
|
],
|
|
131
131
|
"fix_suggestion": "Wrap the auth call in a conditional check for user.age >= 13 or use signInWithParentEmail() for children",
|
|
132
|
-
"penalty": "$
|
|
132
|
+
"penalty": "$53,088 per violation",
|
|
133
133
|
"languages": ["typescript", "javascript", "python", "go", "java", "kotlin", "swift"],
|
|
134
134
|
"packs": ["coppa"],
|
|
135
135
|
"fixability": "guided",
|
|
@@ -151,7 +151,7 @@
|
|
|
151
151
|
{ "pattern": "\\?[^'\"`\\s]*\\$\\{[^}]*(?:\\.email|\\.firstName|\\.lastName|\\.dob|\\.phone|\\.birthdate|\\.ssn)[^}]*\\}", "flags": "gi" }
|
|
152
152
|
],
|
|
153
153
|
"fix_suggestion": "Switch to POST method and move PII to request body",
|
|
154
|
-
"penalty": "$
|
|
154
|
+
"penalty": "$53,088 per violation",
|
|
155
155
|
"languages": ["typescript", "javascript", "python", "java", "swift"],
|
|
156
156
|
"packs": ["coppa"],
|
|
157
157
|
"fixability": "guided",
|
|
@@ -174,7 +174,7 @@
|
|
|
174
174
|
{ "pattern": "google-analytics\\.com/analytics\\.js", "flags": "gi" }
|
|
175
175
|
],
|
|
176
176
|
"fix_suggestion": "Add \"child_directed_treatment\": true or \"restrictDataProcessing\": true to SDK initialization",
|
|
177
|
-
"penalty": "$
|
|
177
|
+
"penalty": "$53,088 per violation",
|
|
178
178
|
"languages": ["typescript", "javascript", "html"],
|
|
179
179
|
"packs": ["coppa"],
|
|
180
180
|
"fixability": "guided",
|
|
@@ -203,7 +203,7 @@
|
|
|
203
203
|
{ "pattern": "android\\.permission\\.ACCESS_FINE_LOCATION", "flags": "gi" }
|
|
204
204
|
],
|
|
205
205
|
"fix_suggestion": "Downgrade accuracy to kCLLocationAccuracyThreeKilometers or require parental consent",
|
|
206
|
-
"penalty": "$
|
|
206
|
+
"penalty": "$53,088 per violation",
|
|
207
207
|
"languages": ["typescript", "javascript", "swift", "kotlin", "java", "python", "xml"],
|
|
208
208
|
"packs": ["coppa"],
|
|
209
209
|
"fixability": "guided",
|
|
@@ -217,7 +217,7 @@
|
|
|
217
217
|
"severity": "medium",
|
|
218
218
|
"confidence": "medium",
|
|
219
219
|
"category": "retention",
|
|
220
|
-
"description": "
|
|
220
|
+
"description": "COPPA 2025 explicitly prohibits indefinite retention of children's PI. Operators must retain data only as long as reasonably necessary for the purpose collected. Schemas with PII fields must define retention periods, deletion mechanisms, and purpose limitation.",
|
|
221
221
|
"patterns": [
|
|
222
222
|
{ "pattern": "new\\s+Schema\\s*\\(\\s*\\{[^{}]*(?:email|password|username|phone|dob|birth|firstName|lastName|first_name|last_name|fullName|full_name|displayName|display_name|address|ssn)[^{}]*\\}", "flags": "gi" },
|
|
223
223
|
{ "pattern": "class\\s+(?:User|Child|Student|Profile|Account|Member)\\w*\\s*\\(\\s*models\\.Model\\s*\\)", "flags": "gi" },
|
|
@@ -226,8 +226,8 @@
|
|
|
226
226
|
{ "pattern": "@Entity[\\s\\S]*?class\\s+(?:User|Child|Student|Profile|Account|Member)", "flags": "gi" },
|
|
227
227
|
{ "pattern": "data\\s+class\\s+(?:User|Child|Student|Profile|Account|Member)\\w*\\s*\\(", "flags": "gi" }
|
|
228
228
|
],
|
|
229
|
-
"fix_suggestion": "Add
|
|
230
|
-
"penalty": "
|
|
229
|
+
"fix_suggestion": "Add explicit retention period (retentionDays, expiresAt, or TTL index), deleted_at column, and document the purpose limitation for data collection per COPPA 2025 § 312.10",
|
|
230
|
+
"penalty": "$53,088 per violation (COPPA 2025 indefinite retention prohibition)",
|
|
231
231
|
"languages": ["typescript", "javascript", "python", "go", "java", "kotlin", "sql"],
|
|
232
232
|
"packs": ["coppa"],
|
|
233
233
|
"fixability": "guided",
|
|
@@ -274,7 +274,7 @@
|
|
|
274
274
|
{ "pattern": "new\\s+MediaRecorder\\s*\\(", "flags": "gi" }
|
|
275
275
|
],
|
|
276
276
|
"fix_suggestion": "Wrap audio recording in click handler and add parental consent check",
|
|
277
|
-
"penalty": "$
|
|
277
|
+
"penalty": "$53,088 per violation",
|
|
278
278
|
"languages": ["typescript", "javascript", "swift", "kotlin"],
|
|
279
279
|
"packs": ["coppa"],
|
|
280
280
|
"fixability": "guided",
|
|
@@ -315,7 +315,7 @@
|
|
|
315
315
|
{ "pattern": "(child_email|student_email|kid_email)\\s*=", "flags": "gi" }
|
|
316
316
|
],
|
|
317
317
|
"fix_suggestion": "Make parent_email required when collecting child contact information",
|
|
318
|
-
"penalty": "$
|
|
318
|
+
"penalty": "$53,088 per violation",
|
|
319
319
|
"languages": ["typescript", "javascript", "python"],
|
|
320
320
|
"packs": ["coppa"],
|
|
321
321
|
"fixability": "guided",
|
|
@@ -361,7 +361,7 @@
|
|
|
361
361
|
{ "pattern": "Freshdesk|FreshChat", "flags": "gi" }
|
|
362
362
|
],
|
|
363
363
|
"fix_suggestion": "Disable chat widget for unauthenticated or under-13 users via conditional rendering",
|
|
364
|
-
"penalty": "$
|
|
364
|
+
"penalty": "$53,088 per violation",
|
|
365
365
|
"languages": ["typescript", "javascript", "html"],
|
|
366
366
|
"packs": ["coppa"],
|
|
367
367
|
"fixability": "guided",
|
|
@@ -375,19 +375,25 @@
|
|
|
375
375
|
"severity": "critical",
|
|
376
376
|
"confidence": "medium",
|
|
377
377
|
"category": "biometric",
|
|
378
|
-
"description": "Face recognition, voice prints,
|
|
378
|
+
"description": "COPPA 2025 explicitly adds biometric identifiers to the definition of PI. Face recognition, voice prints, gait analysis, behavioral biometrics (keystroke dynamics, mouse movement patterns), iris/pupil scanning, and health biometric APIs all require verifiable parental consent.",
|
|
379
379
|
"patterns": [
|
|
380
380
|
{ "pattern": "(?:import\\s+.*from\\s+['\"]face-api\\.js['\"]|require\\s*\\(\\s*['\"]face-api\\.js['\"]\\s*\\))", "flags": "gi" },
|
|
381
381
|
{ "pattern": "LocalAuthentication.*evaluatePolicy", "flags": "gi" },
|
|
382
|
-
{ "pattern": "
|
|
383
|
-
{ "pattern": "
|
|
384
|
-
{ "pattern": "
|
|
385
|
-
{ "pattern": "
|
|
386
|
-
{ "pattern": "
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
382
|
+
{ "pattern": "(?:biometricAuth|BiometricAuth|biometricPrompt|BiometricPrompt)", "flags": "g" },
|
|
383
|
+
{ "pattern": "voicePrint|VoicePrint|voiceRecognition|VoiceRecognition|speakerVerification", "flags": "g" },
|
|
384
|
+
{ "pattern": "livenessCheck|LivenessCheck|livenessDetection", "flags": "g" },
|
|
385
|
+
{ "pattern": "FaceMatcher|FaceDetector|FaceRecognizer|FaceLandmarks", "flags": "g" },
|
|
386
|
+
{ "pattern": "keystrokeDynamic|keystrokePattern|typingBiometric|keyPressAnalysis", "flags": "g" },
|
|
387
|
+
{ "pattern": "gaitAnalysis|gaitDetect|gaitRecognition|motionBiometric", "flags": "g" },
|
|
388
|
+
{ "pattern": "mouseMovementPattern|cursorTracking|behavioralBiometric", "flags": "g" },
|
|
389
|
+
{ "pattern": "irisScann?|pupilDetect|eyeTracking|gazeTracking", "flags": "gi" },
|
|
390
|
+
{ "pattern": "(?:HKHealthStore|HKQuantityType|HealthKit).*(?:heartRate|stepCount|workout|sleep)", "flags": "gi" },
|
|
391
|
+
{ "pattern": "(?:GoogleFit|FitnessOptions|HistoryClient).*(?:heartRate|steps|calories|sleep)", "flags": "gi" },
|
|
392
|
+
{ "pattern": "(?:import|require).*(?:face-api|@mediapipe\\/face|@tensorflow\\/tfjs-models\\/face|deepface|insightface)", "flags": "gi" }
|
|
393
|
+
],
|
|
394
|
+
"fix_suggestion": "Ensure biometric data remains local-only (on-device) or obtain verifiable parental consent per COPPA 2025. Do not transmit biometric identifiers to servers without separate parental consent.",
|
|
395
|
+
"penalty": "$53,088 per violation",
|
|
396
|
+
"languages": ["typescript", "javascript", "swift", "kotlin", "python", "java"],
|
|
391
397
|
"packs": ["coppa"],
|
|
392
398
|
"fixability": "guided",
|
|
393
399
|
"transform_type": null,
|
|
@@ -397,10 +403,10 @@
|
|
|
397
403
|
{
|
|
398
404
|
"id": "coppa-notif-013",
|
|
399
405
|
"name": "Direct Push Notifications Without Consent",
|
|
400
|
-
"severity": "
|
|
406
|
+
"severity": "low",
|
|
401
407
|
"confidence": "low",
|
|
402
408
|
"category": "notification",
|
|
403
|
-
"description": "
|
|
409
|
+
"description": "FTC declined to codify push notification restrictions in the 2025 final rule but stated it 'remains concerned about push notifications and other engagement techniques.' Best practice: gate push subscriptions behind parental consent. Maps to NGL Labs and Sendit enforcement patterns.",
|
|
404
410
|
"patterns": [
|
|
405
411
|
{ "pattern": "FirebaseMessaging\\.subscribeToTopic", "flags": "gi" },
|
|
406
412
|
{ "pattern": "OneSignal\\.promptForPushNotifications", "flags": "gi" },
|
|
@@ -411,7 +417,7 @@
|
|
|
411
417
|
{ "pattern": "new\\s+Notification\\s*\\(", "flags": "gi" }
|
|
412
418
|
],
|
|
413
419
|
"fix_suggestion": "Gate push notification subscription behind parental dashboard setting",
|
|
414
|
-
"penalty": "$
|
|
420
|
+
"penalty": "$53,088 per violation",
|
|
415
421
|
"languages": ["typescript", "javascript", "swift", "kotlin"],
|
|
416
422
|
"packs": ["coppa"],
|
|
417
423
|
"fixability": "guided",
|
|
@@ -435,7 +441,7 @@
|
|
|
435
441
|
{ "pattern": "(?<!admin|Admin|moderate|Moderate)(?:commentForm.*submit|handleCommentSubmit)", "flags": "gi" }
|
|
436
442
|
],
|
|
437
443
|
"fix_suggestion": "Add middleware hook for PII scrubbing (regex or AWS Comprehend) before database storage",
|
|
438
|
-
"penalty": "$
|
|
444
|
+
"penalty": "$53,088 per violation",
|
|
439
445
|
"languages": ["typescript", "javascript", "python"],
|
|
440
446
|
"packs": ["coppa"],
|
|
441
447
|
"fixability": "guided",
|
|
@@ -534,7 +540,7 @@
|
|
|
534
540
|
{ "pattern": "(?:setUserId|set_user_id)\\s*\\([^)]*(?:email|\\.name|phone)", "flags": "gi" }
|
|
535
541
|
],
|
|
536
542
|
"fix_suggestion": "Hash user ID and omit email/name from analytics payload",
|
|
537
|
-
"penalty": "$
|
|
543
|
+
"penalty": "$53,088 per violation",
|
|
538
544
|
"languages": ["typescript", "javascript", "python", "go", "java", "kotlin"],
|
|
539
545
|
"packs": ["coppa"],
|
|
540
546
|
"fixability": "guided",
|
|
@@ -579,7 +585,7 @@
|
|
|
579
585
|
{ "pattern": "(?<!(?:mock|Mock|fake|stub|fixture|seed|example|test|Test|expect|assert|//|\\*)\\s{0,20})profileVisibility\\s*=\\s*['\"]?(?:public|Public)['\"]?", "flags": "gi" }
|
|
580
586
|
],
|
|
581
587
|
"fix_suggestion": "Change default visibility to \"private\" or false",
|
|
582
|
-
"penalty": "$
|
|
588
|
+
"penalty": "$53,088 per violation",
|
|
583
589
|
"languages": ["typescript", "javascript", "python", "swift"],
|
|
584
590
|
"packs": ["coppa"],
|
|
585
591
|
"fixability": "auto",
|
|
@@ -587,6 +593,36 @@
|
|
|
587
593
|
"scaffold_id": null,
|
|
588
594
|
"guidance_url": null
|
|
589
595
|
},
|
|
596
|
+
{
|
|
597
|
+
"id": "coppa-ads-021",
|
|
598
|
+
"name": "Targeted Advertising Without Separate Consent",
|
|
599
|
+
"severity": "critical",
|
|
600
|
+
"confidence": "medium",
|
|
601
|
+
"category": "advertising",
|
|
602
|
+
"description": "COPPA 2025 requires separate, specific opt-in consent before collecting children's PI for targeted advertising. Marketing consent cannot be bundled with general terms acceptance. Ad SDK initialization without a distinct consent flow is a violation.",
|
|
603
|
+
"patterns": [
|
|
604
|
+
{ "pattern": "(?:import|require).*(?:google-mobile-ads|@react-native-firebase\\/admob|react-native-admob)", "flags": "gi" },
|
|
605
|
+
{ "pattern": "(?:GADMobileAds|GADRequest|GADBannerView|GADInterstitial)\\.\\w+", "flags": "gi" },
|
|
606
|
+
{ "pattern": "MobileAds\\.initialize|AdRequest\\.Builder|AdView|InterstitialAd\\.load", "flags": "gi" },
|
|
607
|
+
{ "pattern": "(?:FBAudienceNetwork|FBAdView|FBInterstitialAd|FBNativeAd)", "flags": "gi" },
|
|
608
|
+
{ "pattern": "(?:import|require).*(?:react-native-fbads|@react-native-community\\/fbads)", "flags": "gi" },
|
|
609
|
+
{ "pattern": "UnityAds\\.(?:initialize|show|load)|import\\s+UnityAds", "flags": "gi" },
|
|
610
|
+
{ "pattern": "IronSource\\.(?:init|showRewardedVideo|loadInterstitial)|import\\s+IronSource", "flags": "gi" },
|
|
611
|
+
{ "pattern": "AppLovin\\.(?:initialize|showAd)|import.*AppLovinSDK", "flags": "gi" },
|
|
612
|
+
{ "pattern": "Chartboost\\.(?:start|showInterstitial|cacheInterstitial)", "flags": "gi" },
|
|
613
|
+
{ "pattern": "AdColony\\.(?:configure|requestInterstitial)", "flags": "gi" },
|
|
614
|
+
{ "pattern": "Vungle\\.(?:init|playAd|loadAd)", "flags": "gi" },
|
|
615
|
+
{ "pattern": "mopub\\.(?:loadBanner|loadInterstitial)|MoPubInterstitial", "flags": "gi" }
|
|
616
|
+
],
|
|
617
|
+
"fix_suggestion": "Implement a separate, specific opt-in consent flow for advertising before initializing ad SDKs. Marketing consent must NOT be bundled with general terms acceptance. Use age-gated ad experiences or contextual-only advertising for children under 13.",
|
|
618
|
+
"penalty": "$53,088 per violation (COPPA 2025 separate advertising consent requirement)",
|
|
619
|
+
"languages": ["typescript", "javascript", "swift", "kotlin", "java", "python"],
|
|
620
|
+
"packs": ["coppa"],
|
|
621
|
+
"fixability": "guided",
|
|
622
|
+
"transform_type": null,
|
|
623
|
+
"scaffold_id": "consent-ads",
|
|
624
|
+
"guidance_url": null
|
|
625
|
+
},
|
|
590
626
|
{
|
|
591
627
|
"id": "ETHICAL-001",
|
|
592
628
|
"name": "Infinite Scroll / Endless Feed",
|
|
@@ -990,10 +1026,10 @@
|
|
|
990
1026
|
"category": "age-verification",
|
|
991
1027
|
"description": "Utah SB 142 requires an age assurance system with at least 95% accuracy to identify minor account holders (under 18). Account creation flows that lack age verification gates violate this requirement. Excludes test factories and seed scripts.",
|
|
992
1028
|
"patterns": [
|
|
993
|
-
{ "pattern": "(?:createUser|signUp|
|
|
994
|
-
{ "pattern": "(?:create_user|sign_up|create_account)\\s*\\((?![^)]*(?:age|date_of_birth|dob|birth_date))[^)]*\\)", "flags": "gi" },
|
|
995
|
-
{ "pattern": "(?:RegistrationService)\\.(?:create|register)\\s*\\((?![^)]*(?:age|dob|birth))", "flags": "gi" },
|
|
996
|
-
{ "pattern": "INSERT\\s+INTO\\s+(?:users|accounts)\\s*\\((?![^)]*(?:age|dob|birth_date|date_of_birth))[^)]*\\)\\s*VALUES", "flags": "gi" }
|
|
1029
|
+
{ "pattern": "(?:createUser|signUp|createAccount|registerUser|registerAccount)\\s*\\((?![^)]*(?:age|dateOfBirth|dob|birthDate|birth_date))[^)]*\\)", "flags": "gi" },
|
|
1030
|
+
{ "pattern": "(?:create_user|sign_up|create_account|register_user|register_account)\\s*\\((?![^)]*(?:age|date_of_birth|dob|birth_date))[^)]*\\)", "flags": "gi" },
|
|
1031
|
+
{ "pattern": "(?:RegistrationService|UserRegistration|AccountService)\\.(?:create|register)\\s*\\((?![^)]*(?:age|dob|birth))", "flags": "gi" },
|
|
1032
|
+
{ "pattern": "INSERT\\s+INTO\\s+(?:users|accounts|members)\\s*\\((?![^)]*(?:age|dob|birth_date|date_of_birth))[^)]*\\)\\s*VALUES", "flags": "gi" }
|
|
997
1033
|
],
|
|
998
1034
|
"fix_suggestion": "Add an age assurance step (date-of-birth collection, age estimation, or ID verification) before account creation. If the user is under 18, flag the account as a minor account and require parental consent before activation. See Utah SB 142 §13-72-201.",
|
|
999
1035
|
"penalty": "Up to $2,500 per violation; private right of action for parents",
|
|
@@ -1108,7 +1144,7 @@
|
|
|
1108
1144
|
{ "pattern": "(?:palmPrint|palm_print|irisPattern|iris_pattern|retinaScan|retina_scan)\\s*[:=]", "flags": "gi" }
|
|
1109
1145
|
],
|
|
1110
1146
|
"fix_suggestion": "Obtain Verifiable Parental Consent (VPC) before collecting any biometric identifiers. Under COPPA 2.0, biometric data is 'personal information' requiring the highest consent standard. Keep biometric processing local-only where possible.",
|
|
1111
|
-
"penalty": "$
|
|
1147
|
+
"penalty": "$53,088 per violation (FTC Final Rule effective April 22, 2026)",
|
|
1112
1148
|
"languages": ["typescript", "javascript", "python", "go", "java", "kotlin", "swift"],
|
|
1113
1149
|
"packs": ["coppa"],
|
|
1114
1150
|
"fixability": "guided",
|
|
@@ -1131,7 +1167,7 @@
|
|
|
1131
1167
|
{ "pattern": "(?:saveDeviceToken|storeDeviceToken|registerDeviceToken|savePushToken|storePushToken)\\s*\\(", "flags": "gi" }
|
|
1132
1168
|
],
|
|
1133
1169
|
"fix_suggestion": "Gate push notification token registration behind a parental consent check. Under COPPA 2.0, push tokens are 'online contact information' — parents must explicitly opt in, and you must provide an opt-out mechanism accessible from a parental dashboard.",
|
|
1134
|
-
"penalty": "$
|
|
1170
|
+
"penalty": "$53,088 per violation (FTC Final Rule effective April 22, 2026)",
|
|
1135
1171
|
"languages": ["typescript", "javascript", "swift", "kotlin", "java"],
|
|
1136
1172
|
"packs": ["coppa"],
|
|
1137
1173
|
"fixability": "guided",
|
|
@@ -1153,7 +1189,7 @@
|
|
|
1153
1189
|
{ "pattern": "(?:shareStudentData|share_student_data|exportStudentRecords|export_student_records)\\s*\\(", "flags": "gi" }
|
|
1154
1190
|
],
|
|
1155
1191
|
"fix_suggestion": "Ensure ed-tech data collected under the 'school official' exception is used exclusively for the authorized educational purpose. Remove any analytics, advertising, or profiling code paths that touch student data. COPPA 2.0 makes this an explicit prohibition.",
|
|
1156
|
-
"penalty": "$
|
|
1192
|
+
"penalty": "$53,088 per violation (FTC Final Rule effective April 22, 2026)",
|
|
1157
1193
|
"languages": ["typescript", "javascript", "python", "go", "java", "kotlin"],
|
|
1158
1194
|
"packs": ["coppa"],
|
|
1159
1195
|
"fixability": "guided",
|
|
@@ -1175,7 +1211,7 @@
|
|
|
1175
1211
|
{ "pattern": "(?:childData|child_data|minorData|minor_data|studentData|student_data).*(?:archive|Archive|longTermStorage|long_term_storage)", "flags": "gi" }
|
|
1176
1212
|
],
|
|
1177
1213
|
"fix_suggestion": "Implement automatic data deletion policies for children's personal information. Set reasonable TTLs based on the purpose of collection. Add a scheduled deletion job that purges expired child data. COPPA 2.0 requires deletion when data is no longer reasonably necessary.",
|
|
1178
|
-
"penalty": "$
|
|
1214
|
+
"penalty": "$53,088 per violation (FTC Final Rule effective April 22, 2026)",
|
|
1179
1215
|
"languages": ["typescript", "javascript", "python", "go", "java", "kotlin"],
|
|
1180
1216
|
"packs": ["coppa"],
|
|
1181
1217
|
"fixability": "guided",
|
|
@@ -1197,7 +1233,7 @@
|
|
|
1197
1233
|
{ "pattern": "<input[^>]*type=['\"]checkbox['\"][^>]*(?:consent|agree|parent)", "flags": "gi" }
|
|
1198
1234
|
],
|
|
1199
1235
|
"fix_suggestion": "Upgrade consent mechanism to meet COPPA 2.0 VPC standards. For external data sharing, use credit card verification, video calls, government ID, or knowledge-based authentication. Simple checkboxes and email confirmations do not meet the VPC standard for external use of children's data.",
|
|
1200
|
-
"penalty": "$
|
|
1236
|
+
"penalty": "$53,088 per violation (FTC Final Rule effective April 22, 2026)",
|
|
1201
1237
|
"languages": ["typescript", "javascript", "python", "go", "java", "kotlin", "swift"],
|
|
1202
1238
|
"packs": ["coppa"],
|
|
1203
1239
|
"fixability": "guided",
|
|
@@ -2364,7 +2400,9 @@
|
|
|
2364
2400
|
"patterns": [
|
|
2365
2401
|
{ "pattern": "model\\.(?:fit|train|finetune)\\(", "flags": "gi" },
|
|
2366
2402
|
{ "pattern": "(?:trainModel|fitModel|trainPipeline)\\(", "flags": "gi" },
|
|
2367
|
-
{ "pattern": "(?:tensorflow|torch|sklearn|keras)\\.(?:fit|train)", "flags": "gi" }
|
|
2403
|
+
{ "pattern": "(?:tensorflow|torch|sklearn|keras)\\.(?:fit|train)", "flags": "gi" },
|
|
2404
|
+
{ "pattern": "whisper\\.load_model\\(", "flags": "gi" },
|
|
2405
|
+
{ "pattern": "model\\.transcribe\\(", "flags": "gi" }
|
|
2368
2406
|
],
|
|
2369
2407
|
"fix_suggestion": "Add fairness testing to ML pipeline: run bias audits (demographic parity, equalized odds) before deploying models that affect children.",
|
|
2370
2408
|
"penalty": "EU AI Act Art. 99: Up to \u20ac15M or 3% of global annual turnover",
|
|
@@ -2386,7 +2424,10 @@
|
|
|
2386
2424
|
{ "pattern": "(?:generateImage|aiGenerate|textToImage|imageGeneration)\\(", "flags": "gi" },
|
|
2387
2425
|
{ "pattern": "(?:syntheticContent|aiContent|generatedContent)", "flags": "gi" },
|
|
2388
2426
|
{ "pattern": "(?:dall-e|stable-diffusion|midjourney|openai\\.images)", "flags": "gi" },
|
|
2389
|
-
{ "pattern": "(?:textToSpeech|voiceSynthesis|tts)\\.(?:generate|create|synthesize)", "flags": "gi" }
|
|
2427
|
+
{ "pattern": "(?:textToSpeech|voiceSynthesis|tts)\\.(?:generate|create|synthesize)", "flags": "gi" },
|
|
2428
|
+
{ "pattern": "from\\s+elevenlabs\\s+import", "flags": "gi" },
|
|
2429
|
+
{ "pattern": "elevenlabs\\.(?:generate|clone|Voice)", "flags": "gi" },
|
|
2430
|
+
{ "pattern": "generate\\s*\\(\\s*text\\s*=", "flags": "gi" }
|
|
2390
2431
|
],
|
|
2391
2432
|
"fix_suggestion": "Add visible AI-generated content labels: include 'AI Generated' badge/watermark on all synthetic media shown to children.",
|
|
2392
2433
|
"penalty": "EU AI Act Art. 99: Up to \u20ac15M or 3% of global annual turnover",
|
|
@@ -2449,7 +2490,11 @@
|
|
|
2449
2490
|
"patterns": [
|
|
2450
2491
|
{ "pattern": "(?:loadModel|deployModel|serveModel)\\(", "flags": "gi" },
|
|
2451
2492
|
{ "pattern": "(?:modelEndpoint|inferenceEndpoint|predictionService)", "flags": "gi" },
|
|
2452
|
-
{ "pattern": "(?:huggingface|openai|anthropic|cohere)\\.(?:create|complete|generate)", "flags": "gi" }
|
|
2493
|
+
{ "pattern": "(?:huggingface|openai|anthropic|cohere)\\.(?:create|complete|generate)", "flags": "gi" },
|
|
2494
|
+
{ "pattern": "(?:ChatOpenAI|AzureChatOpenAI|ChatAnthropic|ChatCohere|ChatGoogleGenerativeAI)\\(", "flags": "gi" },
|
|
2495
|
+
{ "pattern": "from\\s+langchain_openai\\s+import", "flags": "gi" },
|
|
2496
|
+
{ "pattern": "whisper\\.load_model\\(", "flags": "gi" },
|
|
2497
|
+
{ "pattern": "OpenAIEmbeddings\\(", "flags": "gi" }
|
|
2453
2498
|
],
|
|
2454
2499
|
"fix_suggestion": "Create a model card documenting training data sources, intended use, limitations, and bias considerations.",
|
|
2455
2500
|
"penalty": "EU AI Act Art. 99: Up to \u20ac15M or 3% of global annual turnover",
|
|
@@ -2627,6 +2672,329 @@
|
|
|
2627
2672
|
"transform_type": null,
|
|
2628
2673
|
"scaffold_id": null,
|
|
2629
2674
|
"guidance_url": null
|
|
2675
|
+
},
|
|
2676
|
+
{
|
|
2677
|
+
"id": "CAI-DATAMIN-001",
|
|
2678
|
+
"name": "Excessive Data Collection in AI Pipeline",
|
|
2679
|
+
"severity": "high",
|
|
2680
|
+
"confidence": "medium",
|
|
2681
|
+
"category": "constitutional-ai",
|
|
2682
|
+
"description": "AI systems processing children's data must implement data minimization — collecting only what is strictly necessary. Broad collection scopes, wildcard field selection, or indefinite retention violate the data minimization principle (GDPR Art. 5(1)(c), IEEE 7010-2020).",
|
|
2683
|
+
"patterns": [
|
|
2684
|
+
{ "pattern": "(?:collectUserData|gatherData|harvestData|scrapeUser)\\((?![^)]*(?:fields|only|select))", "flags": "gi" },
|
|
2685
|
+
{ "pattern": "(?:fields|columns|attributes)\\s*[:=]\\s*['\"]\\*['\"]", "flags": "gi" },
|
|
2686
|
+
{ "pattern": "(?:retention|ttl|expiry)\\s*[:=]\\s*['\"](?:indefinite|forever|permanent|never)['\"]", "flags": "gi" },
|
|
2687
|
+
{ "pattern": "(?:trackAll|collectAll|logAll)(?:Events|Data|Interactions|Behaviors)\\(", "flags": "gi" }
|
|
2688
|
+
],
|
|
2689
|
+
"fix_suggestion": "Implement data minimization: specify exact fields needed, set finite retention periods (e.g., 30 days), and document the purpose for each data field collected.",
|
|
2690
|
+
"penalty": "Constitutional AI Principle: Data Minimization (GDPR Art. 5(1)(c), IEEE 7010-2020)",
|
|
2691
|
+
"languages": ["typescript", "javascript", "python"],
|
|
2692
|
+
"packs": ["eu-ai-act"],
|
|
2693
|
+
"fixability": "flag-only",
|
|
2694
|
+
"transform_type": null,
|
|
2695
|
+
"scaffold_id": null,
|
|
2696
|
+
"guidance_url": null
|
|
2697
|
+
},
|
|
2698
|
+
{
|
|
2699
|
+
"id": "CAI-NEURO-001",
|
|
2700
|
+
"name": "AI Interface Without Neurodivergent Accommodations",
|
|
2701
|
+
"severity": "medium",
|
|
2702
|
+
"confidence": "low",
|
|
2703
|
+
"category": "constitutional-ai",
|
|
2704
|
+
"description": "AI systems for children must accommodate neurodivergent users (ADHD, autism, dyslexia). Timed interactions, rapid UI transitions, and sensory-heavy content without alternatives violate accessibility principles (WCAG 2.2, IEEE 2089-2021 Section 7.3).",
|
|
2705
|
+
"patterns": [
|
|
2706
|
+
{ "pattern": "(?:countdownTimer|timeLimit|timedQuiz|timedResponse|timedAssessment)\\(", "flags": "gi" },
|
|
2707
|
+
{ "pattern": "(?:autoAdvance|autoScroll|autoPlay|rapidFire)\\s*[:=]\\s*true", "flags": "gi" },
|
|
2708
|
+
{ "pattern": "(?:flashingContent|strobeEffect|blinkAnimation|rapidTransition)\\(", "flags": "gi" },
|
|
2709
|
+
{ "pattern": "(?:forcedPacing|fixedSpeed|noExtension)\\s*[:=]\\s*true", "flags": "gi" }
|
|
2710
|
+
],
|
|
2711
|
+
"fix_suggestion": "Add neurodivergent accommodations: offer extended time options, reduce-motion mode, pause/resume controls, and adjustable pacing for all timed AI interactions.",
|
|
2712
|
+
"penalty": "Constitutional AI Principle: Neurodivergent Accessibility (IEEE 2089-2021 Section 7.3)",
|
|
2713
|
+
"languages": ["typescript", "javascript", "python", "tsx", "jsx"],
|
|
2714
|
+
"packs": ["eu-ai-act"],
|
|
2715
|
+
"fixability": "flag-only",
|
|
2716
|
+
"transform_type": null,
|
|
2717
|
+
"scaffold_id": null,
|
|
2718
|
+
"guidance_url": null
|
|
2719
|
+
},
|
|
2720
|
+
{
|
|
2721
|
+
"id": "CAI-COREG-001",
|
|
2722
|
+
"name": "AI Decision Affecting Child Without Parent Involvement",
|
|
2723
|
+
"severity": "high",
|
|
2724
|
+
"confidence": "medium",
|
|
2725
|
+
"category": "constitutional-ai",
|
|
2726
|
+
"description": "High-impact AI decisions about children (content restrictions, learning path changes, behavioral assessments) must include a parental co-regulation mechanism — parents must be notified and given override capability (IEEE 2089-2021 Section 6.4, UN CRC Art. 5).",
|
|
2727
|
+
"patterns": [
|
|
2728
|
+
{ "pattern": "(?:setContentRestriction|restrictAccess|blockContent|limitUsage)\\((?![^)]*parent)", "flags": "gi" },
|
|
2729
|
+
{ "pattern": "(?:adjustLearningPath|changeDifficulty|skipLesson|modifyCurriculum)\\((?![^)]*parent)", "flags": "gi" },
|
|
2730
|
+
{ "pattern": "(?:behavioralAssessment|emotionDetection|sentimentAnalysis|moodClassification)\\(.*(?:child|student|minor|kid)", "flags": "gi" },
|
|
2731
|
+
{ "pattern": "(?:autoRestrict|autoBlock|autoLimit)(?:Content|Access|Usage)\\(", "flags": "gi" }
|
|
2732
|
+
],
|
|
2733
|
+
"fix_suggestion": "Implement parental co-regulation: notify parents of high-impact AI decisions, provide override controls, and require parent-child joint confirmation for significant changes.",
|
|
2734
|
+
"penalty": "Constitutional AI Principle: Parental Co-Regulation (IEEE 2089-2021 Section 6.4)",
|
|
2735
|
+
"languages": ["typescript", "javascript", "python"],
|
|
2736
|
+
"packs": ["eu-ai-act"],
|
|
2737
|
+
"fixability": "flag-only",
|
|
2738
|
+
"transform_type": null,
|
|
2739
|
+
"scaffold_id": null,
|
|
2740
|
+
"guidance_url": null
|
|
2741
|
+
},
|
|
2742
|
+
{
|
|
2743
|
+
"id": "CAI-CRISIS-001",
|
|
2744
|
+
"name": "AI Chatbot Without Crisis Escalation Protocol",
|
|
2745
|
+
"severity": "critical",
|
|
2746
|
+
"confidence": "medium",
|
|
2747
|
+
"category": "constitutional-ai",
|
|
2748
|
+
"description": "AI systems interacting with children must detect crisis signals (self-harm, suicidal ideation, abuse disclosure) and immediately escalate to human professionals. Chatbots and AI companions without crisis detection in child-facing contexts violate duty of care (IEEE 2089-2021 Section 8, Surgeon General Advisory 2023).",
|
|
2749
|
+
"patterns": [
|
|
2750
|
+
{ "pattern": "(?:chatCompletion|generateResponse|botReply|aiResponse)\\((?![^)]*(?:crisis|safety|escalat|safeguard)).*(?:child|student|minor|kid|youth)", "flags": "gi" },
|
|
2751
|
+
{ "pattern": "(?:child|student|minor|kid|youth).*(?:chatCompletion|generateResponse|botReply|aiResponse)\\((?![^)]*(?:crisis|safety|escalat|safeguard))", "flags": "gi" },
|
|
2752
|
+
{ "pattern": "(?:aiCompanion|virtualFriend|chatBot|aiTutor)\\.(?:respond|reply|send)\\((?![^)]*(?:crisis|safety))", "flags": "gi" },
|
|
2753
|
+
{ "pattern": "(?:studentChat|childChat|youthChat|kidChat)\\.(?:send|post|submit)\\(", "flags": "gi" }
|
|
2754
|
+
],
|
|
2755
|
+
"fix_suggestion": "Implement crisis escalation: add keyword detection for self-harm/suicide/abuse signals, immediately route to crisis hotline (988 Suicide & Crisis Lifeline), notify a designated adult, and halt AI-only interaction.",
|
|
2756
|
+
"penalty": "Constitutional AI Principle: Crisis Escalation Protocol (IEEE 2089-2021 Section 8)",
|
|
2757
|
+
"languages": ["typescript", "javascript", "python"],
|
|
2758
|
+
"packs": ["eu-ai-act"],
|
|
2759
|
+
"fixability": "flag-only",
|
|
2760
|
+
"transform_type": null,
|
|
2761
|
+
"scaffold_id": null,
|
|
2762
|
+
"guidance_url": null
|
|
2763
|
+
},
|
|
2764
|
+
{
|
|
2765
|
+
"id": "AI-GOVERNANCE-001",
|
|
2766
|
+
"name": "Training Data Without Quality Documentation",
|
|
2767
|
+
"severity": "high",
|
|
2768
|
+
"confidence": "low",
|
|
2769
|
+
"category": "ai-governance",
|
|
2770
|
+
"description": "EU AI Act Art. 10(2) requires training data sets to be subject to data governance practices — including documentation of data sources, collection methodology, and quality metrics. ML pipelines without data provenance tracking violate this requirement.",
|
|
2771
|
+
"patterns": [
|
|
2772
|
+
{ "pattern": "(?:loadDataset|readTrainingData|importDataset|fetchTrainingSet)\\((?![^)]*(?:provenance|source|documentation|metadata))", "flags": "gi" },
|
|
2773
|
+
{ "pattern": "(?:trainData|trainingSet|trainingCorpus)\\s*[:=]\\s*(?:pd\\.read|csv\\.reader|json\\.load|open\\()", "flags": "gi" },
|
|
2774
|
+
{ "pattern": "(?:DataLoader|Dataset)\\.(?:from_|load_)(?:csv|json|parquet|tfrecord)\\(", "flags": "gi" }
|
|
2775
|
+
],
|
|
2776
|
+
"fix_suggestion": "Add data governance documentation: create a data card for each training dataset documenting source, collection method, size, demographics, known biases, and quality metrics.",
|
|
2777
|
+
"penalty": "EU AI Act Art. 99: Up to €15M or 3% of global annual turnover",
|
|
2778
|
+
"languages": ["typescript", "javascript", "python"],
|
|
2779
|
+
"packs": ["eu-ai-act"],
|
|
2780
|
+
"fixability": "flag-only",
|
|
2781
|
+
"transform_type": null,
|
|
2782
|
+
"scaffold_id": null,
|
|
2783
|
+
"guidance_url": null
|
|
2784
|
+
},
|
|
2785
|
+
{
|
|
2786
|
+
"id": "AI-GOVERNANCE-002",
|
|
2787
|
+
"name": "Training Data Without Bias Testing",
|
|
2788
|
+
"severity": "high",
|
|
2789
|
+
"confidence": "medium",
|
|
2790
|
+
"category": "ai-governance",
|
|
2791
|
+
"description": "EU AI Act Art. 10(2)(f) requires examination of training data for possible biases, especially for children where demographic imbalances can cause disproportionate harm. Model training without bias audits violates this requirement.",
|
|
2792
|
+
"patterns": [
|
|
2793
|
+
{ "pattern": "model\\.(?:fit|train|finetune)\\((?![^)]*(?:bias|fairness|audit|balanced))", "flags": "gi" },
|
|
2794
|
+
{ "pattern": "(?:pipeline|trainer)\\.(?:train|run|execute)\\((?![^)]*(?:bias|fairness|equit))", "flags": "gi" },
|
|
2795
|
+
{ "pattern": "(?:AutoML|autoTrain|autoFit)\\(", "flags": "gi" }
|
|
2796
|
+
],
|
|
2797
|
+
"fix_suggestion": "Add bias testing to the training pipeline: run demographic parity checks, compute equalized odds metrics, and document bias audit results before deployment.",
|
|
2798
|
+
"penalty": "EU AI Act Art. 99: Up to €15M or 3% of global annual turnover",
|
|
2799
|
+
"languages": ["typescript", "javascript", "python"],
|
|
2800
|
+
"packs": ["eu-ai-act"],
|
|
2801
|
+
"fixability": "flag-only",
|
|
2802
|
+
"transform_type": null,
|
|
2803
|
+
"scaffold_id": null,
|
|
2804
|
+
"guidance_url": null
|
|
2805
|
+
},
|
|
2806
|
+
{
|
|
2807
|
+
"id": "AI-GOVERNANCE-003",
|
|
2808
|
+
"name": "No Data Representativeness Validation",
|
|
2809
|
+
"severity": "medium",
|
|
2810
|
+
"confidence": "low",
|
|
2811
|
+
"category": "ai-governance",
|
|
2812
|
+
"description": "EU AI Act Art. 10(3) requires training data to be representative of the deployment context. Children's AI systems must validate that training data represents age, cultural, and linguistic diversity of the target population.",
|
|
2813
|
+
"patterns": [
|
|
2814
|
+
{ "pattern": "(?:trainModel|buildModel|createModel)\\((?![^)]*(?:representative|demograph|diversity|balanced|stratif))", "flags": "gi" },
|
|
2815
|
+
{ "pattern": "train_test_split\\((?![^)]*stratif)", "flags": "gi" },
|
|
2816
|
+
{ "pattern": "(?:DataSplit|splitData|partitionData)\\((?![^)]*(?:stratif|balanced|representative))", "flags": "gi" }
|
|
2817
|
+
],
|
|
2818
|
+
"fix_suggestion": "Validate data representativeness: use stratified sampling, verify demographic coverage across age groups, and document gaps between training data and target child population.",
|
|
2819
|
+
"penalty": "EU AI Act Art. 99: Up to €15M or 3% of global annual turnover",
|
|
2820
|
+
"languages": ["typescript", "javascript", "python"],
|
|
2821
|
+
"packs": ["eu-ai-act"],
|
|
2822
|
+
"fixability": "flag-only",
|
|
2823
|
+
"transform_type": null,
|
|
2824
|
+
"scaffold_id": null,
|
|
2825
|
+
"guidance_url": null
|
|
2826
|
+
},
|
|
2827
|
+
{
|
|
2828
|
+
"id": "AI-GOVERNANCE-004",
|
|
2829
|
+
"name": "Training Data Without Consent Verification",
|
|
2830
|
+
"severity": "critical",
|
|
2831
|
+
"confidence": "low",
|
|
2832
|
+
"category": "ai-governance",
|
|
2833
|
+
"description": "EU AI Act Art. 10(5) combined with GDPR Art. 6/9 requires that training data collection respects data protection law. Children's data used for training without verified parental consent is a severe violation.",
|
|
2834
|
+
"patterns": [
|
|
2835
|
+
{ "pattern": "(?:collectTrainingData|gatherTrainingSamples|buildTrainingSet)\\((?![^)]*consent)", "flags": "gi" },
|
|
2836
|
+
{ "pattern": "(?:userInteraction|chatLog|sessionData|behaviorLog)\\.(?:export|save|dump).*(?:train|model|dataset)", "flags": "gi" },
|
|
2837
|
+
{ "pattern": "(?:finetuneOn|trainOn|learnFrom)(?:User|Child|Student)(?:Data|Input|Interactions)\\(", "flags": "gi" }
|
|
2838
|
+
],
|
|
2839
|
+
"fix_suggestion": "Verify consent before using children's data for training: implement opt-in parental consent for data use in ML training, maintain consent audit trail, and provide data deletion mechanisms.",
|
|
2840
|
+
"penalty": "EU AI Act Art. 99: Up to €35M or 7% of global annual turnover (combined with GDPR)",
|
|
2841
|
+
"languages": ["typescript", "javascript", "python"],
|
|
2842
|
+
"packs": ["eu-ai-act"],
|
|
2843
|
+
"fixability": "flag-only",
|
|
2844
|
+
"transform_type": null,
|
|
2845
|
+
"scaffold_id": null,
|
|
2846
|
+
"guidance_url": null
|
|
2847
|
+
},
|
|
2848
|
+
{
|
|
2849
|
+
"id": "AI-OVERSIGHT-001",
|
|
2850
|
+
"name": "AI System Without Human-in-the-Loop Mechanism",
|
|
2851
|
+
"severity": "high",
|
|
2852
|
+
"confidence": "medium",
|
|
2853
|
+
"category": "ai-oversight",
|
|
2854
|
+
"description": "EU AI Act Art. 14(1) requires high-risk AI systems to be designed for effective human oversight. AI systems making consequential decisions for children without a human review checkpoint violate this requirement.",
|
|
2855
|
+
"patterns": [
|
|
2856
|
+
{ "pattern": "(?:autoApprove|autoAccept|autoGrade|autoAssess)\\(", "flags": "gi" },
|
|
2857
|
+
{ "pattern": "(?:automatedDecision|aiDecision|mlDecision)\\.(?:execute|apply|commit)\\(", "flags": "gi" },
|
|
2858
|
+
{ "pattern": "(?:contentFilter|safetyFilter|moderationFilter)\\.(?:autoApply|autoEnforce)\\(", "flags": "gi" }
|
|
2859
|
+
],
|
|
2860
|
+
"fix_suggestion": "Add human-in-the-loop: implement review queues for consequential AI decisions, add manual override capabilities, and require human approval for actions affecting child accounts.",
|
|
2861
|
+
"penalty": "EU AI Act Art. 99: Up to €15M or 3% of global annual turnover",
|
|
2862
|
+
"languages": ["typescript", "javascript", "python"],
|
|
2863
|
+
"packs": ["eu-ai-act"],
|
|
2864
|
+
"fixability": "flag-only",
|
|
2865
|
+
"transform_type": null,
|
|
2866
|
+
"scaffold_id": null,
|
|
2867
|
+
"guidance_url": null
|
|
2868
|
+
},
|
|
2869
|
+
{
|
|
2870
|
+
"id": "AI-OVERSIGHT-002",
|
|
2871
|
+
"name": "No Emergency Stop or Override Mechanism",
|
|
2872
|
+
"severity": "critical",
|
|
2873
|
+
"confidence": "low",
|
|
2874
|
+
"category": "ai-oversight",
|
|
2875
|
+
"description": "EU AI Act Art. 14(4)(d) requires human overseers to be able to intervene or interrupt the AI system at any time. AI systems without kill switch, emergency stop, or override mechanism are non-compliant.",
|
|
2876
|
+
"patterns": [
|
|
2877
|
+
{ "pattern": "(?:aiService|mlService|aiPipeline|aiWorker)\\.(?:start|run|deploy)\\((?![^)]*(?:killSwitch|emergencyStop|override|interrupt))", "flags": "gi" },
|
|
2878
|
+
{ "pattern": "(?:startAI|launchAI|deployAI|activateAI)\\((?![^)]*(?:stop|halt|kill|override|interrupt))", "flags": "gi" },
|
|
2879
|
+
{ "pattern": "(?:autonomousMode|autoMode|unsupervisedMode)\\s*[:=]\\s*true", "flags": "gi" }
|
|
2880
|
+
],
|
|
2881
|
+
"fix_suggestion": "Implement emergency stop: add a kill switch endpoint (/api/ai/stop), monitoring alerts for anomalous behavior, and immediate halt capability accessible to human overseers.",
|
|
2882
|
+
"penalty": "EU AI Act Art. 99: Up to €35M or 7% of global annual turnover",
|
|
2883
|
+
"languages": ["typescript", "javascript", "python"],
|
|
2884
|
+
"packs": ["eu-ai-act"],
|
|
2885
|
+
"fixability": "flag-only",
|
|
2886
|
+
"transform_type": null,
|
|
2887
|
+
"scaffold_id": null,
|
|
2888
|
+
"guidance_url": null
|
|
2889
|
+
},
|
|
2890
|
+
{
|
|
2891
|
+
"id": "AI-OVERSIGHT-003",
|
|
2892
|
+
"name": "AI Output Without Interpretability for Overseer",
|
|
2893
|
+
"severity": "medium",
|
|
2894
|
+
"confidence": "low",
|
|
2895
|
+
"category": "ai-oversight",
|
|
2896
|
+
"description": "EU AI Act Art. 14(4)(b) requires that human overseers can correctly interpret the AI system's output. AI predictions, classifications, or recommendations served without explanation metadata are non-compliant.",
|
|
2897
|
+
"patterns": [
|
|
2898
|
+
{ "pattern": "model\\.predict\\((?![^)]*(?:explain|interpret|shap|lime|feature_import))", "flags": "gi" },
|
|
2899
|
+
{ "pattern": "(?:classifier|predictor|estimator)\\.predict(?:_proba)?\\((?![^)]*(?:explain|interpret|reason))", "flags": "gi" },
|
|
2900
|
+
{ "pattern": "(?:getRecommendation|getPrediction|getClassification)\\((?![^)]*(?:reason|explain|confidence))", "flags": "gi" }
|
|
2901
|
+
],
|
|
2902
|
+
"fix_suggestion": "Add interpretability: attach explanation metadata (SHAP values, feature importance, confidence scores, or natural language reasoning) to every AI output served to overseers.",
|
|
2903
|
+
"penalty": "EU AI Act Art. 99: Up to €15M or 3% of global annual turnover",
|
|
2904
|
+
"languages": ["typescript", "javascript", "python"],
|
|
2905
|
+
"packs": ["eu-ai-act"],
|
|
2906
|
+
"fixability": "flag-only",
|
|
2907
|
+
"transform_type": null,
|
|
2908
|
+
"scaffold_id": null,
|
|
2909
|
+
"guidance_url": null
|
|
2910
|
+
},
|
|
2911
|
+
{
|
|
2912
|
+
"id": "AI-OVERSIGHT-004",
|
|
2913
|
+
"name": "No Oversight Audit Trail",
|
|
2914
|
+
"severity": "high",
|
|
2915
|
+
"confidence": "low",
|
|
2916
|
+
"category": "ai-oversight",
|
|
2917
|
+
"description": "EU AI Act Art. 14(4) requires human oversight actions (reviews, overrides, approvals) to be logged. AI systems without audit trails for human oversight actions cannot demonstrate compliance.",
|
|
2918
|
+
"patterns": [
|
|
2919
|
+
{ "pattern": "(?:humanReview|manualOverride|humanApproval)\\.(?:submit|process|execute)\\((?![^)]*(?:log|audit|record|track))", "flags": "gi" },
|
|
2920
|
+
{ "pattern": "(?:override|overrule|escalate)(?:Decision|Prediction|Classification)\\((?![^)]*(?:log|audit|record))", "flags": "gi" },
|
|
2921
|
+
{ "pattern": "(?:approveContent|rejectContent|flagContent)\\((?![^)]*(?:log|audit|trail|record))", "flags": "gi" }
|
|
2922
|
+
],
|
|
2923
|
+
"fix_suggestion": "Add oversight audit trail: log every human review, override, and approval action with timestamp, reviewer ID, original AI output, and human decision rationale.",
|
|
2924
|
+
"penalty": "EU AI Act Art. 99: Up to €15M or 3% of global annual turnover",
|
|
2925
|
+
"languages": ["typescript", "javascript", "python"],
|
|
2926
|
+
"packs": ["eu-ai-act"],
|
|
2927
|
+
"fixability": "flag-only",
|
|
2928
|
+
"transform_type": null,
|
|
2929
|
+
"scaffold_id": null,
|
|
2930
|
+
"guidance_url": null
|
|
2931
|
+
},
|
|
2932
|
+
{
|
|
2933
|
+
"id": "AI-ACCURACY-001",
|
|
2934
|
+
"name": "No Error Rate Monitoring",
|
|
2935
|
+
"severity": "high",
|
|
2936
|
+
"confidence": "low",
|
|
2937
|
+
"category": "ai-accuracy",
|
|
2938
|
+
"description": "EU AI Act Art. 15(1) requires high-risk AI systems to achieve appropriate levels of accuracy and declare expected error rates. AI inference endpoints without accuracy monitoring or error rate tracking are non-compliant.",
|
|
2939
|
+
"patterns": [
|
|
2940
|
+
{ "pattern": "(?:serveModel|deployModel|modelEndpoint|inferenceAPI)\\.(?:start|deploy|listen)\\((?![^)]*(?:monitor|metric|accuracy|errorRate))", "flags": "gi" },
|
|
2941
|
+
{ "pattern": "(?:predictionService|mlService|aiEndpoint)\\.(?:init|start|register)\\((?![^)]*(?:monitor|metric|accuracy))", "flags": "gi" },
|
|
2942
|
+
{ "pattern": "app\\.(?:post|get)\\s*\\(\\s*['\"].*(?:predict|classify|recommend|infer)[^'\"]*['\"]", "flags": "gi" }
|
|
2943
|
+
],
|
|
2944
|
+
"fix_suggestion": "Add accuracy monitoring: implement real-time error rate tracking, declare expected accuracy levels in model documentation, and set up alerts when accuracy degrades below thresholds.",
|
|
2945
|
+
"penalty": "EU AI Act Art. 99: Up to €15M or 3% of global annual turnover",
|
|
2946
|
+
"languages": ["typescript", "javascript", "python"],
|
|
2947
|
+
"packs": ["eu-ai-act"],
|
|
2948
|
+
"fixability": "flag-only",
|
|
2949
|
+
"transform_type": null,
|
|
2950
|
+
"scaffold_id": null,
|
|
2951
|
+
"guidance_url": null
|
|
2952
|
+
},
|
|
2953
|
+
{
|
|
2954
|
+
"id": "AI-ACCURACY-002",
|
|
2955
|
+
"name": "No Fallback for AI Failure",
|
|
2956
|
+
"severity": "high",
|
|
2957
|
+
"confidence": "medium",
|
|
2958
|
+
"category": "ai-accuracy",
|
|
2959
|
+
"description": "EU AI Act Art. 15(3) requires AI systems to be resilient against errors, faults, and inconsistencies. AI calls without error handling, timeouts, or fallback mechanisms expose children to unpredictable behavior.",
|
|
2960
|
+
"patterns": [
|
|
2961
|
+
{ "pattern": "(?:openai|anthropic|cohere|replicate)\\.\\w+(?:\\.\\w+)*\\((?![^\\n]*(?:catch|try|timeout|fallback|retry))", "flags": "gi" },
|
|
2962
|
+
{ "pattern": "await\\s+(?:generateText|generateResponse|aiComplete|llmCall)\\((?![^\\n]*(?:catch|try|timeout|fallback))", "flags": "gi" },
|
|
2963
|
+
{ "pattern": "(?:fetch|axios)\\s*\\(\\s*[^)]*(?:inference|predict|classify|openai|anthropic)(?![^\\n]*(?:catch|timeout|retry))", "flags": "gi" },
|
|
2964
|
+
{ "pattern": "(?:ChatOpenAI|AzureChatOpenAI|ChatAnthropic|ChatCohere)\\((?![^\\n]*(?:callbacks|on_error|fallback|retry))", "flags": "gi" },
|
|
2965
|
+
{ "pattern": "whisper\\.load_model\\((?![^\\n]*(?:try|catch|except|fallback))", "flags": "gi" },
|
|
2966
|
+
{ "pattern": "from\\s+elevenlabs\\s+import(?![^\\n]*(?:try|catch|except|fallback))", "flags": "gi" }
|
|
2967
|
+
],
|
|
2968
|
+
"fix_suggestion": "Add AI failure fallback: wrap all AI calls in try/catch with timeouts, implement graceful degradation (e.g., static content when AI unavailable), and log all failures for review.",
|
|
2969
|
+
"penalty": "EU AI Act Art. 99: Up to €15M or 3% of global annual turnover",
|
|
2970
|
+
"languages": ["typescript", "javascript", "python"],
|
|
2971
|
+
"packs": ["eu-ai-act"],
|
|
2972
|
+
"fixability": "guided",
|
|
2973
|
+
"transform_type": null,
|
|
2974
|
+
"scaffold_id": null,
|
|
2975
|
+
"guidance_url": null
|
|
2976
|
+
},
|
|
2977
|
+
{
|
|
2978
|
+
"id": "AI-ACCURACY-003",
|
|
2979
|
+
"name": "No Adversarial Robustness Testing",
|
|
2980
|
+
"severity": "medium",
|
|
2981
|
+
"confidence": "low",
|
|
2982
|
+
"category": "ai-accuracy",
|
|
2983
|
+
"description": "EU AI Act Art. 15(4) requires high-risk AI systems to be resilient against attempts by unauthorized third parties to manipulate outputs (adversarial attacks). AI systems processing children's input without input validation or adversarial testing are vulnerable to prompt injection and manipulation.",
|
|
2984
|
+
"patterns": [
|
|
2985
|
+
{ "pattern": "(?:userInput|userMessage|userPrompt|childInput).*(?:openai|anthropic|llm|model)(?![^\\n]*(?:sanitize|validate|filter|moderate|guard))", "flags": "gi" },
|
|
2986
|
+
{ "pattern": "(?:openai|anthropic|llm|model)\\.(?:generate|complete|create|chat)\\(.*(?:userInput|userMessage|userPrompt|childInput)(?![^\\n]*(?:sanitize|validate|filter|moderate|guard))", "flags": "gi" },
|
|
2987
|
+
{ "pattern": "(?:systemPrompt|messages)\\s*[:=].*\\+\\s*(?:userInput|req\\.body|input)(?![^\\n]*(?:sanitize|validate|escape))", "flags": "gi" },
|
|
2988
|
+
{ "pattern": "(?:promptTemplate|buildPrompt|createPrompt)\\(.*(?:user|child|student)(?![^)]*(?:sanitize|validate|clean|escape))", "flags": "gi" }
|
|
2989
|
+
],
|
|
2990
|
+
"fix_suggestion": "Add adversarial robustness: implement input sanitization for all user-provided text before passing to AI models, add prompt injection detection, and run periodic adversarial testing.",
|
|
2991
|
+
"penalty": "EU AI Act Art. 99: Up to €15M or 3% of global annual turnover",
|
|
2992
|
+
"languages": ["typescript", "javascript", "python"],
|
|
2993
|
+
"packs": ["eu-ai-act"],
|
|
2994
|
+
"fixability": "flag-only",
|
|
2995
|
+
"transform_type": null,
|
|
2996
|
+
"scaffold_id": null,
|
|
2997
|
+
"guidance_url": null
|
|
2630
2998
|
}
|
|
2631
2999
|
]
|
|
2632
3000
|
}
|