Skip to content

typescript-node-security/detect-non-literal-fs-filename incorrectly flags any module that contains the substring "fs" #799

@quisido

Description

@quisido

Describe the bug

If you import any function from a module that contains the substring fs, e.g. any module that contains the word "offset," then Datadog incorrectly flags it as the fs module and throws incorrect warnings about passing variables as input.

To Reproduce

Import a function from any file that contains fs in its file name, then pass that function a variable.

Expected behavior

Only the fs module should be considered for this error.

Screenshots

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions