Skip to content

Consider Function('return this') as safe (but still need the Tracer to consider it as a globlal ref) #180

Closed
@fraxken

Description

@fraxken

Code like that should be valid and not detected as unsafe

var root = freeGlobal || freeSelf || Function('return this')();
import { runASTAnalysis } from "@nodesecure/js-x-ray";

const result = runASTAnalysis(`
var root = freeGlobal || freeSelf || Function('return this')();
`);

console.log(result);

The following code should return no warnings

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions