muaddib-scanner 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "muaddib-scanner",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "Supply-chain threat detection & response for npm",
5
5
  "main": "src/index.js",
6
6
  "bin": {
@@ -40,4 +40,4 @@
40
40
  "acorn-walk": "^8.3.4",
41
41
  "js-yaml": "^4.1.0"
42
42
  }
43
- }
43
+ }
@@ -11,7 +11,7 @@ const EXCLUDED_FILES = [
11
11
  'src/response/playbooks.js'
12
12
  ];
13
13
 
14
- const EXCLUDED_DIRS = ['test', 'node_modules', '.git', 'src'];
14
+ const EXCLUDED_DIRS = ['test', 'tests', 'node_modules', '.git', 'src'];
15
15
 
16
16
  const DANGEROUS_CALLS = [
17
17
  'eval',
@@ -3,7 +3,7 @@ const path = require('path');
3
3
  const acorn = require('acorn');
4
4
  const walk = require('acorn-walk');
5
5
 
6
- const EXCLUDED_DIRS = ['test', 'node_modules', '.git', 'src'];
6
+ const EXCLUDED_DIRS = ['test', 'tests', 'node_modules', '.git', 'src'];
7
7
 
8
8
  async function analyzeDataFlow(targetPath) {
9
9
  const threats = [];
@@ -66,12 +66,7 @@ function detectObfuscation(targetPath) {
66
66
  return threats;
67
67
  }
68
68
 
69
- const EXCLUDED_DIRS = [
70
- 'test',
71
- 'node_modules',
72
- '.git',
73
- 'src'
74
- ];
69
+ const EXCLUDED_DIRS = ['test', 'tests', 'node_modules', '.git', 'src'];
75
70
 
76
71
  function findJsFiles(dir) {
77
72
  const results = [];
@@ -45,7 +45,7 @@ function findFiles(dir, extension) {
45
45
  const items = fs.readdirSync(dir);
46
46
 
47
47
  for (const item of items) {
48
- if (item === 'node_modules' || item === '.git') continue;
48
+ if (item === 'node_modules' || item === '.git' || item === 'test' || item === 'tests' || item === 'src') continue;
49
49
 
50
50
  const fullPath = path.join(dir, item);
51
51
  const stat = fs.statSync(fullPath);