larxius commited on
Commit
20bc690
·
verified ·
1 Parent(s): f98dac6

Update backend/scanners/js_supply_chain_scanner.py

Browse files
backend/scanners/js_supply_chain_scanner.py CHANGED
@@ -355,7 +355,7 @@ class JsSupplyChainScanner(BaseScanner):
355
  scope = dep.split("/")[0]
356
  if scope not in ["@types", "@babel", "@angular", "@vue", "@sveltejs"]:
357
  npm_info = _check_npm_registry(dep)
358
- time.sleep(0.3) # be polite to npm registry
359
  if npm_info["exists"] is False:
360
  # Package doesn't exist on public npm — potential confusion attack vector
361
  key2 = f"depcnf:{dep}"
 
355
  scope = dep.split("/")[0]
356
  if scope not in ["@types", "@babel", "@angular", "@vue", "@sveltejs"]:
357
  npm_info = _check_npm_registry(dep)
358
+ # No sleep npm registry network latency is sufficient throttling
359
  if npm_info["exists"] is False:
360
  # Package doesn't exist on public npm — potential confusion attack vector
361
  key2 = f"depcnf:{dep}"