Skip to content

Commit c47a62d

Browse files
committed
Bumped minimum required SDK version with fix for no version in results
1 parent fb5c18d commit c47a62d

File tree

5 files changed

+16
-16
lines changed

5 files changed

+16
-16
lines changed

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ build-backend = "hatchling.build"
66

77
[project]
88
name = "socketsecurity"
9-
version = "2.2.45"
9+
version = "2.2.46"
1010
requires-python = ">= 3.10"
1111
license = {"file" = "LICENSE"}
1212
dependencies = [
@@ -16,7 +16,7 @@ dependencies = [
1616
'GitPython',
1717
'packaging',
1818
'python-dotenv',
19-
'socketdev>=3.0.21,<4.0.0',
19+
'socketdev>=3.0.22,<4.0.0',
2020
"bs4>=0.0.2",
2121
]
2222
readme = "README.md"

socketsecurity/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
__author__ = 'socket.dev'
2-
__version__ = '2.2.45'
2+
__version__ = '2.2.46'
33
USER_AGENT = f'SocketPythonCLI/{__version__}'

socketsecurity/config.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ class CliConfig:
7777
reach_concurrency: Optional[int] = None
7878
reach_additional_params: Optional[List[str]] = None
7979
only_facts_file: bool = False
80-
reach_only_use_pre_generated_sboms: bool = False
80+
reach_use_only_pregenerated_sboms: bool = False
8181

8282
@classmethod
8383
def from_args(cls, args_list: Optional[List[str]] = None) -> 'CliConfig':
@@ -140,7 +140,7 @@ def from_args(cls, args_list: Optional[List[str]] = None) -> 'CliConfig':
140140
'reach_concurrency': args.reach_concurrency,
141141
'reach_additional_params': args.reach_additional_params,
142142
'only_facts_file': args.only_facts_file,
143-
'reach_only_use_pre_generated_sboms': args.reach_only_use_pre_generated_sboms,
143+
'reach_use_only_pregenerated_sboms': args.reach_use_only_pregenerated_sboms,
144144
'version': __version__
145145
}
146146
try:
@@ -177,9 +177,9 @@ def from_args(cls, args_list: Optional[List[str]] = None) -> 'CliConfig':
177177
logging.error("--only-facts-file requires --reach to be specified")
178178
exit(1)
179179

180-
# Validate that reach_only_use_pre_generated_sboms requires reach
181-
if args.reach_only_use_pre_generated_sboms and not args.reach:
182-
logging.error("--reach-only-use-pre-generated-sboms requires --reach to be specified")
180+
# Validate that reach_use_only_pregenerated_sboms requires reach
181+
if args.reach_use_only_pregenerated_sboms and not args.reach:
182+
logging.error("--reach-use-only-pregenerated-sboms requires --reach to be specified")
183183
exit(1)
184184

185185
# Validate reach_concurrency is >= 1 if provided
@@ -610,8 +610,8 @@ def create_argument_parser() -> argparse.ArgumentParser:
610610
help="Submit only the .socket.facts.json file when creating full scan (requires --reach)"
611611
)
612612
reachability_group.add_argument(
613-
"--reach-only-use-pre-generated-sboms",
614-
dest="reach_only_use_pre_generated_sboms",
613+
"--reach-use-only-pregenerated-sboms",
614+
dest="reach_use_only_pregenerated_sboms",
615615
action="store_true",
616616
help="When using this option, the scan is created based only on pre-generated CDX and SPDX files in your project. (requires --reach)"
617617
)

socketsecurity/core/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ def find_sbom_files(self, path: str) -> List[str]:
351351
"""
352352
Finds only pre-generated SBOM files (CDX and SPDX) in the given path.
353353
354-
This is used with --reach-only-use-pre-generated-sboms to find only
354+
This is used with --reach-use-only-pregenerated-sboms to find only
355355
pre-computed CycloneDX and SPDX manifest files.
356356
357357
Args:

socketsecurity/socketcli.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ def main_code():
167167

168168
# Variable to track if we need to override files with facts file
169169
facts_file_to_submit = None
170-
# Variable to track SBOM files to submit when using --reach-only-use-pre-generated-sboms
170+
# Variable to track SBOM files to submit when using --reach-use-only-pregenerated-sboms
171171
sbom_files_to_submit = None
172172

173173
# Git setup
@@ -294,7 +294,7 @@ def main_code():
294294
additional_params=config.reach_additional_params,
295295
allow_unverified=config.allow_unverified,
296296
enable_debug=config.enable_debug,
297-
use_only_pregenerated_sboms=config.reach_only_use_pre_generated_sboms
297+
use_only_pregenerated_sboms=config.reach_use_only_pregenerated_sboms
298298
)
299299

300300
log.info(f"Reachability analysis completed successfully")
@@ -307,8 +307,8 @@ def main_code():
307307
facts_file_to_submit = os.path.abspath(output_path)
308308
log.info(f"Only-facts-file mode: will submit only {facts_file_to_submit}")
309309

310-
# If reach-only-use-pre-generated-sboms mode, submit CDX, SPDX, and facts file
311-
if config.reach_only_use_pre_generated_sboms:
310+
# If reach-use-only-pregenerated-sboms mode, submit CDX, SPDX, and facts file
311+
if config.reach_use_only_pregenerated_sboms:
312312
# Find only CDX and SPDX files for the final scan submission
313313
sbom_files_to_submit = []
314314
for scan_path in scan_paths:
@@ -347,7 +347,7 @@ def main_code():
347347
files_explicitly_specified = True
348348
log.debug(f"Overriding files to only submit facts file: {facts_file_to_submit}")
349349

350-
# Override files if reach-only-use-pre-generated-sboms mode is active
350+
# Override files if reach-use-only-pregenerated-sboms mode is active
351351
if sbom_files_to_submit:
352352
specified_files = sbom_files_to_submit
353353
files_explicitly_specified = True

0 commit comments

Comments
 (0)