eslint-plugin-secure-coding 3.4.3 → 3.4.4

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.
Files changed (32) hide show
  1. package/package.json +2 -2
  2. package/src/index.js +1 -107
  3. package/src/oxlint.js +1 -3
  4. package/src/rules/detect-non-literal-regexp/index.js +1 -329
  5. package/src/rules/detect-object-injection/index.js +1 -691
  6. package/src/rules/detect-weak-password-validation/index.js +1 -54
  7. package/src/rules/no-directive-injection/index.js +1 -416
  8. package/src/rules/no-electron-security-issues/index.js +1 -385
  9. package/src/rules/no-format-string-injection/index.js +1 -565
  10. package/src/rules/no-graphql-injection/index.js +1 -612
  11. package/src/rules/no-hardcoded-credentials/index.js +1 -658
  12. package/src/rules/no-hardcoded-session-tokens/index.js +1 -56
  13. package/src/rules/no-improper-sanitization/index.js +1 -391
  14. package/src/rules/no-improper-type-validation/index.js +1 -422
  15. package/src/rules/no-insecure-comparison/index.js +1 -249
  16. package/src/rules/no-ldap-injection/index.js +1 -403
  17. package/src/rules/no-missing-authentication/index.js +1 -282
  18. package/src/rules/no-pii-in-logs/index.js +1 -63
  19. package/src/rules/no-privilege-escalation/index.js +1 -282
  20. package/src/rules/no-redos-vulnerable-regex/index.js +0 -0
  21. package/src/rules/no-sensitive-data-exposure/index.js +1 -249
  22. package/src/rules/no-template-injection/index.js +1 -84
  23. package/src/rules/no-unchecked-loop-condition/index.js +1 -541
  24. package/src/rules/no-unlimited-resource-allocation/index.js +1 -555
  25. package/src/rules/no-unsafe-deserialization/index.js +1 -497
  26. package/src/rules/no-unsafe-regex-construction/index.js +1 -275
  27. package/src/rules/no-weak-password-recovery/index.js +1 -382
  28. package/src/rules/no-xpath-injection/index.js +1 -431
  29. package/src/rules/no-xxe-injection/index.js +1 -230
  30. package/src/rules/require-backend-authorization/index.js +1 -58
  31. package/src/rules/require-secure-defaults/index.js +1 -41
  32. package/src/types/index.js +1 -2
