scanoss 1.39.0__py3-none-any.whl → 1.40.0__py3-none-any.whl

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.
scanoss/__init__.py CHANGED
@@ -22,4 +22,4 @@ SPDX-License-Identifier: MIT
22
22
  THE SOFTWARE.
23
23
  """
24
24
 
25
- __version__ = '1.39.0'
25
+ __version__ = '1.40.0'
scanoss/cli.py CHANGED
@@ -796,7 +796,6 @@ def setup_args() -> None: # noqa: PLR0912, PLR0915
796
796
  help='Timeout (in seconds) for API communication (optional - default 300 sec)',
797
797
  )
798
798
 
799
-
800
799
  # ==============================================================================
801
800
  # GitLab Integration Parser
802
801
  # ==============================================================================
@@ -830,11 +829,7 @@ def setup_args() -> None: # noqa: PLR0912, PLR0915
830
829
 
831
830
  # Input file argument - SCANOSS scan results in JSON format
832
831
  p_gl_inspect_matches.add_argument(
833
- '-i',
834
- '--input',
835
- required=True,
836
- type=str,
837
- help='Path to SCANOSS scan results file (JSON format) to analyze'
832
+ '-i', '--input', required=True, type=str, help='Path to SCANOSS scan results file (JSON format) to analyze'
838
833
  )
839
834
 
840
835
  # Line range prefix for GitLab file navigation
@@ -844,7 +839,7 @@ def setup_args() -> None: # noqa: PLR0912, PLR0915
844
839
  '--line-range-prefix',
845
840
  required=True,
846
841
  type=str,
847
- help='Base URL prefix for GitLab file links with line ranges (e.g., https://gitlab.com/org/project/-/blob/main)'
842
+ help='Base URL prefix for GitLab file links with line ranges (e.g., https://gitlab.com/org/project/-/blob/main)',
848
843
  )
849
844
 
850
845
  # Output file argument - where to save the generated Markdown report
@@ -853,7 +848,7 @@ def setup_args() -> None: # noqa: PLR0912, PLR0915
853
848
  '-o',
854
849
  required=False,
855
850
  type=str,
856
- help='Output file path for the generated Markdown report (default: stdout)'
851
+ help='Output file path for the generated Markdown report (default: stdout)',
857
852
  )
858
853
 
859
854
  # TODO Move to the command call def location
@@ -1189,6 +1184,7 @@ def setup_args() -> None: # noqa: PLR0912, PLR0915
1189
1184
  c_search,
1190
1185
  c_versions,
1191
1186
  c_licenses,
1187
+ p_folder_scan,
1192
1188
  ]:
1193
1189
  p.add_argument('--grpc', action='store_true', default=True, help='Use gRPC (default)')
1194
1190
  p.add_argument('--rest', action='store_true', dest='rest', help='Use REST instead of gRPC')
@@ -1975,7 +1971,7 @@ def inspect_dep_track_project_violations(parser, args):
1975
1971
  sys.exit(1)
1976
1972
 
1977
1973
 
1978
- def inspect_gitlab_matches(parser,args):
1974
+ def inspect_gitlab_matches(parser, args):
1979
1975
  """
1980
1976
  Handle GitLab matches the summary inspection command.
1981
1977
 
@@ -2038,6 +2034,7 @@ def inspect_gitlab_matches(parser,args):
2038
2034
  traceback.print_exc()
2039
2035
  sys.exit(1)
2040
2036
 
2037
+
2041
2038
  # =============================================================================
2042
2039
  # END INSPECT COMMAND HANDLERS
2043
2040
  # =============================================================================
@@ -2673,6 +2670,7 @@ def folder_hashing_scan(parser, args):
2673
2670
  depth=args.depth,
2674
2671
  recursive_threshold=args.recursive_threshold,
2675
2672
  min_accepted_score=args.min_accepted_score,
2673
+ use_grpc=args.grpc,
2676
2674
  )
2677
2675
 
2678
2676
  if scanner.scan():
