Avoid string-built paths from `__dirname` or `__filename`
Do not build filesystem paths by concatenating `__dirname` or `__filename` with strings or templates.
#Metadata
#Why it matters
String-built paths are easy to get wrong and can enable directory traversal when any segment is dynamic.
#Remediation
Use `path.join`, `path.resolve`, or `import.meta.url` with validated segments instead of string concatenation.
#Repository path
The generated metadata points to critiq-rules/libs/rules/catalog/rules/typescript/ts.security.unsafe-dirname-path-concat.rule.yaml.