@@ -1,249 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.noSensitiveDataExposure = void 0;
4
- const eslint_devkit_1 = require("@interlace/eslint-devkit");
5
- const eslint_devkit_2 = require("@interlace/eslint-devkit");
6
- function containsSensitiveData(text, patterns) {
7
- const normalized = text
8
- .replace(/([a-z])([A-Z])/g, '$1 $2')
9
- .toLowerCase();
10
- for (const pattern of patterns) {
11
- const escaped = pattern.toLowerCase().replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
12
- const flexPattern = escaped.replace(/[_ ]/g, '[_ ]');
13
- if (new RegExp(`\\b${flexPattern}\\b`, 'i').test(normalized)) {
14
- return pattern;
15
- }
16
- }
17
- return null;
18
- }
19
- exports.noSensitiveDataExposure = (0, eslint_devkit_2.createRule)({
20
- name: 'no-sensitive-data-exposure',
21
- meta: {
22
- type: 'suggestion',
23
- docs: {
24
- url: 'https://github.com/ofri-peretz/eslint/blob/main/packages/eslint-plugin-secure-coding/docs/rules/no-sensitive-data-exposure.md',
25
- description: 'Detects PII/credentials in logs, responses, or error messages',
26
- cwe: 'CWE-532',
27
- cvss: 5.3,
28
- },
29
- hasSuggestions: true,
30
- messages: {
31
- sensitiveDataExposure: (0, eslint_devkit_1.formatLLMMessage)({
32
- icon: eslint_devkit_1.MessageIcons.SECURITY,
33
- issueName: 'Sensitive data exposure',
34
- cwe: 'CWE-532',
35
- description: 'Sensitive data detected in {{context}}: {{dataType}}',
36
- severity: 'HIGH',
37
- fix: 'Redact or mask sensitive data before logging/exposing',
38
- documentationLink: 'https://cwe.mitre.org/data/definitions/532.html',
39
- }),
40
- redactData: (0, eslint_devkit_1.formatLLMMessage)({
41
- icon: eslint_devkit_1.MessageIcons.INFO,
42
- issueName: 'Redact Data',
43
- description: 'Redact sensitive data before logging',
44
- severity: 'LOW',
45
- fix: 'Redact sensitive fields before logging',
46
- documentationLink: 'https://cwe.mitre.org/data/definitions/532.html',
47
- }),
48
- useMasking: (0, eslint_devkit_1.formatLLMMessage)({
49
- icon: eslint_devkit_1.MessageIcons.INFO,
50
- issueName: 'Use Masking',
51
- description: 'Use data masking function',
52
- severity: 'LOW',
53
- fix: 'maskSensitive(data)',
54
- documentationLink: 'https://cwe.mitre.org/data/definitions/532.html',
55
- }),
56
- removeFromLogs: (0, eslint_devkit_1.formatLLMMessage)({
57
- icon: eslint_devkit_1.MessageIcons.INFO,
58
- issueName: 'Remove From Logs',
59
- description: 'Remove sensitive data from logs and errors',
60
- severity: 'LOW',
61
- fix: 'Filter sensitive data before logging',
62
- documentationLink: 'https://cwe.mitre.org/data/definitions/532.html',
63
- }),
64
- },
65
- schema: [
66
- {
67
- type: 'object',
68
- properties: {
69
- sensitivePatterns: {
70
- type: 'array',
71
- items: { type: 'string' },
72
- default: ['password', 'passwd', 'secret', 'token', 'access_token', 'auth_token', 'ssn', 'credit_card', 'creditcard', 'api_key', 'apikey', 'secret_key', 'private_key', 'encryption_key'],
73
- description: 'Sensitive data patterns',
74
- },
75
- checkConsoleLog: {
76
- type: 'boolean',
77
- default: true,
78
- description: 'Check console.log statements',
79
- },
80
- checkErrorMessages: {
81
- type: 'boolean',
82
- default: true,
83
- description: 'Check error messages',
84
- },
85
- checkApiResponses: {
86
- type: 'boolean',
87
- default: true,
88
- description: 'Check API responses',
89
- },
90
- },
91
- additionalProperties: false,
92
- },
93
- ],
94
- },
95
- defaultOptions: [
96
- {
97
- sensitivePatterns: ['password', 'passwd', 'secret', 'token', 'access_token', 'auth_token', 'ssn', 'credit_card', 'creditcard', 'api_key', 'apikey', 'secret_key', 'private_key', 'encryption_key'],
98
- checkConsoleLog: true,
99
- checkErrorMessages: true,
100
- checkApiResponses: true,
101
- },
102
- ],
103
- create(context, [options = {}]) {
104
- const { sensitivePatterns = ['password', 'passwd', 'secret', 'token', 'access_token', 'auth_token', 'ssn', 'credit_card', 'creditcard', 'api_key', 'apikey', 'secret_key', 'private_key', 'encryption_key'], checkConsoleLog = true, checkErrorMessages = true, } = options || {};
105
- function checkCallExpression(node) {
106
- const isLoggingCall = (() => {
107
- if (node.callee.type === 'MemberExpression') {
108
- const object = node.callee.object;
109
- const property = node.callee.property;
110
- if (property.type === 'Identifier') {
111
- const methodName = property.name.toLowerCase();
112
- if (['log', 'info', 'warn', 'error', 'debug', 'trace'].includes(methodName)) {
113
- if (object.type === 'Identifier') {
114
- const objName = object.name.toLowerCase();
115
- if (objName === 'console' || objName === 'logger') {
116
- return true;
117
- }
118
- }
119
- }
120
- }
121
- }
122
- else if (node.callee.type === 'Identifier') {
123
- const calleeName = node.callee.name.toLowerCase();
124
- if (calleeName.includes('log') || calleeName.includes('logger')) {
125
- return true;
126
- }
127
- }
128
- return false;
129
- })();
130
- if (isLoggingCall && checkConsoleLog) {
131
- for (const arg of node.arguments) {
132
- if (arg.type === 'Literal' && typeof arg.value === 'string') {
133
- const text = arg.value;
134
- const matchedPattern = containsSensitiveData(text, sensitivePatterns);
135
- if (matchedPattern) {
136
- context.report({
137
- node: arg,
138
- messageId: 'sensitiveDataExposure',
139
- data: {
140
- context: 'logs',
141
- dataType: matchedPattern,
142
- },
143
- suggest: [
144
- { messageId: 'redactData', fix: () => null },
145
- { messageId: 'useMasking', fix: () => null },
146
- { messageId: 'removeFromLogs', fix: () => null },
147
- ],
148
- });
149
- return;
150
- }
151
- }
152
- else if (arg.type === 'Identifier' && arg.name) {
153
- const matchedPattern2 = containsSensitiveData(arg.name, sensitivePatterns);
154
- if (matchedPattern2) {
155
- context.report({
156
- node: arg,
157
- messageId: 'sensitiveDataExposure',
158
- data: {
159
- context: 'logs',
160
- dataType: matchedPattern2,
161
- },
162
- suggest: [
163
- { messageId: 'redactData', fix: () => null },
164
- { messageId: 'useMasking', fix: () => null },
165
- { messageId: 'removeFromLogs', fix: () => null },
166
- ],
167
- });
168
- return;
169
- }
170
- }
171
- }
172
- }
173
- }
174
- function checkNewExpression(node) {
175
- if (!checkErrorMessages) {
176
- return;
177
- }
178
- if (node.callee && node.callee.type === 'Identifier' && node.callee.name === 'Error') {
179
- for (const arg of node.arguments) {
180
- if (arg.type === 'Literal' && typeof arg.value === 'string') {
181
- const text = arg.value;
182
- const matchedErrPattern = containsSensitiveData(text, sensitivePatterns);
183
- if (matchedErrPattern) {
184
- context.report({
185
- node: arg,
186
- messageId: 'sensitiveDataExposure',
187
- data: {
188
- context: 'error messages',
189
- dataType: matchedErrPattern,
190
- },
191
- suggest: [
192
- { messageId: 'redactData', fix: () => null },
193
- { messageId: 'useMasking', fix: () => null },
194
- { messageId: 'removeFromLogs', fix: () => null },
195
- ],
196
- });
197
- return;
198
- }
199
- }
200
- else if (arg.type === 'BinaryExpression' && arg.operator === '+') {
201
- if (arg.left && arg.left.type === 'Literal' && typeof arg.left.value === 'string') {
202
- const leftText = arg.left.value;
203
- const leftMatchedPattern = containsSensitiveData(leftText, sensitivePatterns);
204
- if (leftMatchedPattern) {
205
- context.report({
206
- node: arg.left,
207
- messageId: 'sensitiveDataExposure',
208
- data: {
209
- context: 'error messages',
210
- dataType: leftMatchedPattern,
211
- },
212
- suggest: [
213
- { messageId: 'redactData', fix: () => null },
214
- { messageId: 'useMasking', fix: () => null },
215
- { messageId: 'removeFromLogs', fix: () => null },
216
- ],
217
- });
218
- return;
219
- }
220
- }
221
- if (arg.right && arg.right.type === 'Identifier' && arg.right.name) {
222
- const rightMatchedPattern = containsSensitiveData(arg.right.name, sensitivePatterns);
223
- if (rightMatchedPattern) {
224
- context.report({
225
- node: arg.right,
226
- messageId: 'sensitiveDataExposure',
227
- data: {
228
- context: 'error messages',
229
- dataType: rightMatchedPattern,
230
- },
231
- suggest: [
232
- { messageId: 'redactData', fix: () => null },
233
- { messageId: 'useMasking', fix: () => null },
234
- { messageId: 'removeFromLogs', fix: () => null },
235
- ],
236
- });
237
- return;
238
- }
239
- }
240
- }
241
- }
242
- }
243
- }
244
- return {
245
- CallExpression: checkCallExpression,
246
- NewExpression: checkNewExpression,
247
- };
248
- },
249
- });
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.noSensitiveDataExposure=void 0;const eslint_devkit_1=require("@interlace/eslint-devkit");const eslint_devkit_2=require("@interlace/eslint-devkit");function containsSensitiveData(text,patterns){const normalized=text.replace(/([a-z])([A-Z])/g,"$1 $2").toLowerCase();for(const pattern of patterns){const escaped=pattern.toLowerCase().replace(/[.*+?^${}()|[\]\\]/g,"\\$&");const flexPattern=escaped.replace(/[_ ]/g,"[_ ]");if(new RegExp(`\\b${flexPattern}\\b`,"i").test(normalized)){return pattern}}return null}exports.noSensitiveDataExposure=(0,eslint_devkit_2.createRule)({name:"no-sensitive-data-exposure",meta:{type:"suggestion",docs:{url:"https://github.com/ofri-peretz/eslint/blob/main/packages/eslint-plugin-secure-coding/docs/rules/no-sensitive-data-exposure.md",description:"Detects PII/credentials in logs, responses, or error messages",cwe:"CWE-532",cvss:5.3},hasSuggestions:true,messages:{sensitiveDataExposure:(0,eslint_devkit_1.formatLLMMessage)({icon:eslint_devkit_1.MessageIcons.SECURITY,issueName:"Sensitive data exposure",cwe:"CWE-532",description:"Sensitive data detected in {{context}}: {{dataType}}",severity:"HIGH",fix:"Redact or mask sensitive data before logging/exposing",documentationLink:"https://cwe.mitre.org/data/definitions/532.html"}),redactData:(0,eslint_devkit_1.formatLLMMessage)({icon:eslint_devkit_1.MessageIcons.INFO,issueName:"Redact Data",description:"Redact sensitive data before logging",severity:"LOW",fix:"Redact sensitive fields before logging",documentationLink:"https://cwe.mitre.org/data/definitions/532.html"}),useMasking:(0,eslint_devkit_1.formatLLMMessage)({icon:eslint_devkit_1.MessageIcons.INFO,issueName:"Use Masking",description:"Use data masking function",severity:"LOW",fix:"maskSensitive(data)",documentationLink:"https://cwe.mitre.org/data/definitions/532.html"}),removeFromLogs:(0,eslint_devkit_1.formatLLMMessage)({icon:eslint_devkit_1.MessageIcons.INFO,issueName:"Remove From Logs",description:"Remove sensitive data from logs and errors",severity:"LOW",fix:"Filter sensitive data before logging",documentationLink:"https://cwe.mitre.org/data/definitions/532.html"})},schema:[{type:"object",properties:{sensitivePatterns:{type:"array",items:{type:"string"},default:["password","passwd","secret","token","access_token","auth_token","ssn","credit_card","creditcard","api_key","apikey","secret_key","private_key","encryption_key"],description:"Sensitive data patterns"},checkConsoleLog:{type:"boolean",default:true,description:"Check console.log statements"},checkErrorMessages:{type:"boolean",default:true,description:"Check error messages"},checkApiResponses:{type:"boolean",default:true,description:"Check API responses"}},additionalProperties:false}]},defaultOptions:[{sensitivePatterns:["password","passwd","secret","token","access_token","auth_token","ssn","credit_card","creditcard","api_key","apikey","secret_key","private_key","encryption_key"],checkConsoleLog:true,checkErrorMessages:true,checkApiResponses:true}],create(context,[options={}]){const{sensitivePatterns=["password","passwd","secret","token","access_token","auth_token","ssn","credit_card","creditcard","api_key","apikey","secret_key","private_key","encryption_key"],checkConsoleLog=true,checkErrorMessages=true}=options||{};function checkCallExpression(node){const isLoggingCall=(()=>{if(node.callee.type==="MemberExpression"){const object=node.callee.object;const property=node.callee.property;if(property.type==="Identifier"){const methodName=property.name.toLowerCase();if(["log","info","warn","error","debug","trace"].includes(methodName)){if(object.type==="Identifier"){const objName=object.name.toLowerCase();if(objName==="console"||objName==="logger"){return true}}}}}else if(node.callee.type==="Identifier"){const calleeName=node.callee.name.toLowerCase();if(calleeName.includes("log")||calleeName.includes("logger")){return true}}return false})();if(isLoggingCall&&checkConsoleLog){for(const arg of node.arguments){if(arg.type==="Literal"&&typeof arg.value==="string"){const text=arg.value;const matchedPattern=containsSensitiveData(text,sensitivePatterns);if(matchedPattern){context.report({node:arg,messageId:"sensitiveDataExposure",data:{context:"logs",dataType:matchedPattern},suggest:[{messageId:"redactData",fix:()=>null},{messageId:"useMasking",fix:()=>null},{messageId:"removeFromLogs",fix:()=>null}]});return}}else if(arg.type==="Identifier"&&arg.name){const matchedPattern2=containsSensitiveData(arg.name,sensitivePatterns);if(matchedPattern2){context.report({node:arg,messageId:"sensitiveDataExposure",data:{context:"logs",dataType:matchedPattern2},suggest:[{messageId:"redactData",fix:()=>null},{messageId:"useMasking",fix:()=>null},{messageId:"removeFromLogs",fix:()=>null}]});return}}}}}function checkNewExpression(node){if(!checkErrorMessages){return}if(node.callee&&node.callee.type==="Identifier"&&node.callee.name==="Error"){for(const arg of node.arguments){if(arg.type==="Literal"&&typeof arg.value==="string"){const text=arg.value;const matchedErrPattern=containsSensitiveData(text,sensitivePatterns);if(matchedErrPattern){context.report({node:arg,messageId:"sensitiveDataExposure",data:{context:"error messages",dataType:matchedErrPattern},suggest:[{messageId:"redactData",fix:()=>null},{messageId:"useMasking",fix:()=>null},{messageId:"removeFromLogs",fix:()=>null}]});return}}else if(arg.type==="BinaryExpression"&&arg.operator==="+"){if(arg.left&&arg.left.type==="Literal"&&typeof arg.left.value==="string"){const leftText=arg.left.value;const leftMatchedPattern=containsSensitiveData(leftText,sensitivePatterns);if(leftMatchedPattern){context.report({node:arg.left,messageId:"sensitiveDataExposure",data:{context:"error messages",dataType:leftMatchedPattern},suggest:[{messageId:"redactData",fix:()=>null},{messageId:"useMasking",fix:()=>null},{messageId:"removeFromLogs",fix:()=>null}]});return}}if(arg.right&&arg.right.type==="Identifier"&&arg.right.name){const rightMatchedPattern=containsSensitiveData(arg.right.name,sensitivePatterns);if(rightMatchedPattern){context.report({node:arg.right,messageId:"sensitiveDataExposure",data:{context:"error messages",dataType:rightMatchedPattern},suggest:[{messageId:"redactData",fix:()=>null},{messageId:"useMasking",fix:()=>null},{messageId:"removeFromLogs",fix:()=>null}]});return}}}}}}return{CallExpression:checkCallExpression,NewExpression:checkNewExpression}}});
@@ -1,84 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.noTemplateInjection = void 0;
4
- const eslint_devkit_1 = require("@interlace/eslint-devkit");
5
- const TEMPLATE_COMPILE_METHODS = new Set([
6
- 'compile', 'precompile', 'create', 'parse', 'template',
7
- ]);
8
- const TEMPLATE_RENDER_METHODS = new Set([
9
- 'render', 'renderFile', 'renderString', 'renderToString', 'renderTemplate',
10
- ]);
11
- const ALL_TEMPLATE_METHODS = new Set([
12
- ...TEMPLATE_COMPILE_METHODS,
13
- ...TEMPLATE_RENDER_METHODS,
14
- ]);
15
- const TEMPLATE_ENGINE_OBJECTS = new Set([
16
- 'Handlebars', 'handlebars',
17
- 'ejs',
18
- 'pug', 'jade',
19
- 'mustache', 'Mustache',
20
- 'nunjucks',
21
- 'swig',
22
- 'dust', 'Dust',
23
- 'doT',
24
- 'consolidate',
25
- ]);
26
- exports.noTemplateInjection = (0, eslint_devkit_1.createRule)({
27
- name: 'no-template-injection',
28
- meta: {
29
- type: 'problem',
30
- docs: {
31
- url: 'https://github.com/ofri-peretz/eslint/blob/main/packages/eslint-plugin-secure-coding/docs/rules/no-template-injection.md',
32
- description: 'Disallow dynamic strings as template arguments to server-side template engines (CWE-94)',
33
- cwe: 'CWE-94',
34
- cvss: 9.8,
35
- },
36
- messages: {
37
- templateInjection: (0, eslint_devkit_1.formatLLMMessage)({
38
- icon: eslint_devkit_1.MessageIcons.SECURITY,
39
- issueName: 'Template Injection (CWE-94)',
40
- cwe: 'CWE-94',
41
- description: '{{engine}}.{{method}}() receives a dynamic string. An attacker who controls the template can execute arbitrary server-side code.',
42
- severity: 'CRITICAL',
43
- fix: 'Pass only string literals as templates. If the template must vary, load it from a trusted file system path, never from user input.',
44
- documentationLink: 'https://portswigger.net/web-security/server-side-template-injection',
45
- }),
46
- },
47
- schema: [],
48
- },
49
- defaultOptions: [],
50
- create(context) {
51
- return {
52
- CallExpression(node) {
53
- const { callee, arguments: args } = node;
54
- if (callee.type !== eslint_devkit_1.AST_NODE_TYPES.MemberExpression)
55
- return;
56
- const { object, property } = callee;
57
- if (object.type !== eslint_devkit_1.AST_NODE_TYPES.Identifier)
58
- return;
59
- if (property.type !== eslint_devkit_1.AST_NODE_TYPES.Identifier)
60
- return;
61
- const engineName = object.name;
62
- const methodName = property.name;
63
- if (!TEMPLATE_ENGINE_OBJECTS.has(engineName))
64
- return;
65
- if (!ALL_TEMPLATE_METHODS.has(methodName))
66
- return;
67
- const firstArg = args[0];
68
- if (!firstArg)
69
- return;
70
- if (firstArg.type === eslint_devkit_1.AST_NODE_TYPES.Literal &&
71
- typeof firstArg.value === 'string')
72
- return;
73
- if (firstArg.type === eslint_devkit_1.AST_NODE_TYPES.TemplateLiteral &&
74
- firstArg.expressions.length === 0)
75
- return;
76
- context.report({
77
- node: firstArg,
78
- messageId: 'templateInjection',
79
- data: { engine: engineName, method: methodName },
80
- });
81
- },
82
- };
83
- },
84
- });
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.noTemplateInjection=void 0;const eslint_devkit_1=require("@interlace/eslint-devkit");const TEMPLATE_COMPILE_METHODS=new Set(["compile","precompile","create","parse","template"]);const TEMPLATE_RENDER_METHODS=new Set(["render","renderFile","renderString","renderToString","renderTemplate"]);const ALL_TEMPLATE_METHODS=new Set([...TEMPLATE_COMPILE_METHODS,...TEMPLATE_RENDER_METHODS]);const TEMPLATE_ENGINE_OBJECTS=new Set(["Handlebars","handlebars","ejs","pug","jade","mustache","Mustache","nunjucks","swig","dust","Dust","doT","consolidate"]);exports.noTemplateInjection=(0,eslint_devkit_1.createRule)({name:"no-template-injection",meta:{type:"problem",docs:{url:"https://github.com/ofri-peretz/eslint/blob/main/packages/eslint-plugin-secure-coding/docs/rules/no-template-injection.md",description:"Disallow dynamic strings as template arguments to server-side template engines (CWE-94)",cwe:"CWE-94",cvss:9.8},messages:{templateInjection:(0,eslint_devkit_1.formatLLMMessage)({icon:eslint_devkit_1.MessageIcons.SECURITY,issueName:"Template Injection (CWE-94)",cwe:"CWE-94",description:"{{engine}}.{{method}}() receives a dynamic string. An attacker who controls the template can execute arbitrary server-side code.",severity:"CRITICAL",fix:"Pass only string literals as templates. If the template must vary, load it from a trusted file system path, never from user input.",documentationLink:"https://portswigger.net/web-security/server-side-template-injection"})},schema:[]},defaultOptions:[],create(context){return{CallExpression(node){const{callee,arguments:args}=node;if(callee.type!==eslint_devkit_1.AST_NODE_TYPES.MemberExpression)return;const{object,property}=callee;if(object.type!==eslint_devkit_1.AST_NODE_TYPES.Identifier)return;if(property.type!==eslint_devkit_1.AST_NODE_TYPES.Identifier)return;const engineName=object.name;const methodName=property.name;if(!TEMPLATE_ENGINE_OBJECTS.has(engineName))return;if(!ALL_TEMPLATE_METHODS.has(methodName))return;const firstArg=args[0];if(!firstArg)return;if(firstArg.type===eslint_devkit_1.AST_NODE_TYPES.Literal&&typeof firstArg.value==="string")return;if(firstArg.type===eslint_devkit_1.AST_NODE_TYPES.TemplateLiteral&&firstArg.expressions.length===0)return;context.report({node:firstArg,messageId:"templateInjection",data:{engine:engineName,method:methodName}})}}}});