socketsecurity 0.0.47__tar.gz → 1.0.39__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 (29) hide show
  1. socketsecurity-1.0.39/LICENSE +21 -0
  2. socketsecurity-1.0.39/PKG-INFO +63 -0
  3. socketsecurity-1.0.39/README.md +40 -0
  4. socketsecurity-1.0.39/pyproject.toml +48 -0
  5. {socketsecurity-0.0.47 → socketsecurity-1.0.39}/socketsecurity/__init__.py +1 -1
  6. {socketsecurity-0.0.47 → socketsecurity-1.0.39}/socketsecurity/core/__init__.py +336 -159
  7. {socketsecurity-0.0.47 → socketsecurity-1.0.39}/socketsecurity/core/classes.py +92 -8
  8. {socketsecurity-0.0.47 → socketsecurity-1.0.39}/socketsecurity/core/exceptions.py +8 -1
  9. socketsecurity-1.0.39/socketsecurity/core/git_interface.py +32 -0
  10. socketsecurity-1.0.39/socketsecurity/core/github.py +247 -0
  11. socketsecurity-1.0.39/socketsecurity/core/gitlab.py +179 -0
  12. {socketsecurity-0.0.47 → socketsecurity-1.0.39}/socketsecurity/core/issues.py +26 -4
  13. {socketsecurity-0.0.47 → socketsecurity-1.0.39}/socketsecurity/core/messages.py +93 -61
  14. socketsecurity-1.0.39/socketsecurity/core/scm_comments.py +128 -0
  15. socketsecurity-1.0.39/socketsecurity/socketcli.py +425 -0
  16. socketsecurity-1.0.39/socketsecurity.egg-info/PKG-INFO +63 -0
  17. {socketsecurity-0.0.47 → socketsecurity-1.0.39}/socketsecurity.egg-info/SOURCES.txt +7 -3
  18. {socketsecurity-0.0.47 → socketsecurity-1.0.39}/socketsecurity.egg-info/requires.txt +2 -1
  19. socketsecurity-0.0.47/PKG-INFO +0 -7
  20. socketsecurity-0.0.47/setup.py +0 -17
  21. socketsecurity-0.0.47/socketsecurity/core/github.py +0 -327
  22. socketsecurity-0.0.47/socketsecurity/core/glitlab.py +0 -327
  23. socketsecurity-0.0.47/socketsecurity/socketcli.py +0 -180
  24. socketsecurity-0.0.47/socketsecurity.egg-info/PKG-INFO +0 -7
  25. {socketsecurity-0.0.47 → socketsecurity-1.0.39}/setup.cfg +0 -0
  26. {socketsecurity-0.0.47 → socketsecurity-1.0.39}/socketsecurity/core/licenses.py +0 -0
  27. {socketsecurity-0.0.47 → socketsecurity-1.0.39}/socketsecurity.egg-info/dependency_links.txt +0 -0
  28. {socketsecurity-0.0.47 → socketsecurity-1.0.39}/socketsecurity.egg-info/entry_points.txt +0 -0
  29. {socketsecurity-0.0.47 → socketsecurity-1.0.39}/socketsecurity.egg-info/top_level.txt +0 -0
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2022 Socket Inc
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,63 @@
1
+ Metadata-Version: 2.2
2
+ Name: socketsecurity
3
+ Version: 1.0.39
4
+ Summary: Socket Security CLI for CI/CD
5
+ Author-email: Douglas Coburn <douglas@socket.dev>
6
+ Maintainer-email: Douglas Coburn <douglas@socket.dev>
7
+ Project-URL: Homepage, https://socket.dev
8
+ Keywords: socketsecurity,socket.dev,sca,oss,security
9
+ Classifier: Development Status :: 4 - Beta
10
+ Classifier: Intended Audience :: Developers
11
+ Classifier: Programming Language :: Python :: 3.9
12
+ Classifier: Programming Language :: Python :: 3.10
13
+ Classifier: Programming Language :: Python :: 3.11
14
+ Classifier: Programming Language :: Python :: 3.12
15
+ Requires-Python: >=3.9
16
+ Description-Content-Type: text/markdown
17
+ License-File: LICENSE
18
+ Requires-Dist: requests
19
+ Requires-Dist: mdutils
20
+ Requires-Dist: prettytable
21
+ Requires-Dist: GitPython
22
+ Requires-Dist: packaging
23
+
24
+ # Socket Security CLI
25
+
26
+ The Socket Security CLI was created to enable integrations with other tools like Github Actions, Gitlab, BitBucket, local use cases and more. The tool will get the head scan for the provided repo from Socket, create a new one, and then report any new alerts detected. If there are new alerts against the Socket security policy it'll exit with a non-Zero exit code.
27
+
28
+ ## Usage
29
+
30
+ ```` shell
31
+ socketcli [-h] [--api_token API_TOKEN] [--repo REPO] [--branch BRANCH] [--committer COMMITTER] [--pr_number PR_NUMBER]
32
+ [--commit_message COMMIT_MESSAGE] [--default_branch] [--target_path TARGET_PATH] [--scm {api,github,gitlab}] [--sbom-file SBOM_FILE]
33
+ [--commit-sha COMMIT_SHA] [--generate-license GENERATE_LICENSE] [-v] [--enable-debug] [--enable-json] [--disable-overview]
34
+ [--disable-security-issue] [--files FILES] [--ignore-commit-files]
35
+ ````
36
+
37
+ If you don't want to provide the Socket API Token every time then you can use the environment variable `SOCKET_SECURITY_API_KEY`
38
+
39
+
40
+ | Parameter | Alternate Name | Required | Default | Description |
41
+ |:-------------------------|:---------------|:---------|:--------|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
42
+ | -h | --help | False | | Show the CLI help message |
43
+ | --api_token | | False | | Provides the Socket API Token |
44
+ | --repo | | True | | The string name in a git approved name for repositories. |
45
+ | --branch | | False | | The string name in a git approved name for branches. |
46
+ | --committer | | False | | The string name of the person doing the commit or running the CLI. Can be specified multiple times to have more than one committer |
47
+ | --pr_number | | False | 0 | The integer for the PR or MR number |
48
+ | --commit_message | | False | | The string for a commit message if there is one |
49
+ | --default_branch | | False | False | If the flag is specified this will signal that this is the default branch. This needs to be enabled for a report to update Org Alerts and Org Dependencies |
50
+ | --target_path | | False | ./ | This is the path to where the manifest files are location. The tool will recursively search for all supported manifest files |
51
+ | --scm | | False | api | This is the mode that the tool is to run in. For local runs `api` would be the mode. Other options are `gitlab` and `github` |
52
+ | --generate-license | | False | False | If this flag is specified it will generate a json file with the license per package and license text in the current working directory |
53
+ | --version | -v | False | | Prints the version and exits |
54
+ | --enable-debug | | False | False | Enables debug messaging for the CLI |
55
+ | --sbom-file | | False | False | Creates a JSON file with all dependencies and alerts |
56
+ | --commit-sha | | False | | The commit hash for the commit |
57
+ | --generate-license | | False | False | If enabled with `--sbom-file` will include license details |
58
+ | --enable-json | | False | False | If enabled will change the console output format to JSON |
59
+ | --disable-overview | | False | False | If enabled will disable Dependency Overview comments |
60
+ | --disable-security-issue | | False | False | If enabled will disable Security Issue Comments |
61
+ | --files | | False | | If provided in the format of `["file1", "file2"]` will be used to determine if there have been supported file changes. This is used if it isn't a git repo and you would like to only run if it supported files have changed. |
62
+ | --ignore-commit-files | | False | False | If enabled then the CLI will ignore what files are changed in the commit and look for all manifest files |
63
+ | --disable-blocking | | False | False | Disables failing checks and will only exit with an exit code of 0 |
@@ -0,0 +1,40 @@
1
+ # Socket Security CLI
2
+
3
+ The Socket Security CLI was created to enable integrations with other tools like Github Actions, Gitlab, BitBucket, local use cases and more. The tool will get the head scan for the provided repo from Socket, create a new one, and then report any new alerts detected. If there are new alerts against the Socket security policy it'll exit with a non-Zero exit code.
4
+
5
+ ## Usage
6
+
7
+ ```` shell
8
+ socketcli [-h] [--api_token API_TOKEN] [--repo REPO] [--branch BRANCH] [--committer COMMITTER] [--pr_number PR_NUMBER]
9
+ [--commit_message COMMIT_MESSAGE] [--default_branch] [--target_path TARGET_PATH] [--scm {api,github,gitlab}] [--sbom-file SBOM_FILE]
10
+ [--commit-sha COMMIT_SHA] [--generate-license GENERATE_LICENSE] [-v] [--enable-debug] [--enable-json] [--disable-overview]
11
+ [--disable-security-issue] [--files FILES] [--ignore-commit-files]
12
+ ````
13
+
14
+ If you don't want to provide the Socket API Token every time then you can use the environment variable `SOCKET_SECURITY_API_KEY`
15
+
16
+
17
+ | Parameter | Alternate Name | Required | Default | Description |
18
+ |:-------------------------|:---------------|:---------|:--------|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
19
+ | -h | --help | False | | Show the CLI help message |
20
+ | --api_token | | False | | Provides the Socket API Token |
21
+ | --repo | | True | | The string name in a git approved name for repositories. |
22
+ | --branch | | False | | The string name in a git approved name for branches. |
23
+ | --committer | | False | | The string name of the person doing the commit or running the CLI. Can be specified multiple times to have more than one committer |
24
+ | --pr_number | | False | 0 | The integer for the PR or MR number |
25
+ | --commit_message | | False | | The string for a commit message if there is one |
26
+ | --default_branch | | False | False | If the flag is specified this will signal that this is the default branch. This needs to be enabled for a report to update Org Alerts and Org Dependencies |
27
+ | --target_path | | False | ./ | This is the path to where the manifest files are location. The tool will recursively search for all supported manifest files |
28
+ | --scm | | False | api | This is the mode that the tool is to run in. For local runs `api` would be the mode. Other options are `gitlab` and `github` |
29
+ | --generate-license | | False | False | If this flag is specified it will generate a json file with the license per package and license text in the current working directory |
30
+ | --version | -v | False | | Prints the version and exits |
31
+ | --enable-debug | | False | False | Enables debug messaging for the CLI |
32
+ | --sbom-file | | False | False | Creates a JSON file with all dependencies and alerts |
33
+ | --commit-sha | | False | | The commit hash for the commit |
34
+ | --generate-license | | False | False | If enabled with `--sbom-file` will include license details |
35
+ | --enable-json | | False | False | If enabled will change the console output format to JSON |
36
+ | --disable-overview | | False | False | If enabled will disable Dependency Overview comments |
37
+ | --disable-security-issue | | False | False | If enabled will disable Security Issue Comments |
38
+ | --files | | False | | If provided in the format of `["file1", "file2"]` will be used to determine if there have been supported file changes. This is used if it isn't a git repo and you would like to only run if it supported files have changed. |
39
+ | --ignore-commit-files | | False | False | If enabled then the CLI will ignore what files are changed in the commit and look for all manifest files |
40
+ | --disable-blocking | | False | False | Disables failing checks and will only exit with an exit code of 0 |
@@ -0,0 +1,48 @@
1
+ [build-system]
2
+ requires = ["setuptools >= 61.0"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "socketsecurity"
7
+ dynamic = ["version"]
8
+ requires-python = ">= 3.9"
9
+ dependencies = [
10
+ 'requests',
11
+ 'mdutils',
12
+ 'prettytable',
13
+ 'GitPython',
14
+ 'packaging',
15
+ ]
16
+ readme = "README.md"
17
+ description = "Socket Security CLI for CI/CD"
18
+ keywords = ["socketsecurity", "socket.dev", "sca", "oss", "security"]
19
+ authors = [
20
+ {name = "Douglas Coburn", email = "douglas@socket.dev"}
21
+ ]
22
+ maintainers = [
23
+ {name = "Douglas Coburn", email = "douglas@socket.dev"}
24
+ ]
25
+ classifiers = [
26
+ "Development Status :: 4 - Beta",
27
+ "Intended Audience :: Developers",
28
+ "Programming Language :: Python :: 3.9",
29
+ "Programming Language :: Python :: 3.10",
30
+ "Programming Language :: Python :: 3.11",
31
+ "Programming Language :: Python :: 3.12",
32
+ ]
33
+
34
+
35
+ [project.scripts]
36
+ socketcli = "socketsecurity.socketcli:cli"
37
+
38
+ [project.urls]
39
+ Homepage = "https://socket.dev"
40
+
41
+ [tool.setuptools.packages.find]
42
+ include = [
43
+ "socketsecurity",
44
+ "socketsecurity.core"
45
+ ]
46
+
47
+ [tool.setuptools.dynamic]
48
+ version = {attr = "socketsecurity.__version__"}
@@ -1,2 +1,2 @@
1
1
  __author__ = 'socket.dev'
2
- __version__ = '0.0.44'
2
+ __version__ = '1.0.39'