socketsecurity 0.0.57__tar.gz → 0.0.58__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 (20) hide show
  1. {socketsecurity-0.0.57 → socketsecurity-0.0.58}/PKG-INFO +1 -1
  2. {socketsecurity-0.0.57 → socketsecurity-0.0.58}/pyproject.toml +1 -1
  3. {socketsecurity-0.0.57 → socketsecurity-0.0.58}/socketsecurity/__init__.py +1 -1
  4. {socketsecurity-0.0.57 → socketsecurity-0.0.58}/socketsecurity/core/__init__.py +1 -1
  5. {socketsecurity-0.0.57 → socketsecurity-0.0.58}/socketsecurity/core/glitlab.py +3 -3
  6. {socketsecurity-0.0.57 → socketsecurity-0.0.58}/socketsecurity/socketcli.py +3 -8
  7. {socketsecurity-0.0.57 → socketsecurity-0.0.58}/socketsecurity.egg-info/PKG-INFO +1 -1
  8. {socketsecurity-0.0.57 → socketsecurity-0.0.58}/README.md +0 -0
  9. {socketsecurity-0.0.57 → socketsecurity-0.0.58}/setup.cfg +0 -0
  10. {socketsecurity-0.0.57 → socketsecurity-0.0.58}/socketsecurity/core/classes.py +0 -0
  11. {socketsecurity-0.0.57 → socketsecurity-0.0.58}/socketsecurity/core/exceptions.py +0 -0
  12. {socketsecurity-0.0.57 → socketsecurity-0.0.58}/socketsecurity/core/github.py +0 -0
  13. {socketsecurity-0.0.57 → socketsecurity-0.0.58}/socketsecurity/core/issues.py +0 -0
  14. {socketsecurity-0.0.57 → socketsecurity-0.0.58}/socketsecurity/core/licenses.py +0 -0
  15. {socketsecurity-0.0.57 → socketsecurity-0.0.58}/socketsecurity/core/messages.py +0 -0
  16. {socketsecurity-0.0.57 → socketsecurity-0.0.58}/socketsecurity.egg-info/SOURCES.txt +0 -0
  17. {socketsecurity-0.0.57 → socketsecurity-0.0.58}/socketsecurity.egg-info/dependency_links.txt +0 -0
  18. {socketsecurity-0.0.57 → socketsecurity-0.0.58}/socketsecurity.egg-info/entry_points.txt +0 -0
  19. {socketsecurity-0.0.57 → socketsecurity-0.0.58}/socketsecurity.egg-info/requires.txt +0 -0
  20. {socketsecurity-0.0.57 → socketsecurity-0.0.58}/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.57
3
+ Version: 0.0.58
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.57"
7
+ version = "0.0.58"
8
8
  requires-python = ">= 3.9"
9
9
  dependencies = [
10
10
  'requests',
@@ -1,2 +1,2 @@
1
1
  __author__ = 'socket.dev'
2
- __version__ = '0.0.57'
2
+ __version__ = '0.0.58'
@@ -23,7 +23,7 @@ import time
23
23
 
24
24
 
25
25
  __author__ = 'socket.dev'
26
- __version__ = '0.0.57'
26
+ __version__ = '0.0.58'
27
27
  __all__ = [
28
28
  "Core",
29
29
  "log",
@@ -10,7 +10,7 @@ import sys
10
10
  global ci_commit_sha
11
11
  global ci_api_v4_url
12
12
  global ci_project_dir
13
- global ci_commit_branch
13
+ global ci_merge_request_source_branch_name
14
14
  global ci_merge_request_iid
15
15
  global ci_merge_request_project_id
16
16
  global ci_commit_message
@@ -30,7 +30,7 @@ gitlab_variables = [
30
30
  "CI_COMMIT_SHA",
31
31
  "CI_API_V4_URL",
32
32
  "CI_PROJECT_DIR",
33
- "CI_COMMIT_BRANCH",
33
+ "CI_MERGE_REQUEST_SOURCE_BRANCH_NAME",
34
34
  "CI_MERGE_REQUEST_IID",
35
35
  "CI_MERGE_REQUEST_PROJECT_ID",
36
36
  "CI_COMMIT_MESSAGE",
@@ -128,7 +128,7 @@ class Gitlab:
128
128
  self.repository = ci_project_name
129
129
  if "/" in self.repository:
130
130
  self.repository = self.repository.rsplit("/")[1]
131
- self.branch = ci_commit_branch
131
+ self.branch = ci_merge_request_source_branch_name
132
132
  self.default_branch = ci_default_branch
133
133
  if self.branch == self.default_branch:
134
134
  self.is_default_branch = True
@@ -56,13 +56,7 @@ parser.add_argument(
56
56
  help='Path to look for manifest files',
57
57
  required=False
58
58
  )
59
- parser.add_argument(
60
- '--mode',
61
- default='diff',
62
- help='Integration mode choices are api, github, gitlab, and bitbucket',
63
- choices=["diff", "new", "license"],
64
- required=False
65
- )
59
+
66
60
  parser.add_argument(
67
61
  '--scm',
68
62
  default='api',
@@ -107,7 +101,6 @@ def cli():
107
101
  default_branch = False
108
102
  if default_branch_int == 1:
109
103
  default_branch = True
110
- mode = arguments.mode
111
104
  pr_number = arguments.pr_number
112
105
  target_path = arguments.target_path
113
106
  scm_type = arguments.scm
@@ -131,6 +124,8 @@ def cli():
131
124
  elif scm_type == 'gitlab':
132
125
  from socketsecurity.core.glitlab import Gitlab
133
126
  scm = Gitlab()
127
+ if scm is not None:
128
+ default_branch = scm.is_default_branch
134
129
  base_api_url = os.getenv("BASE_API_URL") or None
135
130
  core = Core(token=api_token, request_timeout=6000, base_api_url=base_api_url)
136
131
  set_as_pending_head = False
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: socketsecurity
3
- Version: 0.0.57
3
+ Version: 0.0.58
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>