Skip to main content

Socket Security CLI for CI/CD

Project description

Socket Security CLI

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.

Usage

socketcli [-h] [--api_token API_TOKEN] [--repo REPO] [--branch BRANCH] [--committer COMMITTER] [--pr_number PR_NUMBER]
                 [--commit_message COMMIT_MESSAGE] [--default_branch] [--target_path TARGET_PATH] [--scm {api,github,gitlab}] [--sbom-file SBOM_FILE]
                 [--commit-sha COMMIT_SHA] [--generate-license GENERATE_LICENSE] [-v] [--enable-debug] [--enable-json] [--disable-overview]
                 [--disable-security-issue] [--files FILES] [--ignore-commit-files]

If you don't want to provide the Socket API Token every time then you can use the environment variable SOCKET_SECURITY_API_KEY

Parameter Alternate Name Required Default Description
-h --help False Show the CLI help message
--api_token False Provides the Socket API Token
--repo True The string name in a git approved name for repositories.
--branch False The string name in a git approved name for branches.
--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
--pr_number False 0 The integer for the PR or MR number
--commit_message False The string for a commit message if there is one
--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
--target_path False ./ This is the path to where the manifest files are location. The tool will recursively search for all supported manifest files
--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
--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
--version -v False Prints the version and exits
--enable-debug False False Enables debug messaging for the CLI
--sbom-file False False Creates a JSON file with all dependencies and alerts
--commit-sha False The commit hash for the commit
--generate-license False False If enabled with --sbom-file will include license details
--enable-json False False If enabled will change the console output format to JSON
--disable-overview False False If enabled will disable Dependency Overview comments
--disable-security-issue False False If enabled will disable Security Issue Comments
--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.
--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
--disable-blocking False False Disables failing checks and will only exit with an exit code of 0

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

socketsecurity-1.0.34.tar.gz (2.7 MB view details)

Uploaded Source

Built Distribution

socketsecurity-1.0.34-py3-none-any.whl (2.7 MB view details)

Uploaded Python 3

File details

Details for the file socketsecurity-1.0.34.tar.gz.

File metadata

  • Download URL: socketsecurity-1.0.34.tar.gz
  • Upload date:
  • Size: 2.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.10

File hashes

Hashes for socketsecurity-1.0.34.tar.gz
Algorithm Hash digest
SHA256 d56dc149c35ed73c6189b588d4f4a76f8f2a91b86ac06e00c988707614a635d8
MD5 98d14ab181b68a7ca9ca0a7efdfadb2b
BLAKE2b-256 375157ff566014a9009e1b36228fd33e3baecf08c7a172810fe799f4f055cb18

See more details on using hashes here.

File details

Details for the file socketsecurity-1.0.34-py3-none-any.whl.

File metadata

File hashes

Hashes for socketsecurity-1.0.34-py3-none-any.whl
Algorithm Hash digest
SHA256 eb7d35b7c3e4e97e1aa30ca682b981925b0ff2fc98a30e508b73ba9d0a34e302
MD5 ad29b4dbe3839e86b11134c71473afa2
BLAKE2b-256 a05b68c7db8a32f8ecf4c15b997831f648952537887265113274fc069e7f1f3c

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page