@@ -1 +1 @@
1
- date: 20251027150435, utime: 1761577475
1
+ date: 20251029142146, utime: 1761747706
@@ -63,6 +63,7 @@ class ScannerHFH:
63
63
  depth: int = DEFAULT_HFH_DEPTH,
64
64
  recursive_threshold: float = DEFAULT_HFH_RECURSIVE_THRESHOLD,
65
65
  min_accepted_score: float = DEFAULT_HFH_MIN_ACCEPTED_SCORE,
66
+ use_grpc: bool = False,
66
67
  ):
67
68
  """
68
69
  Initialize the ScannerHFH.
@@ -107,6 +108,7 @@ class ScannerHFH:
107
108
  self.rank_threshold = rank_threshold
108
109
  self.recursive_threshold = recursive_threshold
109
110
  self.min_accepted_score = min_accepted_score
111
+ self.use_grpc = use_grpc
110
112
 
111
113
  def scan(self) -> Optional[Dict]:
112
114
  """
@@ -134,7 +136,7 @@ class ScannerHFH:
134
136
  spinner_thread.start()
135
137
 
136
138
  try:
137
- response = self.client.folder_hash_scan(hfh_request)
139
+ response = self.client.folder_hash_scan(hfh_request, self.use_grpc)
138
140
  if response:
139
141
  self.scan_results = response
140
142
  finally:
scanoss/scanossgrpc.py CHANGED
@@ -426,21 +426,24 @@ class ScanossGrpc(ScanossBase):
426
426
  use_grpc=use_grpc,
427
427
  )
428
428
 
429
- def folder_hash_scan(self, request: Dict) -> Optional[Dict]:
429
+ def folder_hash_scan(self, request: Dict, use_grpc: Optional[bool] = None) -> Optional[Dict]:
430
430
  """
431
431
  Client function to call the rpc for Folder Hashing Scan
432
432
 
433
433
  Args:
434
434
  request (Dict): Folder Hash Request
435
+ use_grpc (Optional[bool]): Whether to use gRPC or REST API
435
436
 
436
437
  Returns:
437
438
  Optional[Dict]: Folder Hash Response, or None if the request was not succesfull
438
439
  """
