socketsecurity 1.0.29__tar.gz → 1.0.31__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.
- {socketsecurity-1.0.29/socketsecurity.egg-info → socketsecurity-1.0.31}/PKG-INFO +1 -1
- {socketsecurity-1.0.29 → socketsecurity-1.0.31}/socketsecurity/__init__.py +1 -1
- {socketsecurity-1.0.29 → socketsecurity-1.0.31}/socketsecurity/core/__init__.py +5 -4
- {socketsecurity-1.0.29 → socketsecurity-1.0.31}/socketsecurity/core/classes.py +7 -2
- {socketsecurity-1.0.29 → socketsecurity-1.0.31}/socketsecurity/socketcli.py +12 -3
- {socketsecurity-1.0.29 → socketsecurity-1.0.31/socketsecurity.egg-info}/PKG-INFO +1 -1
- {socketsecurity-1.0.29 → socketsecurity-1.0.31}/LICENSE +0 -0
- {socketsecurity-1.0.29 → socketsecurity-1.0.31}/README.md +0 -0
- {socketsecurity-1.0.29 → socketsecurity-1.0.31}/pyproject.toml +0 -0
- {socketsecurity-1.0.29 → socketsecurity-1.0.31}/setup.cfg +0 -0
- {socketsecurity-1.0.29 → socketsecurity-1.0.31}/socketsecurity/core/exceptions.py +0 -0
- {socketsecurity-1.0.29 → socketsecurity-1.0.31}/socketsecurity/core/git_interface.py +0 -0
- {socketsecurity-1.0.29 → socketsecurity-1.0.31}/socketsecurity/core/github.py +0 -0
- {socketsecurity-1.0.29 → socketsecurity-1.0.31}/socketsecurity/core/gitlab.py +0 -0
- {socketsecurity-1.0.29 → socketsecurity-1.0.31}/socketsecurity/core/issues.py +0 -0
- {socketsecurity-1.0.29 → socketsecurity-1.0.31}/socketsecurity/core/licenses.py +0 -0
- {socketsecurity-1.0.29 → socketsecurity-1.0.31}/socketsecurity/core/messages.py +0 -0
- {socketsecurity-1.0.29 → socketsecurity-1.0.31}/socketsecurity/core/scm_comments.py +0 -0
- {socketsecurity-1.0.29 → socketsecurity-1.0.31}/socketsecurity.egg-info/SOURCES.txt +0 -0
- {socketsecurity-1.0.29 → socketsecurity-1.0.31}/socketsecurity.egg-info/dependency_links.txt +0 -0
- {socketsecurity-1.0.29 → socketsecurity-1.0.31}/socketsecurity.egg-info/entry_points.txt +0 -0
- {socketsecurity-1.0.29 → socketsecurity-1.0.31}/socketsecurity.egg-info/requires.txt +0 -0
- {socketsecurity-1.0.29 → socketsecurity-1.0.31}/socketsecurity.egg-info/top_level.txt +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
__author__ = 'socket.dev'
|
|
2
|
-
__version__ = '1.0.
|
|
2
|
+
__version__ = '1.0.31'
|
|
@@ -749,10 +749,11 @@ class Core:
|
|
|
749
749
|
if alert.type in security_policy:
|
|
750
750
|
action = security_policy[alert.type]['action']
|
|
751
751
|
setattr(issue_alert, action, True)
|
|
752
|
-
if issue_alert.
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
752
|
+
if issue_alert.type != 'licenseSpdxDisj':
|
|
753
|
+
if issue_alert.key not in alerts:
|
|
754
|
+
alerts[issue_alert.key] = [issue_alert]
|
|
755
|
+
else:
|
|
756
|
+
alerts[issue_alert.key].append(issue_alert)
|
|
756
757
|
return alerts
|
|
757
758
|
|
|
758
759
|
@staticmethod
|
|
@@ -161,10 +161,15 @@ class Issue:
|
|
|
161
161
|
|
|
162
162
|
if hasattr(self, "created_at"):
|
|
163
163
|
self.created_at = self.created_at.strip(" (Coordinated Universal Time)")
|
|
164
|
-
if not hasattr(self, "introduced_by"):
|
|
165
|
-
self.introduced_by = []
|
|
166
164
|
if not hasattr(self, "manifests"):
|
|
167
165
|
self.manifests = ""
|
|
166
|
+
if not hasattr(self, "introduced_by"):
|
|
167
|
+
self.introduced_by = []
|
|
168
|
+
else:
|
|
169
|
+
for item in self.introduced_by:
|
|
170
|
+
pkg, manifest = item
|
|
171
|
+
self.manifests += f"{manifest};"
|
|
172
|
+
self.manifests = self.manifests.rstrip(";")
|
|
168
173
|
if not hasattr(self, "error"):
|
|
169
174
|
self.error = False
|
|
170
175
|
if not hasattr(self, "warn"):
|
|
@@ -167,12 +167,16 @@ def output_console_comments(diff_report: Diff, sbom_file_name: str = None) -> No
|
|
|
167
167
|
console_security_comment = Messages.create_console_security_alert_table(diff_report)
|
|
168
168
|
save_sbom_file(diff_report, sbom_file_name)
|
|
169
169
|
log.info(f"Socket Full Scan ID: {diff_report.id}")
|
|
170
|
-
if
|
|
170
|
+
if len(diff_report.new_alerts) > 0:
|
|
171
171
|
log.info("Security issues detected by Socket Security")
|
|
172
172
|
msg = f"\n{console_security_comment}"
|
|
173
173
|
log.info(msg)
|
|
174
|
-
if not blocking_disabled:
|
|
174
|
+
if not report_pass(diff_report) and not blocking_disabled:
|
|
175
175
|
sys.exit(1)
|
|
176
|
+
else:
|
|
177
|
+
# Means only warning alerts with no blocked
|
|
178
|
+
if not blocking_disabled:
|
|
179
|
+
sys.exit(5)
|
|
176
180
|
else:
|
|
177
181
|
log.info("No New Security issues detected by Socket Security")
|
|
178
182
|
|
|
@@ -184,6 +188,9 @@ def output_console_json(diff_report: Diff, sbom_file_name: str = None) -> None:
|
|
|
184
188
|
print(json.dumps(console_security_comment))
|
|
185
189
|
if not report_pass(diff_report) and not blocking_disabled:
|
|
186
190
|
sys.exit(1)
|
|
191
|
+
elif len(diff_report.new_alerts) > 0 and not blocking_disabled:
|
|
192
|
+
# Means only warning alerts with no blocked
|
|
193
|
+
sys.exit(5)
|
|
187
194
|
|
|
188
195
|
|
|
189
196
|
def report_pass(diff_report: Diff) -> bool:
|
|
@@ -306,6 +313,7 @@ def main_code():
|
|
|
306
313
|
if ignore_commit_files:
|
|
307
314
|
no_change = False
|
|
308
315
|
elif is_repo and files is not None and len(files) > 0:
|
|
316
|
+
log.info(files)
|
|
309
317
|
no_change = core.match_supported_files(files)
|
|
310
318
|
|
|
311
319
|
set_as_pending_head = False
|
|
@@ -379,7 +387,8 @@ def main_code():
|
|
|
379
387
|
new_overview_comment
|
|
380
388
|
)
|
|
381
389
|
else:
|
|
382
|
-
log.info("
|
|
390
|
+
log.info("Starting non-PR/MR flow")
|
|
391
|
+
diff = core.create_new_diff(target_path, params, workspace=target_path, no_change=no_change)
|
|
383
392
|
if enable_json:
|
|
384
393
|
log.debug("Outputting JSON Results")
|
|
385
394
|
output_console_json(diff, sbom_file)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{socketsecurity-1.0.29 → socketsecurity-1.0.31}/socketsecurity.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|