@undercurrentai/eslint-plugin-ai-guard 2.0.0-beta.3
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/LICENSE +21 -0
- package/README.md +252 -0
- package/dist/cli/index.js +2293 -0
- package/dist/index.d.mts +92 -0
- package/dist/index.d.ts +92 -0
- package/dist/index.js +3679 -0
- package/dist/index.mjs +3652 -0
- package/package.json +104 -0
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import * as _typescript_eslint_utils_ts_eslint from '@typescript-eslint/utils/ts-eslint';
|
|
2
|
+
|
|
3
|
+
declare const plugin: {
|
|
4
|
+
meta: {
|
|
5
|
+
name: string;
|
|
6
|
+
version: string;
|
|
7
|
+
};
|
|
8
|
+
rules: {
|
|
9
|
+
readonly 'no-empty-catch': _typescript_eslint_utils_ts_eslint.RuleModule<"emptyCatch" | "addTodoHandler", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
10
|
+
name: string;
|
|
11
|
+
};
|
|
12
|
+
readonly 'no-broad-exception': _typescript_eslint_utils_ts_eslint.RuleModule<"broadException", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
13
|
+
name: string;
|
|
14
|
+
};
|
|
15
|
+
readonly 'no-catch-log-rethrow': _typescript_eslint_utils_ts_eslint.RuleModule<"catchLogRethrow", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
16
|
+
name: string;
|
|
17
|
+
};
|
|
18
|
+
readonly 'no-catch-without-use': _typescript_eslint_utils_ts_eslint.RuleModule<"unusedCatchParam", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
19
|
+
name: string;
|
|
20
|
+
};
|
|
21
|
+
readonly 'no-async-array-callback': _typescript_eslint_utils_ts_eslint.RuleModule<"asyncArrayCallback", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
22
|
+
name: string;
|
|
23
|
+
};
|
|
24
|
+
readonly 'no-floating-promise': _typescript_eslint_utils_ts_eslint.RuleModule<"floatingPromise", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
25
|
+
name: string;
|
|
26
|
+
};
|
|
27
|
+
readonly 'no-await-in-loop': _typescript_eslint_utils_ts_eslint.RuleModule<"awaitInLoop", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
28
|
+
name: string;
|
|
29
|
+
};
|
|
30
|
+
readonly 'no-async-without-await': _typescript_eslint_utils_ts_eslint.RuleModule<"asyncWithoutAwait", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
31
|
+
name: string;
|
|
32
|
+
};
|
|
33
|
+
readonly 'no-redundant-await': _typescript_eslint_utils_ts_eslint.RuleModule<"redundantAwait", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
34
|
+
name: string;
|
|
35
|
+
};
|
|
36
|
+
readonly 'no-hardcoded-secret': _typescript_eslint_utils_ts_eslint.RuleModule<"hardcodedSecret", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
37
|
+
name: string;
|
|
38
|
+
};
|
|
39
|
+
readonly 'no-eval-dynamic': _typescript_eslint_utils_ts_eslint.RuleModule<"evalDynamic" | "newFunctionDynamic", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
40
|
+
name: string;
|
|
41
|
+
};
|
|
42
|
+
readonly 'no-sql-string-concat': _typescript_eslint_utils_ts_eslint.RuleModule<"sqlStringConcat", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
43
|
+
name: string;
|
|
44
|
+
};
|
|
45
|
+
readonly 'no-unsafe-deserialize': _typescript_eslint_utils_ts_eslint.RuleModule<"unsafeDeserialize", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
46
|
+
name: string;
|
|
47
|
+
};
|
|
48
|
+
readonly 'require-auth-middleware': _typescript_eslint_utils_ts_eslint.RuleModule<"missingAuth", [{
|
|
49
|
+
authMiddlewareNames?: string[];
|
|
50
|
+
}], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
51
|
+
name: string;
|
|
52
|
+
};
|
|
53
|
+
readonly 'require-authz-check': _typescript_eslint_utils_ts_eslint.RuleModule<"missingAuthz", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
54
|
+
name: string;
|
|
55
|
+
};
|
|
56
|
+
readonly 'require-framework-auth': _typescript_eslint_utils_ts_eslint.RuleModule<"missingAuth" | "missingAuthNextjs" | "missingAuthNestjs", [{
|
|
57
|
+
knownAuthCallers?: string[];
|
|
58
|
+
publicRoutePatterns?: string[];
|
|
59
|
+
skipDecorators?: string[];
|
|
60
|
+
assumeGlobalAuth?: boolean;
|
|
61
|
+
mutatingOnly?: boolean;
|
|
62
|
+
}], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
63
|
+
name: string;
|
|
64
|
+
};
|
|
65
|
+
readonly 'require-framework-authz': _typescript_eslint_utils_ts_eslint.RuleModule<"missingAuthz", [{
|
|
66
|
+
authzHelperNames?: string[];
|
|
67
|
+
}], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
68
|
+
name: string;
|
|
69
|
+
};
|
|
70
|
+
readonly 'require-webhook-signature': _typescript_eslint_utils_ts_eslint.RuleModule<"missingWebhookSig", [{
|
|
71
|
+
webhookRoutePatterns?: string[];
|
|
72
|
+
verificationFunctions?: string[];
|
|
73
|
+
}], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
74
|
+
name: string;
|
|
75
|
+
};
|
|
76
|
+
readonly 'no-console-in-handler': _typescript_eslint_utils_ts_eslint.RuleModule<"noConsoleInHandler" | "removeConsoleCall", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
77
|
+
name: string;
|
|
78
|
+
};
|
|
79
|
+
readonly 'no-duplicate-logic-block': _typescript_eslint_utils_ts_eslint.RuleModule<"duplicateLogic", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
80
|
+
name: string;
|
|
81
|
+
};
|
|
82
|
+
};
|
|
83
|
+
configs: {
|
|
84
|
+
recommended: _typescript_eslint_utils_ts_eslint.ClassicConfig.Config;
|
|
85
|
+
strict: _typescript_eslint_utils_ts_eslint.ClassicConfig.Config;
|
|
86
|
+
security: _typescript_eslint_utils_ts_eslint.ClassicConfig.Config;
|
|
87
|
+
compat: _typescript_eslint_utils_ts_eslint.ClassicConfig.Config;
|
|
88
|
+
framework: _typescript_eslint_utils_ts_eslint.ClassicConfig.Config;
|
|
89
|
+
};
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
export { plugin as default };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import * as _typescript_eslint_utils_ts_eslint from '@typescript-eslint/utils/ts-eslint';
|
|
2
|
+
|
|
3
|
+
declare const plugin: {
|
|
4
|
+
meta: {
|
|
5
|
+
name: string;
|
|
6
|
+
version: string;
|
|
7
|
+
};
|
|
8
|
+
rules: {
|
|
9
|
+
readonly 'no-empty-catch': _typescript_eslint_utils_ts_eslint.RuleModule<"emptyCatch" | "addTodoHandler", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
10
|
+
name: string;
|
|
11
|
+
};
|
|
12
|
+
readonly 'no-broad-exception': _typescript_eslint_utils_ts_eslint.RuleModule<"broadException", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
13
|
+
name: string;
|
|
14
|
+
};
|
|
15
|
+
readonly 'no-catch-log-rethrow': _typescript_eslint_utils_ts_eslint.RuleModule<"catchLogRethrow", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
16
|
+
name: string;
|
|
17
|
+
};
|
|
18
|
+
readonly 'no-catch-without-use': _typescript_eslint_utils_ts_eslint.RuleModule<"unusedCatchParam", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
19
|
+
name: string;
|
|
20
|
+
};
|
|
21
|
+
readonly 'no-async-array-callback': _typescript_eslint_utils_ts_eslint.RuleModule<"asyncArrayCallback", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
22
|
+
name: string;
|
|
23
|
+
};
|
|
24
|
+
readonly 'no-floating-promise': _typescript_eslint_utils_ts_eslint.RuleModule<"floatingPromise", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
25
|
+
name: string;
|
|
26
|
+
};
|
|
27
|
+
readonly 'no-await-in-loop': _typescript_eslint_utils_ts_eslint.RuleModule<"awaitInLoop", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
28
|
+
name: string;
|
|
29
|
+
};
|
|
30
|
+
readonly 'no-async-without-await': _typescript_eslint_utils_ts_eslint.RuleModule<"asyncWithoutAwait", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
31
|
+
name: string;
|
|
32
|
+
};
|
|
33
|
+
readonly 'no-redundant-await': _typescript_eslint_utils_ts_eslint.RuleModule<"redundantAwait", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
34
|
+
name: string;
|
|
35
|
+
};
|
|
36
|
+
readonly 'no-hardcoded-secret': _typescript_eslint_utils_ts_eslint.RuleModule<"hardcodedSecret", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
37
|
+
name: string;
|
|
38
|
+
};
|
|
39
|
+
readonly 'no-eval-dynamic': _typescript_eslint_utils_ts_eslint.RuleModule<"evalDynamic" | "newFunctionDynamic", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
40
|
+
name: string;
|
|
41
|
+
};
|
|
42
|
+
readonly 'no-sql-string-concat': _typescript_eslint_utils_ts_eslint.RuleModule<"sqlStringConcat", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
43
|
+
name: string;
|
|
44
|
+
};
|
|
45
|
+
readonly 'no-unsafe-deserialize': _typescript_eslint_utils_ts_eslint.RuleModule<"unsafeDeserialize", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
46
|
+
name: string;
|
|
47
|
+
};
|
|
48
|
+
readonly 'require-auth-middleware': _typescript_eslint_utils_ts_eslint.RuleModule<"missingAuth", [{
|
|
49
|
+
authMiddlewareNames?: string[];
|
|
50
|
+
}], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
51
|
+
name: string;
|
|
52
|
+
};
|
|
53
|
+
readonly 'require-authz-check': _typescript_eslint_utils_ts_eslint.RuleModule<"missingAuthz", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
54
|
+
name: string;
|
|
55
|
+
};
|
|
56
|
+
readonly 'require-framework-auth': _typescript_eslint_utils_ts_eslint.RuleModule<"missingAuth" | "missingAuthNextjs" | "missingAuthNestjs", [{
|
|
57
|
+
knownAuthCallers?: string[];
|
|
58
|
+
publicRoutePatterns?: string[];
|
|
59
|
+
skipDecorators?: string[];
|
|
60
|
+
assumeGlobalAuth?: boolean;
|
|
61
|
+
mutatingOnly?: boolean;
|
|
62
|
+
}], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
63
|
+
name: string;
|
|
64
|
+
};
|
|
65
|
+
readonly 'require-framework-authz': _typescript_eslint_utils_ts_eslint.RuleModule<"missingAuthz", [{
|
|
66
|
+
authzHelperNames?: string[];
|
|
67
|
+
}], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
68
|
+
name: string;
|
|
69
|
+
};
|
|
70
|
+
readonly 'require-webhook-signature': _typescript_eslint_utils_ts_eslint.RuleModule<"missingWebhookSig", [{
|
|
71
|
+
webhookRoutePatterns?: string[];
|
|
72
|
+
verificationFunctions?: string[];
|
|
73
|
+
}], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
74
|
+
name: string;
|
|
75
|
+
};
|
|
76
|
+
readonly 'no-console-in-handler': _typescript_eslint_utils_ts_eslint.RuleModule<"noConsoleInHandler" | "removeConsoleCall", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
77
|
+
name: string;
|
|
78
|
+
};
|
|
79
|
+
readonly 'no-duplicate-logic-block': _typescript_eslint_utils_ts_eslint.RuleModule<"duplicateLogic", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
80
|
+
name: string;
|
|
81
|
+
};
|
|
82
|
+
};
|
|
83
|
+
configs: {
|
|
84
|
+
recommended: _typescript_eslint_utils_ts_eslint.ClassicConfig.Config;
|
|
85
|
+
strict: _typescript_eslint_utils_ts_eslint.ClassicConfig.Config;
|
|
86
|
+
security: _typescript_eslint_utils_ts_eslint.ClassicConfig.Config;
|
|
87
|
+
compat: _typescript_eslint_utils_ts_eslint.ClassicConfig.Config;
|
|
88
|
+
framework: _typescript_eslint_utils_ts_eslint.ClassicConfig.Config;
|
|
89
|
+
};
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
export { plugin as default };
|