socketsecurity 1.0.13__tar.gz → 1.0.14__tar.gz

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.
Files changed (23) hide show
  1. {socketsecurity-1.0.13/socketsecurity.egg-info → socketsecurity-1.0.14}/PKG-INFO +1 -1
  2. {socketsecurity-1.0.13 → socketsecurity-1.0.14}/socketsecurity/__init__.py +1 -1
  3. {socketsecurity-1.0.13 → socketsecurity-1.0.14}/socketsecurity/core/__init__.py +15 -6
  4. {socketsecurity-1.0.13 → socketsecurity-1.0.14}/socketsecurity/socketcli.py +5 -2
  5. {socketsecurity-1.0.13 → socketsecurity-1.0.14/socketsecurity.egg-info}/PKG-INFO +1 -1
  6. {socketsecurity-1.0.13 → socketsecurity-1.0.14}/LICENSE +0 -0
  7. {socketsecurity-1.0.13 → socketsecurity-1.0.14}/README.md +0 -0
  8. {socketsecurity-1.0.13 → socketsecurity-1.0.14}/pyproject.toml +0 -0
  9. {socketsecurity-1.0.13 → socketsecurity-1.0.14}/setup.cfg +0 -0
  10. {socketsecurity-1.0.13 → socketsecurity-1.0.14}/socketsecurity/core/classes.py +0 -0
  11. {socketsecurity-1.0.13 → socketsecurity-1.0.14}/socketsecurity/core/exceptions.py +0 -0
  12. {socketsecurity-1.0.13 → socketsecurity-1.0.14}/socketsecurity/core/git_interface.py +0 -0
  13. {socketsecurity-1.0.13 → socketsecurity-1.0.14}/socketsecurity/core/github.py +0 -0
  14. {socketsecurity-1.0.13 → socketsecurity-1.0.14}/socketsecurity/core/gitlab.py +0 -0
  15. {socketsecurity-1.0.13 → socketsecurity-1.0.14}/socketsecurity/core/issues.py +0 -0
  16. {socketsecurity-1.0.13 → socketsecurity-1.0.14}/socketsecurity/core/licenses.py +0 -0
  17. {socketsecurity-1.0.13 → socketsecurity-1.0.14}/socketsecurity/core/messages.py +0 -0
  18. {socketsecurity-1.0.13 → socketsecurity-1.0.14}/socketsecurity/core/scm_comments.py +0 -0
  19. {socketsecurity-1.0.13 → socketsecurity-1.0.14}/socketsecurity.egg-info/SOURCES.txt +0 -0
  20. {socketsecurity-1.0.13 → socketsecurity-1.0.14}/socketsecurity.egg-info/dependency_links.txt +0 -0
  21. {socketsecurity-1.0.13 → socketsecurity-1.0.14}/socketsecurity.egg-info/entry_points.txt +0 -0
  22. {socketsecurity-1.0.13 → socketsecurity-1.0.14}/socketsecurity.egg-info/requires.txt +0 -0
  23. {socketsecurity-1.0.13 → socketsecurity-1.0.14}/socketsecurity.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: socketsecurity
3
- Version: 1.0.13
3
+ Version: 1.0.14
4
4
  Summary: Socket Security CLI for CI/CD
5
5
  Author-email: Douglas Coburn <douglas@socket.dev>
6
6
  Maintainer-email: Douglas Coburn <douglas@socket.dev>
@@ -1,2 +1,2 @@
1
1
  __author__ = 'socket.dev'
2
- __version__ = '1.0.13'
2
+ __version__ = '1.0.14'
@@ -46,8 +46,8 @@ org_slug = None
46
46
  all_new_alerts = False
47
47
  security_policy = {}
48
48
  log = logging.getLogger("socketdev")
