socketsecurity 0.0.76__tar.gz → 0.0.77__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.
Files changed (21) hide show
  1. {socketsecurity-0.0.76/socketsecurity.egg-info → socketsecurity-0.0.77}/PKG-INFO +1 -1
  2. {socketsecurity-0.0.76 → socketsecurity-0.0.77}/pyproject.toml +1 -1
  3. {socketsecurity-0.0.76 → socketsecurity-0.0.77}/socketsecurity/core/__init__.py +1 -1
  4. {socketsecurity-0.0.76 → socketsecurity-0.0.77}/socketsecurity/core/github.py +16 -8
  5. {socketsecurity-0.0.76 → socketsecurity-0.0.77}/socketsecurity/core/messages.py +2 -1
  6. {socketsecurity-0.0.76 → socketsecurity-0.0.77/socketsecurity.egg-info}/PKG-INFO +1 -1
  7. {socketsecurity-0.0.76 → socketsecurity-0.0.77}/LICENSE +0 -0
  8. {socketsecurity-0.0.76 → socketsecurity-0.0.77}/README.md +0 -0
  9. {socketsecurity-0.0.76 → socketsecurity-0.0.77}/setup.cfg +0 -0
  10. {socketsecurity-0.0.76 → socketsecurity-0.0.77}/socketsecurity/__init__.py +0 -0
  11. {socketsecurity-0.0.76 → socketsecurity-0.0.77}/socketsecurity/core/classes.py +0 -0
  12. {socketsecurity-0.0.76 → socketsecurity-0.0.77}/socketsecurity/core/exceptions.py +0 -0
  13. {socketsecurity-0.0.76 → socketsecurity-0.0.77}/socketsecurity/core/gitlab.py +0 -0
  14. {socketsecurity-0.0.76 → socketsecurity-0.0.77}/socketsecurity/core/issues.py +0 -0
  15. {socketsecurity-0.0.76 → socketsecurity-0.0.77}/socketsecurity/core/licenses.py +0 -0
  16. {socketsecurity-0.0.76 → socketsecurity-0.0.77}/socketsecurity/socketcli.py +0 -0
  17. {socketsecurity-0.0.76 → socketsecurity-0.0.77}/socketsecurity.egg-info/SOURCES.txt +0 -0
  18. {socketsecurity-0.0.76 → socketsecurity-0.0.77}/socketsecurity.egg-info/dependency_links.txt +0 -0
  19. {socketsecurity-0.0.76 → socketsecurity-0.0.77}/socketsecurity.egg-info/entry_points.txt +0 -0
  20. {socketsecurity-0.0.76 → socketsecurity-0.0.77}/socketsecurity.egg-info/requires.txt +0 -0
  21. {socketsecurity-0.0.76 → socketsecurity-0.0.77}/socketsecurity.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: socketsecurity
3
- Version: 0.0.76
3
+ Version: 0.0.77
4
4
  Summary: Socket Security CLI for CI/CD
5
5
  Author-email: Douglas Coburn <douglas@socket.dev>
6
6
  Maintainer-email: Douglas Coburn <douglas@socket.dev>
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "socketsecurity"
7
- version = "0.0.76"
7
+ version = "0.0.77"
8
8
  requires-python = ">= 3.9"
9
9
  dependencies = [
10
10
  'requests',
@@ -25,7 +25,7 @@ import time
25
25
 
26
26
 
27
27
  __author__ = 'socket.dev'
28
- __version__ = '0.0.76'
28
+ __version__ = '0.0.77'
29
29
  __all__ = [
30
30
  "Core",
31
31
  "log",
@@ -280,15 +280,23 @@ class Github:
280
280
  ignore_all = True
281
281
  else:
282
282
  command = command.lstrip("ignore").strip()
283
- name, version = command.split("@")
284
- data = f"{name}, {version}"
283
+ name, version = command.rsplit("@", 1)
284
+ ecosystem, name = name.split("/", 1)
285
+ data = (ecosystem, name, version)
285
286
  ignore_commands.append(data)
286
287
  return ignore_all, ignore_commands
287
288
 
288
289
  @staticmethod
289
- def is_ignore(pkg_name: str, pkg_version: str, name: str, version: str) -> bool:
290
+ def is_ignore(
291
+ pkg_ecosystem: str,
292
+ pkg_name: str,
293
+ pkg_version: str,
294
+ ecosystem: str,
295
+ name: str,
296
+ version: str
297
+ ) -> bool:
290
298
  result = False
291
- if pkg_name == name and (pkg_version == version or version == "*"):
299
+ if pkg_ecosystem == ecosystem and pkg_name == name and (pkg_version == version or version == "*"):
292
300
  result = True
293
301
  return result
294
302
 
@@ -317,13 +325,13 @@ class Github:
317
325
  if "start-socket-alerts-table" in line:
318
326
  start = True
319
327
  elif start and "end-socket-alerts-table" not in line and not Github.is_heading_line(line) and line != '':
320
- title, package, introduced_by, manifest = line.lstrip("|").rstrip("|").split("|")
328
+ title, package, introduced_by, manifest = line.strip("|").split("|")
321
329
  details, _ = package.split("](")
322
- ecosystem, details = details.split("/", 1)
330
+ pkg_ecosystem, details = details.strip("[").split("/", 1)
323
331
  pkg_name, pkg_version = details.split("@")
324
332
  ignore = False
325
- for name, version in ignore_commands:
326
- if ignore_all or Github.is_ignore(pkg_name, pkg_version, name, version):
333
+ for ecosystem, name, version in ignore_commands:
334
+ if ignore_all or Github.is_ignore(pkg_ecosystem, pkg_name, pkg_version, ecosystem, name, version):
327
335
  ignore = True
328
336
  if not ignore:
329
337
  lines.append(line)
@@ -146,9 +146,10 @@ class Messages:
146
146
  if ignore not in ignore_commands:
147
147
  ignore_commands.append(ignore)
148
148
  manifest_str, sources = Messages.create_sources(alert, "console")
149
+ purl_url = f"[{alert.purl}]({alert.url})"
149
150
  row = [
150
151
  alert.title,
151
- alert.url,
152
+ purl_url,
152
153
  ", ".join(sources),
153
154
  manifest_str
154
155
  ]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: socketsecurity
3
- Version: 0.0.76
3
+ Version: 0.0.77
4
4
  Summary: Socket Security CLI for CI/CD
5
5
  Author-email: Douglas Coburn <douglas@socket.dev>
6
6
  Maintainer-email: Douglas Coburn <douglas@socket.dev>
File without changes