Skip to main content

ggshield secret scan pypi

Description​

Scan a pypi package.

ggshield secret scan pypi [OPTIONS] PACKAGE_NAME

Under the hood this command downloads the package from the index without installing or running it. Set the PIP_INDEX_URL (and optionally PIP_EXTRA_INDEX_URL) environment variable to download from a custom index instead of PyPI.

Options​

  • --source-uuid TEXT: Identifier of the custom source in GitGuardian. If used, incidents will be created and visible on the dashboard. Requires the 'scan:create-incidents' scope.
  • --filename-only: Send only the file name (not the full path) to GitGuardian, so incidents record just the filename.
  • --all-secrets: Do not ignore any secret. Possible ignore-reason is shown as well.
  • --instance URL: URL of the instance to use.
  • --with-incident-details: Display full details about the dashboard incident if one is found (JSON and SARIF formats only). Requires the 'incidents:read' scope.
  • -b, --banlist-detector DETECTOR: Exclude results from a detector.
  • --ignore-known-secrets: Ignore secrets already known by GitGuardian dashboard.
  • --exclude PATTERNS: Do not scan paths that match the specified glob-like patterns.
  • --exit-zero: Return a 0 (non-error) status code, even if incidents are found. An error status code will still be returned for other errors, such as connection errors. This option can also be set with the GITGUARDIAN_EXIT_ZERO environment variable.
  • --show-secrets: Show secrets in plaintext instead of hiding them.
  • -o, --output PATH: Redirect ggshield output to PATH.
  • --format [text|json|sarif]: Format to use for the output.
  • --json: Shorthand for --format json.

This command supports all ggshield global options.