secure-review-extension 1.0.9 → 1.0.10

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
@@ -2,7 +2,7 @@
2
2
  "name": "secure-review-extension",
3
3
  "displayName": "Secure Review",
4
4
  "description": "Run deep static and Docker-based dynamic secure code reviews directly inside VS Code.",
5
- "version": "1.0.9",
5
+ "version": "1.0.10",
6
6
  "publisher": "Ankit-QI",
7
7
  "icon": "media/shield.png",
8
8
  "license": "MIT",
@@ -152,7 +152,7 @@ async function scanFileAtPath(filePath, options = {}) {
152
152
  maxFiles: options.maxFiles || 400
153
153
  });
154
154
 
155
- if (!shouldAnalyzeFile(filePath)) {
155
+ if (!shouldAnalyzeSingleFile(filePath)) {
156
156
  return [];
157
157
  }
158
158
 
@@ -163,6 +163,16 @@ async function scanFileAtPath(filePath, options = {}) {
163
163
  }));
164
164
  }
165
165
 
166
+ function shouldAnalyzeSingleFile(filePath) {
167
+ const baseName = path.basename(filePath);
168
+ if (LOCKFILE_NAMES.has(baseName) || ENV_LIKE_NAMES.has(baseName)) {
169
+ return true;
170
+ }
171
+
172
+ const ext = path.extname(filePath).toLowerCase();
173
+ return ALLOWED_EXTENSIONS.has(ext);
174
+ }
175
+
166
176
  function scanProfile(workspaceProfile, config) {
167
177
  const findings = [];
168
178
  const notify = typeof config.get === "function"