Skip to content

Commit 3095944

Browse files
authored
Revert "Add guardrail in case manifest file does not exist (#93)" (#94)
This reverts commit c2183b5.
1 parent c2183b5 commit 3095944

File tree

7 files changed

+8
-153
lines changed

7 files changed

+8
-153
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
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.1.15"
9+
version = "2.1.14"
1010
requires-python = ">= 3.10"
1111
license = {"file" = "LICENSE"}
1212
dependencies = [

requirements-dev.txt

Lines changed: 0 additions & 73 deletions
This file was deleted.

requirements.txt

Lines changed: 0 additions & 71 deletions
This file was deleted.

socketsecurity/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
__author__ = 'socket.dev'
2-
__version__ = '2.1.15'
2+
__version__ = '2.1.14'

socketsecurity/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ class CliConfig:
4242
enable_sarif: bool = False
4343
disable_overview: bool = False
4444
disable_security_issue: bool = False
45-
files: str = None
45+
files: str = "[]"
4646
ignore_commit_files: bool = False
4747
disable_blocking: bool = False
4848
integration_type: IntegrationType = "api"

socketsecurity/core/__init__.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -860,10 +860,9 @@ def get_source_data(package: Package, packages: dict) -> list:
860860
manifests = ""
861861
if not hasattr(package, "manifestFiles"):
862862
return introduced_by
863-
if hasattr(package, "manifestFiles"):
864-
for manifest_data in package.manifestFiles:
865-
manifest_file = manifest_data.get("file")
866-
manifests += f"{manifest_file};"
863+
for manifest_data in package.manifestFiles:
864+
manifest_file = manifest_data.get("file")
865+
manifests += f"{manifest_file};"
867866
manifests = manifests.rstrip(";")
868867
source = ("direct", manifests)
869868
introduced_by.append(source)

socketsecurity/socketcli.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ def main_code():
130130
files_to_check = set(json.loads(config.files)) # Start with manually specified files
131131

132132
# Add git changes if this is a repo and we're not ignoring commit files
133-
if is_repo and not config.ignore_commit_files and not files_to_check:
133+
if is_repo and not config.ignore_commit_files:
134134
files_to_check.update(git_repo.changed_files)
135135

136136
# Determine if we need to scan based on manifest files
@@ -260,7 +260,7 @@ def main_code():
260260
output_handler.handle_output(diff)
261261

262262
# Handle license generation
263-
if should_skip_scan and diff.id != "no_diff_id" and config.generate_license:
263+
if diff is not None and diff.id != "no_diff_id" and config.generate_license:
264264
all_packages = {}
265265
for purl in diff.packages:
266266
package = diff.packages[purl]

0 commit comments

Comments
 (0)