Skip to content

Increased false-positive rate with new NPM obfuscation detection #654

@kam193

Description

@kam193

Hi,

I've noticed that the updated NPM obfuscation detection generates quite a few more false positives.

One thing is detecting a lot of minified code, but this is actually intended - just a bit painful in the JavaScript world :D

But I have also noticed some clear code, for example in the following code:

var args = command.payload.args;
value = [];
(Array.isArray(apiName) ? apiName : [apiName]).forEach((f) => {
    console.log(f, args);
    if (isArrayOfArrays(args)) {
        var value2 = [];
        args.forEach((arg2) => {
            if (args) {
                value2.push(api[f](...arg2) || null);
            }
            else {
                value2.push(api[f]() || null);
            }
        });
        value.push(value2);
    }
    else {
        if (args) {
            value.push(api[f](...args) || null);
        }
        else {
            value.push(api[f]() || null);
        }
    }
});

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