439
- return self._call_rpc(
440
+ return self._call_api(
441
+ 'scanning.FolderHashScan',
440
442
  self.scanning_stub.FolderHashScan,
441
443
  request,
442
444
  HFHRequest,
443
445
  'Sending folder hash scan data (rqId: {rqId})...',
446
+ use_grpc=use_grpc,
444
447
  )
445
448
 
446
449
  def _call_api(
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: scanoss
3
- Version: 1.39.0
3
+ Version: 1.40.0
4
4
  Summary: Simple Python library to leverage the SCANOSS APIs
5
5
  Home-page: https://scanoss.com
6
6
  Author: SCANOSS
@@ -6,8 +6,8 @@ protoc_gen_swagger/options/annotations_pb2_grpc.py,sha256=KZOW9Ciio-f9iL42FuLFnS
6
6
  protoc_gen_swagger/options/openapiv2_pb2.py,sha256=w0xDs63uyrWGgzRaQZXfJpfI7Jpyvh-i9ay_uzOR-aM,16475
7
7
  protoc_gen_swagger/options/openapiv2_pb2.pyi,sha256=hYOV6uQ2yqhP89042_V3GuAsvoBBiXf5CGuYmnFnfv4,54665
8
8
  protoc_gen_swagger/options/openapiv2_pb2_grpc.py,sha256=sje9Nh3yE7CHCUWZwtjTgwsKB4GvyGz5vOrGTnRXJfc,917
9
- scanoss/__init__.py,sha256=q6qrK1ovnkPF_j1UjeGsMzCShu2ZJ4lwVjxJWcnkEro,1146
10
- scanoss/cli.py,sha256=u8t-F5TubEY7XnMtOdpQyf8hHQTWgJV6NLSAbO70KZY,103272
9
+ scanoss/__init__.py,sha256=6IaHKZDhDx8hxXCPX8B5ueipZk0jEM6bGl8Vn_6-az8,1146
10
+ scanoss/cli.py,sha256=fw0iCF4CuIEwy8BIyBlgxFBlVESV30kYGy1uS74sP0E,103298
11
11
  scanoss/components.py,sha256=NFyt_w3aoMotr_ZaFU-ng00_89sruc0kgY7ERnJXkmM,15891
12
12
  scanoss/constants.py,sha256=GHLTaLNVxXdTXRj7ngRK4u4S653pHzM8qFy4JFLa0wQ,450
13
13
  scanoss/cryptography.py,sha256=lOoD_dW16ARQxYiYyb5R8S7gx0FqWIsnGkKfsB0nGaU,10627
@@ -23,7 +23,7 @@ scanoss/scanner.py,sha256=-RCxLX0EepUebK8jQKvlMxFEQrCc8SwEjxznoWjadkg,45510
23
23
  scanoss/scanoss_settings.py,sha256=W8uFQ6uRIqtE-DXXA56bO8I4GsbJ-aA1c84hQ_qBel4,12161
24
24
  scanoss/scanossapi.py,sha256=U3IytJXA0mQHYsylzjwCuFakuhD_dJhstY37NmyvtB8,13243
25
25
  scanoss/scanossbase.py,sha256=Dkpwxa8NH8XN1iRl03NM_Mkvby0JQ4qfvCiiUrJ5ul0,3163
26
- scanoss/scanossgrpc.py,sha256=6s5TH2i3XB4xaXylmxFu7chlVlYjCZE_DpvRkiiaoHk,41541
26
+ scanoss/scanossgrpc.py,sha256=9UuVPUjBLUhqim_tSntyoRZW-OAtiz5iP_VjjNr5RPY,41715
27
27
  scanoss/scanpostprocessor.py,sha256=-JsThlxrU70r92GHykTMERnicdd-6jmwNsE4PH0MN2o,11063
28
28
  scanoss/scantype.py,sha256=gFmyVmKQpHWogN2iCmMj032e_sZo4T92xS3_EH5B3Tc,1310
29
29
  scanoss/spdxlite.py,sha256=4JMxmyNmvcL6fjScihk8toWfSuQ-Pj1gzaT3SIn1fXA,29425
@@ -65,7 +65,7 @@ scanoss/api/vulnerabilities/__init__.py,sha256=IFrDk_DTJgKSZmmU-nuLXuq_s8sQZlrSC
65
65
  scanoss/api/vulnerabilities/v2/__init__.py,sha256=IFrDk_DTJgKSZmmU-nuLXuq_s8sQZlrSCHhIDMJT4r0,1122
66
66
  scanoss/api/vulnerabilities/v2/scanoss_vulnerabilities_pb2.py,sha256=pmm0MSiXkdf8e4rCIIDRcsNRixR2vGvD1Xak4l-wdwI,16550
67
67
  scanoss/api/vulnerabilities/v2/scanoss_vulnerabilities_pb2_grpc.py,sha256=BNxT5kUKQ-mgtOt5QYBM1Qrg5LNDqSpWKpfEZquIlsM,19127
68
- scanoss/data/build_date.txt,sha256=E98VubnEloGNCDN8aqw3fIG_fDuiNX2rH1wNr9RiqVk,40
68
+ scanoss/data/build_date.txt,sha256=EsAP44xbRYCL6Rg23-wKXjV_HwKJKnffQXg6uFnmiCY,40
69
69
  scanoss/data/scanoss-settings-schema.json,sha256=ClkRYAkjAN0Sk704G8BE_Ok006oQ6YnIGmX84CF8h9w,8798
70
70
  scanoss/data/spdx-exceptions.json,sha256=s7UTYxC7jqQXr11YBlIWYCNwN6lRDFTR33Y8rpN_dA4,17953
71
71
  scanoss/data/spdx-licenses.json,sha256=A6Z0q82gaTLtnopBfzeIVZjJFxkdRW1g2TuumQc-lII,228794
@@ -88,7 +88,7 @@ scanoss/scanners/__init__.py,sha256=D4C0lWLuNp8k_BjQZEc07WZcUgAvriVwQWOk063b0ZU,
88
88
  scanoss/scanners/container_scanner.py,sha256=fOrb64owrstX7LnTuxiIan059YgLeKXeBS6g2QaCyq0,16346
89
89
  scanoss/scanners/folder_hasher.py,sha256=PD1tghOrra3KtfsZJUbqKOmIBF-0Tg14FcBCKkqGUis,12873
90
90
  scanoss/scanners/scanner_config.py,sha256=egG7cw3S2akU-D9M1aLE5jLrfz_c8e7_DIotMnnpM84,2601
91
- scanoss/scanners/scanner_hfh.py,sha256=M2PB4wDTi4LD1DwuAVfWiqQkjOImSpNok7vgo5H_Spg,9190
91
+ scanoss/scanners/scanner_hfh.py,sha256=xrWxRB0SOq5FJbil3lXnBk6z_on7jxr2itPBj2kb0RA,9270
92
92
  scanoss/services/dependency_track_service.py,sha256=JIpqev4I-x_ZajMxD5W2Y3OAUvEJ_4nstzAPV90vfP8,5070
93
93
  scanoss/utils/__init__.py,sha256=0hjb5ktavp7utJzFhGMPImPaZiHWgilM2HwvTp5lXJE,1122
94
94
  scanoss/utils/abstract_presenter.py,sha256=teiDTxBj5jBMCk2T8i4l1BJPf_u4zBLWrtCTFHSSECM,3148
@@ -96,9 +96,9 @@ scanoss/utils/crc64.py,sha256=TMrwQimSdE6imhFOUL7oAG6Kxu-8qMpGWMuMg8QpSVs,3169
96
96
  scanoss/utils/file.py,sha256=62cA9a17TU9ZvfA3FY5HY4-QOajJeSrc8S6xLA_f-3M,2980
97
97
  scanoss/utils/scanoss_scan_results_utils.py,sha256=ho9-DKefHFJlVZkw4gXOmMI-mgPIbV9Y2ftkI83fC1k,1727
98
98
  scanoss/utils/simhash.py,sha256=6iu8DOcecPAY36SZjCOzrrLMT9oIE7-gI6QuYwUQ7B0,5793
99
- scanoss-1.39.0.dist-info/licenses/LICENSE,sha256=LLUaXoiyOroIbr5ubAyrxBOwSRLTm35ETO2FmLpy8QQ,1074
100
- scanoss-1.39.0.dist-info/METADATA,sha256=SfWyYWos1ELzQhh1fOPEPCrv2ZzlyEIRUrQ-k26Qg1k,6181
101
- scanoss-1.39.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
102
- scanoss-1.39.0.dist-info/entry_points.txt,sha256=Uy28xnaDL5KQ7V77sZD5VLDXPNxYYzSr5tsqtiXVzAs,48
103
- scanoss-1.39.0.dist-info/top_level.txt,sha256=V11PrQ6Pnrc-nDF9xnisnJ8e6-i7HqSIKVNqduRWcL8,27
104
- scanoss-1.39.0.dist-info/RECORD,,
99
+ scanoss-1.40.0.dist-info/licenses/LICENSE,sha256=LLUaXoiyOroIbr5ubAyrxBOwSRLTm35ETO2FmLpy8QQ,1074
100
+ scanoss-1.40.0.dist-info/METADATA,sha256=ZX_JjQXpdybrkeUWvaqxN8UhZyVs3-zlByU3UWkcRAU,6181
101
+ scanoss-1.40.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
102
+ scanoss-1.40.0.dist-info/entry_points.txt,sha256=Uy28xnaDL5KQ7V77sZD5VLDXPNxYYzSr5tsqtiXVzAs,48
103
+ scanoss-1.40.0.dist-info/top_level.txt,sha256=V11PrQ6Pnrc-nDF9xnisnJ8e6-i7HqSIKVNqduRWcL8,27
104
+ scanoss-1.40.0.dist-info/RECORD,,