Skip to content

Revert "Add guardrail in case manifest file does not exist" #94

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 30, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ build-backend = "hatchling.build"

[project]
name = "socketsecurity"
version = "2.1.15"
version = "2.1.14"
requires-python = ">= 3.10"
license = {"file" = "LICENSE"}
dependencies = [
Expand Down
73 changes: 0 additions & 73 deletions requirements-dev.txt

This file was deleted.

71 changes: 0 additions & 71 deletions requirements.txt

This file was deleted.

2 changes: 1 addition & 1 deletion socketsecurity/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
__author__ = 'socket.dev'
__version__ = '2.1.15'
__version__ = '2.1.14'
2 changes: 1 addition & 1 deletion socketsecurity/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class CliConfig:
enable_sarif: bool = False
disable_overview: bool = False
disable_security_issue: bool = False
files: str = None
files: str = "[]"
ignore_commit_files: bool = False
disable_blocking: bool = False
integration_type: IntegrationType = "api"
Expand Down
7 changes: 3 additions & 4 deletions socketsecurity/core/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -860,10 +860,9 @@ def get_source_data(package: Package, packages: dict) -> list:
manifests = ""
if not hasattr(package, "manifestFiles"):
return introduced_by
if hasattr(package, "manifestFiles"):
for manifest_data in package.manifestFiles:
manifest_file = manifest_data.get("file")
manifests += f"{manifest_file};"
for manifest_data in package.manifestFiles:
manifest_file = manifest_data.get("file")
manifests += f"{manifest_file};"
manifests = manifests.rstrip(";")
source = ("direct", manifests)
introduced_by.append(source)
Expand Down
4 changes: 2 additions & 2 deletions socketsecurity/socketcli.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ def main_code():
files_to_check = set(json.loads(config.files)) # Start with manually specified files

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

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

# Handle license generation
if should_skip_scan and diff.id != "no_diff_id" and config.generate_license:
if diff is not None and diff.id != "no_diff_id" and config.generate_license:
all_packages = {}
for purl in diff.packages:
package = diff.packages[purl]
Expand Down
Loading