49
- log_format = "%(asctime)s %(funcName)20s() %(message)s"
50
- logging.basicConfig(format=log_format)
49
+ # log_format = "%(asctime)s %(funcName)20s() %(message)s"
50
+ # logging.basicConfig(format=log_format)
51
51
  log.addHandler(logging.NullHandler())
52
52
 
53
53
  socket_globs = {
@@ -398,7 +398,7 @@ class Core:
398
398
  :param files: override finding the manifest files using the glob matcher
399
399
  :return:
400
400
  """
401
- all_files = []
401
+ all_files = set()
402
402
  files_provided = False
403
403
  log.debug("Starting Find Files")
404
404
  start_time = time.time()
@@ -412,12 +412,17 @@ class Core:
412
412
 
413
413
  if not files_provided:
414
414
  log.debug(f"Globbing {file_path}")
415
+ glob_start = time.time()
415
416
  files = glob(file_path, recursive=True)
417
+ glob_end = time.time()
418
+ glob_total_time = glob_end - glob_start
419
+ log.debug(f"Glob for pattern {file_path} took {glob_total_time:.2f} seconds")
416
420
  else:
417
421
  log.debug("Files found from commit")
418
422
  files = Core.match_supported_files(path, files)
423
+ name_fix_start = time.time()
419
424
  for file in files:
420
- log.debug(f"Checking {file} for match")
425
+ # log.debug(f"Getting file and path for {file_path}")
421
426
  if platform.system() == "Windows":
422
427
  file = file.replace("\\", "/")
423
428
  if path not in file:
@@ -425,11 +430,15 @@ class Core:
425
430
  found_path, file_name = file.rsplit("/", 1)
426
431
  details = (found_path, file_name)
427
432
  if details not in all_files:
428
- all_files.append(details)
433
+ all_files.add(details)
434
+ name_fix_end = time.time()
435
+ total_name_fix = name_fix_end - name_fix_start
436
+ log.debug(f"Total Time for name fix for {file_path} was {total_name_fix:.6f}")
429
437
  log.debug("Finished Find Files")
430
438
  end_time = time.time()
431
439
  total_time = end_time - start_time
432
- log.info(f"Found {len(all_files)} in {total_time: 2f} seconds")
440
+ log.info(f"Found {len(all_files)} in {total_time:.2f} seconds")
441
+ all_files = list(all_files)
433
442
  return all_files
434
443
 
435
444
  @staticmethod
@@ -1,5 +1,7 @@
1
1
  import argparse
2
2
  import json
3
+
4
+ import socketsecurity.core
3
5
  from socketsecurity.core import Core, __version__
4
6
  from socketsecurity.core.classes import FullScanParams, Diff, Package, Issue
5
7
  from socketsecurity.core.messages import Messages
@@ -10,7 +12,9 @@ import os
10
12
  import sys
11
13
  import logging
12
14
 
13
- logging.basicConfig(level=logging.INFO)
15
+ log_format = "%(asctime)s: %(message)s"
16
+ logging.basicConfig(level=logging.INFO, format=log_format)
17
+ socketsecurity.core.log.setLevel(level=logging.INFO)
14
18
  log = logging.getLogger("socketcli")
15
19
  blocking_disabled = False
16
20
 
@@ -211,7 +215,6 @@ def main_code():
211
215
  arguments = parser.parse_args()
212
216
  debug = arguments.enable_debug
213
217
  if debug:
214
- log_format = "%(asctime)s %(funcName)20s() %(message)s"
215
218
  logging.basicConfig(level=logging.DEBUG, format=log_format)
216
219
  log.setLevel(logging.DEBUG)
217
220
  Core.enable_debug_log(logging.DEBUG)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: socketsecurity
3
- Version: 1.0.13
3
+ Version: 1.0.14
4
4
  Summary: Socket Security CLI for CI/CD
5
5
  Author-email: Douglas Coburn <douglas@socket.dev>
6
6
  Maintainer-email: Douglas Coburn <douglas@socket.dev>
File without changes