Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Commit

Permalink
[tests] added new test case for tsr-detect-non-literal-fs-filename rule
Browse files Browse the repository at this point in the history
  • Loading branch information
webschik committed Oct 9, 2018
1 parent 770262d commit 1126655
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,9 @@ More information: https://blog.liftsecurity.io/2014/11/03/regular-expression-dos

Detects `require(variable)`, which might allow an attacker to load and run arbitrary code, or access arbitrary files on disk.

More information: http://www.bennadel.com/blog/2169-where-does-node-js-and-require-look-for-modules.htm
More information:
* http://www.bennadel.com/blog/2169-where-does-node-js-and-require-look-for-modules.htm
* https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-dynamic-require.md

#### `tsr-detect-possible-timing-attacks`

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,11 @@ const s = 'test';
const o = {
open(a: string) {},
};
o.open(s);
o.open(s);

const _ = require('lodash');
require('lodash-exists');

if (_.exists(memberId)) {
this.memberId = memberId;
}

0 comments on commit 1126655

Please sign in to comment.