socketsecurity 0.0.69__tar.gz → 0.0.70__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-0.0.69/socketsecurity.egg-info → socketsecurity-0.0.70}/PKG-INFO +1 -1
- {socketsecurity-0.0.69 → socketsecurity-0.0.70}/pyproject.toml +1 -1
- {socketsecurity-0.0.69 → socketsecurity-0.0.70}/socketsecurity/core/__init__.py +1 -1
- {socketsecurity-0.0.69 → socketsecurity-0.0.70}/socketsecurity/core/github.py +19 -11
- {socketsecurity-0.0.69 → socketsecurity-0.0.70}/socketsecurity/core/gitlab.py +19 -11
- {socketsecurity-0.0.69 → socketsecurity-0.0.70}/socketsecurity/socketcli.py +13 -1
- {socketsecurity-0.0.69 → socketsecurity-0.0.70/socketsecurity.egg-info}/PKG-INFO +1 -1
- {socketsecurity-0.0.69 → socketsecurity-0.0.70}/LICENSE +0 -0
- {socketsecurity-0.0.69 → socketsecurity-0.0.70}/README.md +0 -0
- {socketsecurity-0.0.69 → socketsecurity-0.0.70}/setup.cfg +0 -0
- {socketsecurity-0.0.69 → socketsecurity-0.0.70}/socketsecurity/__init__.py +0 -0
- {socketsecurity-0.0.69 → socketsecurity-0.0.70}/socketsecurity/core/classes.py +0 -0
- {socketsecurity-0.0.69 → socketsecurity-0.0.70}/socketsecurity/core/exceptions.py +0 -0
- {socketsecurity-0.0.69 → socketsecurity-0.0.70}/socketsecurity/core/issues.py +0 -0
- {socketsecurity-0.0.69 → socketsecurity-0.0.70}/socketsecurity/core/licenses.py +0 -0
- {socketsecurity-0.0.69 → socketsecurity-0.0.70}/socketsecurity/core/messages.py +0 -0
- {socketsecurity-0.0.69 → socketsecurity-0.0.70}/socketsecurity.egg-info/SOURCES.txt +0 -0
- {socketsecurity-0.0.69 → socketsecurity-0.0.70}/socketsecurity.egg-info/dependency_links.txt +0 -0
- {socketsecurity-0.0.69 → socketsecurity-0.0.70}/socketsecurity.egg-info/entry_points.txt +0 -0
- {socketsecurity-0.0.69 → socketsecurity-0.0.70}/socketsecurity.egg-info/requires.txt +0 -0
- {socketsecurity-0.0.69 → socketsecurity-0.0.70}/socketsecurity.egg-info/top_level.txt +0 -0
|
@@ -163,19 +163,27 @@ class Github:
|
|
|
163
163
|
return event_type
|
|
164
164
|
|
|
165
165
|
@staticmethod
|
|
166
|
-
def add_socket_comments(
|
|
166
|
+
def add_socket_comments(
|
|
167
|
+
security_comment: str,
|
|
168
|
+
overview_comment: str,
|
|
169
|
+
comments: dict,
|
|
170
|
+
new_security_comment: bool = True,
|
|
171
|
+
new_overview_comment: bool = True
|
|
172
|
+
) -> None:
|
|
167
173
|
existing_overview_comment = comments.get("overview")
|
|
168
174
|
existing_security_comment = comments.get("security")
|
|
169
|
-
if
|
|
170
|
-
existing_overview_comment:
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
175
|
+
if new_overview_comment:
|
|
176
|
+
if existing_overview_comment is not None:
|
|
177
|
+
existing_overview_comment: GithubComment
|
|
178
|
+
Github.update_comment(overview_comment, str(existing_overview_comment.id))
|
|
179
|
+
else:
|
|
180
|
+
Github.post_comment(overview_comment)
|
|
181
|
+
if new_security_comment:
|
|
182
|
+
if existing_security_comment is not None:
|
|
183
|
+
existing_security_comment: GithubComment
|
|
184
|
+
Github.update_comment(security_comment, str(existing_security_comment.id))
|
|
185
|
+
else:
|
|
186
|
+
Github.post_comment(security_comment)
|
|
179
187
|
|
|
180
188
|
@staticmethod
|
|
181
189
|
def post_comment(body: str) -> None:
|
|
@@ -159,19 +159,27 @@ class Gitlab:
|
|
|
159
159
|
return event_type
|
|
160
160
|
|
|
161
161
|
@staticmethod
|
|
162
|
-
def add_socket_comments(
|
|
162
|
+
def add_socket_comments(
|
|
163
|
+
security_comment: str,
|
|
164
|
+
overview_comment: str,
|
|
165
|
+
comments: dict,
|
|
166
|
+
new_security_comment: bool = True,
|
|
167
|
+
new_overview_comment: bool = True
|
|
168
|
+
) -> None:
|
|
163
169
|
existing_overview_comment = comments.get("overview")
|
|
164
170
|
existing_security_comment = comments.get("security")
|
|
165
|
-
if
|
|
166
|
-
existing_overview_comment:
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
171
|
+
if new_overview_comment:
|
|
172
|
+
if existing_overview_comment is not None:
|
|
173
|
+
existing_overview_comment: GitlabComment
|
|
174
|
+
Gitlab.update_comment(overview_comment, str(existing_overview_comment.id))
|
|
175
|
+
else:
|
|
176
|
+
Gitlab.post_comment(overview_comment)
|
|
177
|
+
if new_security_comment:
|
|
178
|
+
if existing_security_comment is not None:
|
|
179
|
+
existing_security_comment: GitlabComment
|
|
180
|
+
Gitlab.update_comment(security_comment, str(existing_security_comment.id))
|
|
181
|
+
else:
|
|
182
|
+
Gitlab.post_comment(security_comment)
|
|
175
183
|
|
|
176
184
|
@staticmethod
|
|
177
185
|
def post_comment(body: str) -> None:
|
|
@@ -166,7 +166,19 @@ def cli():
|
|
|
166
166
|
diff.new_alerts = scm.remove_alerts(comments, diff.new_alerts)
|
|
167
167
|
overview_comment = Messages.dependency_overview_template(diff)
|
|
168
168
|
security_comment = Messages.security_comment_template(diff)
|
|
169
|
-
|
|
169
|
+
new_security_comment = True
|
|
170
|
+
new_overview_comment = True
|
|
171
|
+
if len(diff.new_alerts) == 0:
|
|
172
|
+
new_security_comment = False
|
|
173
|
+
if len(diff.new_packages) == 0 and diff.removed_packages == 0:
|
|
174
|
+
new_overview_comment = False
|
|
175
|
+
scm.add_socket_comments(
|
|
176
|
+
security_comment,
|
|
177
|
+
overview_comment,
|
|
178
|
+
comments,
|
|
179
|
+
new_security_comment,
|
|
180
|
+
new_overview_comment
|
|
181
|
+
)
|
|
170
182
|
output_console_comments(diff)
|
|
171
183
|
else:
|
|
172
184
|
log.info("API Mode")
|
|
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-0.0.69 → socketsecurity-0.0.70}/socketsecurity.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|