socketsecurity 1.0.25__tar.gz → 1.0.26__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.25/socketsecurity.egg-info → socketsecurity-1.0.26}/PKG-INFO +1 -1
- {socketsecurity-1.0.25 → socketsecurity-1.0.26}/socketsecurity/__init__.py +1 -1
- {socketsecurity-1.0.25 → socketsecurity-1.0.26}/socketsecurity/core/__init__.py +0 -1
- {socketsecurity-1.0.25 → socketsecurity-1.0.26}/socketsecurity/socketcli.py +24 -20
- {socketsecurity-1.0.25 → socketsecurity-1.0.26/socketsecurity.egg-info}/PKG-INFO +1 -1
- {socketsecurity-1.0.25 → socketsecurity-1.0.26}/LICENSE +0 -0
- {socketsecurity-1.0.25 → socketsecurity-1.0.26}/README.md +0 -0
- {socketsecurity-1.0.25 → socketsecurity-1.0.26}/pyproject.toml +0 -0
- {socketsecurity-1.0.25 → socketsecurity-1.0.26}/setup.cfg +0 -0
- {socketsecurity-1.0.25 → socketsecurity-1.0.26}/socketsecurity/core/classes.py +0 -0
- {socketsecurity-1.0.25 → socketsecurity-1.0.26}/socketsecurity/core/exceptions.py +0 -0
- {socketsecurity-1.0.25 → socketsecurity-1.0.26}/socketsecurity/core/git_interface.py +0 -0
- {socketsecurity-1.0.25 → socketsecurity-1.0.26}/socketsecurity/core/github.py +0 -0
- {socketsecurity-1.0.25 → socketsecurity-1.0.26}/socketsecurity/core/gitlab.py +0 -0
- {socketsecurity-1.0.25 → socketsecurity-1.0.26}/socketsecurity/core/issues.py +0 -0
- {socketsecurity-1.0.25 → socketsecurity-1.0.26}/socketsecurity/core/licenses.py +0 -0
- {socketsecurity-1.0.25 → socketsecurity-1.0.26}/socketsecurity/core/messages.py +0 -0
- {socketsecurity-1.0.25 → socketsecurity-1.0.26}/socketsecurity/core/scm_comments.py +0 -0
- {socketsecurity-1.0.25 → socketsecurity-1.0.26}/socketsecurity.egg-info/SOURCES.txt +0 -0
- {socketsecurity-1.0.25 → socketsecurity-1.0.26}/socketsecurity.egg-info/dependency_links.txt +0 -0
- {socketsecurity-1.0.25 → socketsecurity-1.0.26}/socketsecurity.egg-info/entry_points.txt +0 -0
- {socketsecurity-1.0.25 → socketsecurity-1.0.26}/socketsecurity.egg-info/requires.txt +0 -0
- {socketsecurity-1.0.25 → socketsecurity-1.0.26}/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.26'
|
|
@@ -410,7 +410,6 @@ class Core:
|
|
|
410
410
|
Globs the path for supported manifest files.
|
|
411
411
|
Note: Might move the source to a JSON file
|
|
412
412
|
:param path: Str - path to where the manifest files are located
|
|
413
|
-
:param files: override finding the manifest files using the glob matcher
|
|
414
413
|
:return:
|
|
415
414
|
"""
|
|
416
415
|
log.debug("Starting Find Files")
|
|
@@ -163,25 +163,27 @@ parser.add_argument(
|
|
|
163
163
|
|
|
164
164
|
|
|
165
165
|
def output_console_comments(diff_report: Diff, sbom_file_name: str = None) -> None:
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
166
|
+
if diff_report.id != "NO_DIFF_RAN":
|
|
167
|
+
console_security_comment = Messages.create_console_security_alert_table(diff_report)
|
|
168
|
+
save_sbom_file(diff_report, sbom_file_name)
|
|
169
|
+
log.info(f"Socket Full Scan ID: {diff_report.id}")
|
|
170
|
+
if not report_pass(diff_report):
|
|
171
|
+
log.info("Security issues detected by Socket Security")
|
|
172
|
+
msg = f"\n{console_security_comment}"
|
|
173
|
+
log.info(msg)
|
|
174
|
+
if not blocking_disabled:
|
|
175
|
+
sys.exit(1)
|
|
176
|
+
else:
|
|
177
|
+
log.info("No New Security issues detected by Socket Security")
|
|
177
178
|
|
|
178
179
|
|
|
179
180
|
def output_console_json(diff_report: Diff, sbom_file_name: str = None) -> None:
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
181
|
+
if diff_report.id != "NO_DIFF_RAN":
|
|
182
|
+
console_security_comment = Messages.create_security_comment_json(diff_report)
|
|
183
|
+
save_sbom_file(diff_report, sbom_file_name)
|
|
184
|
+
print(json.dumps(console_security_comment))
|
|
185
|
+
if not report_pass(diff_report) and not blocking_disabled:
|
|
186
|
+
sys.exit(1)
|
|
185
187
|
|
|
186
188
|
|
|
187
189
|
def report_pass(diff_report: Diff) -> bool:
|
|
@@ -299,7 +301,7 @@ def main_code():
|
|
|
299
301
|
default_branch = scm.is_default_branch
|
|
300
302
|
|
|
301
303
|
base_api_url = os.getenv("BASE_API_URL") or None
|
|
302
|
-
core = Core(token=api_token, request_timeout=1200, base_api_url=base_api_url)
|
|
304
|
+
core = Core(token=api_token, request_timeout=1200, base_api_url=base_api_url, allow_unverified=allow_unverified)
|
|
303
305
|
no_change = True
|
|
304
306
|
if ignore_commit_files:
|
|
305
307
|
no_change = False
|
|
@@ -319,7 +321,8 @@ def main_code():
|
|
|
319
321
|
make_default_branch=default_branch,
|
|
320
322
|
set_as_pending_head=set_as_pending_head
|
|
321
323
|
)
|
|
322
|
-
diff =
|
|
324
|
+
diff = Diff()
|
|
325
|
+
diff.id = "NO_DIFF_RAN"
|
|
323
326
|
if scm is not None and scm.check_event_type() == "comment":
|
|
324
327
|
log.info("Comment initiated flow")
|
|
325
328
|
log.debug(f"Getting comments for Repo {scm.repository} for PR {scm.pr_number}")
|
|
@@ -329,10 +332,11 @@ def main_code():
|
|
|
329
332
|
elif scm is not None and scm.check_event_type() != "comment":
|
|
330
333
|
log.info("Push initiated flow")
|
|
331
334
|
diff: Diff
|
|
332
|
-
diff = core.create_new_diff(target_path, params, workspace=target_path, no_change=no_change)
|
|
333
335
|
if no_change:
|
|
334
|
-
log.info("No
|
|
336
|
+
log.info("No manifest files changes, skipping scan")
|
|
337
|
+
# log.info("No dependency changes")
|
|
335
338
|
elif scm.check_event_type() == "diff":
|
|
339
|
+
diff = core.create_new_diff(target_path, params, workspace=target_path, no_change=no_change)
|
|
336
340
|
log.info("Starting comment logic for PR/MR event")
|
|
337
341
|
log.debug(f"Getting comments for Repo {scm.repository} for PR {scm.pr_number}")
|
|
338
342
|
comments = scm.get_comments_for_pr(repo, str(pr_number))
|
|
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
|
|
File without changes
|
{socketsecurity-1.0.25 → socketsecurity-1.0.26}/socketsecurity.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|