From ff913f6c6d9fada0b881b3040441e6a745796488 Mon Sep 17 00:00:00 2001 From: CoprDistGit Date: Tue, 11 Apr 2023 13:33:14 +0000 Subject: automatic import of python-ggshield --- .gitignore | 1 + python-ggshield.spec | 376 +++++++++++++++++++++++++++++++++++++++++++++++++++ sources | 1 + 3 files changed, 378 insertions(+) create mode 100644 python-ggshield.spec create mode 100644 sources diff --git a/.gitignore b/.gitignore index e69de29..e3d88db 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/ggshield-1.14.5.tar.gz diff --git a/python-ggshield.spec b/python-ggshield.spec new file mode 100644 index 0000000..612947f --- /dev/null +++ b/python-ggshield.spec @@ -0,0 +1,376 @@ +%global _empty_manifest_terminate_build 0 +Name: python-ggshield +Version: 1.14.5 +Release: 1 +Summary: Detect secrets from all sources using GitGuardian's brains +License: MIT +URL: https://github.com/GitGuardian/ggshield +Source0: https://mirrors.nju.edu.cn/pypi/web/packages/60/b8/439976c00f15f81b839177721fef3ee7e43387bf0598d14d307fdbf8a70e/ggshield-1.14.5.tar.gz +BuildArch: noarch + +Requires: python3-appdirs +Requires: python3-charset-normalizer +Requires: python3-click +Requires: python3-marshmallow-dataclass +Requires: python3-marshmallow +Requires: python3-oauthlib +Requires: python3-pygitguardian +Requires: python3-dotenv +Requires: python3-pyyaml +Requires: python3-rich + +%description +# [ggshield](https://github.com/GitGuardian/ggshield): protect your code with GitGuardian +[![PyPI](https://img.shields.io/pypi/v/ggshield?color=%231B2D55&style=for-the-badge)](https://pypi.org/project/ggshield/) +[![Docker Image Version (latest semver)](https://img.shields.io/docker/v/gitguardian/ggshield?color=1B2D55&sort=semver&style=for-the-badge&label=Docker)](https://hub.docker.com/r/gitguardian/ggshield) +[![License](https://img.shields.io/github/license/GitGuardian/ggshield?color=%231B2D55&style=for-the-badge)](LICENSE) +[![GitHub stars](https://img.shields.io/github/stars/gitguardian/ggshield?color=%231B2D55&style=for-the-badge)](https://github.com/GitGuardian/ggshield/stargazers) +[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/GitGuardian/ggshield/main.yml?branch=main&style=for-the-badge)](https://github.com/GitGuardian/ggshield/actions) +[![Codecov](https://img.shields.io/codecov/c/github/GitGuardian/ggshield?style=for-the-badge)](https://codecov.io/gh/GitGuardian/ggshield/) +`ggshield` is a CLI application that runs in your local environment or in a CI environment to help you detect more than 350+ types of secrets, as well as other potential security vulnerabilities or policy breaks affecting your codebase. +`ggshield` uses our [public API](https://api.gitguardian.com/doc) through [py-gitguardian](https://github.com/GitGuardian/py-gitguardian) to scan and detect potential vulnerabilities in files and other text content. +Only metadata such as call time, request size and scan mode is stored from scans using `ggshield`, therefore secrets and policy breaks incidents will not be displayed on your dashboard and **your files and secrets won't be stored**. +# Table of Contents + + +- [Installation](#installation) + - [macOS - Using Homebrew](#macos---using-homebrew) + - [Linux packages](#linux-packages) + - [Other Operating Systems - Using pip](#other-operating-systems---using-pip) + - [Installing](#installing) + - [Updating](#updating) +- [Initial setup](#initial-setup) +- [Getting started](#getting-started) +- [Integrations](#integrations) +- [Learn more](#learn-more) +- [Output](#output) +- [Related open source projects](#related-open-source-projects) +- [License](#license) + +# Installation +## macOS - Using Homebrew +You can install `ggshield` using Homebrew by running the following command: +```shell +$ brew install gitguardian/tap/ggshield +``` +## Linux packages +Deb and RPM packages are available on [Cloudsmith](https://cloudsmith.io/~gitguardian/repos/ggshield/packages/). +Setup instructions: +- [Deb packages](https://cloudsmith.io/~gitguardian/repos/ggshield/setup/#formats-deb) +- [RPM packages](https://cloudsmith.io/~gitguardian/repos/ggshield/setup/#formats-rpm) +## Other Operating Systems - Using pip +### Installing +```shell +$ pip install ggshield +``` +`ggshield` supports **Python 3.7 and newer**. +The package should run on MacOS, Linux and Windows. +### Updating +To update `ggshield` you can add the option `-U/--upgrade` to the pip install command. +```shell +$ pip install -U ggshield +``` +# Initial setup +To use `ggshield` you need to authenticate against GitGuardian servers. To do so, use the `ggshield auth login` command. This command automates the provisioning of a personal access token and its configuration on the local workstation. +You can learn more about it from [`ggshield auth login` documentation](https://docs.gitguardian.com/internal-repositories-monitoring/ggshield/reference/auth/login). +Alternatively, you can create your personal access token manually and you can store it in the `GITGUARDIAN_API_KEY` environment variable to complete the setup. +# Getting started +You can now use `ggshield` to search for secrets: +- in files: `ggshield secret scan path -r .` +- in repositories: `ggshield secret scan repo .` +- in Docker images: `ggshield secret scan docker ubuntu:22.04` +- in Pypi packages: `ggshield secret scan pypi flask` +- and more, have a look at `ggshield secret scan --help` output for details. +You can also search for vulnerabilities in your IaC files using the following command: +``` +ggshield iac scan . +``` +# Integrations +You can integrate `ggshield` in your [CI/CD workflow](https://docs.gitguardian.com/ggshield-docs/integrations/overview#cicd-integrations-secrets-detection-in-your-cicd-workflow). +To catch errors earlier, use `ggshield` as a [pre-commit, pre-push or pre-receive Git hook](https://docs.gitguardian.com/ggshield-docs/integrations/overview#git-hooks-prevent-secrets-from-reaching-your-vcs). +# Learn more +For more information, have a look at [the documentation](https://docs.gitguardian.com/ggshield-docs/getting-started) +# Output +If no secrets or policy breaks have been found, the exit code will be 0: +```bash +$ ggshield secret scan pre-commit +``` +If a secret or other issue is found in your staged code or in your CI, you will have an alert giving you the type of policy break, the filename where the policy break has been found and a patch giving you the position of the policy break in the file: +```shell +$ ggshield secret scan pre-commit +🛡️ ⚔️ 🛡️ 2 policy breaks have been found in file production.rb +11 | config.paperclip_defaults = { +12 | :s3_credentials => { +13 | :bucket => "XXX", +14 | :access_key_id => "XXXXXXXXXXXXXXXXXXXX", + |_____AWS Keys_____| +15 | :secret_access_key => "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" + |_______________AWS Keys_______________| +16 | } +17 | } +``` +Lines that are too long are truncated to match the size of the terminal, unless the verbose mode is used (`-v` or `--verbose`). +# Related open source projects +- [truffleHog](https://github.com/dxa4481/truffleHog) +- [gitleaks](https://github.com/zricethezav/gitleaks) +- [gitrob](https://github.com/michenriksen/gitrob) +- [git-hound](https://github.com/tillson/git-hound) +- [AWS git-secrets](https://github.com/awslabs/git-secrets) +- [detect-secrets](https://github.com/Yelp/detect-secrets) +# License +`ggshield` is MIT licensed. + +%package -n python3-ggshield +Summary: Detect secrets from all sources using GitGuardian's brains +Provides: python-ggshield +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +%description -n python3-ggshield +# [ggshield](https://github.com/GitGuardian/ggshield): protect your code with GitGuardian +[![PyPI](https://img.shields.io/pypi/v/ggshield?color=%231B2D55&style=for-the-badge)](https://pypi.org/project/ggshield/) +[![Docker Image Version (latest semver)](https://img.shields.io/docker/v/gitguardian/ggshield?color=1B2D55&sort=semver&style=for-the-badge&label=Docker)](https://hub.docker.com/r/gitguardian/ggshield) +[![License](https://img.shields.io/github/license/GitGuardian/ggshield?color=%231B2D55&style=for-the-badge)](LICENSE) +[![GitHub stars](https://img.shields.io/github/stars/gitguardian/ggshield?color=%231B2D55&style=for-the-badge)](https://github.com/GitGuardian/ggshield/stargazers) +[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/GitGuardian/ggshield/main.yml?branch=main&style=for-the-badge)](https://github.com/GitGuardian/ggshield/actions) +[![Codecov](https://img.shields.io/codecov/c/github/GitGuardian/ggshield?style=for-the-badge)](https://codecov.io/gh/GitGuardian/ggshield/) +`ggshield` is a CLI application that runs in your local environment or in a CI environment to help you detect more than 350+ types of secrets, as well as other potential security vulnerabilities or policy breaks affecting your codebase. +`ggshield` uses our [public API](https://api.gitguardian.com/doc) through [py-gitguardian](https://github.com/GitGuardian/py-gitguardian) to scan and detect potential vulnerabilities in files and other text content. +Only metadata such as call time, request size and scan mode is stored from scans using `ggshield`, therefore secrets and policy breaks incidents will not be displayed on your dashboard and **your files and secrets won't be stored**. +# Table of Contents + + +- [Installation](#installation) + - [macOS - Using Homebrew](#macos---using-homebrew) + - [Linux packages](#linux-packages) + - [Other Operating Systems - Using pip](#other-operating-systems---using-pip) + - [Installing](#installing) + - [Updating](#updating) +- [Initial setup](#initial-setup) +- [Getting started](#getting-started) +- [Integrations](#integrations) +- [Learn more](#learn-more) +- [Output](#output) +- [Related open source projects](#related-open-source-projects) +- [License](#license) + +# Installation +## macOS - Using Homebrew +You can install `ggshield` using Homebrew by running the following command: +```shell +$ brew install gitguardian/tap/ggshield +``` +## Linux packages +Deb and RPM packages are available on [Cloudsmith](https://cloudsmith.io/~gitguardian/repos/ggshield/packages/). +Setup instructions: +- [Deb packages](https://cloudsmith.io/~gitguardian/repos/ggshield/setup/#formats-deb) +- [RPM packages](https://cloudsmith.io/~gitguardian/repos/ggshield/setup/#formats-rpm) +## Other Operating Systems - Using pip +### Installing +```shell +$ pip install ggshield +``` +`ggshield` supports **Python 3.7 and newer**. +The package should run on MacOS, Linux and Windows. +### Updating +To update `ggshield` you can add the option `-U/--upgrade` to the pip install command. +```shell +$ pip install -U ggshield +``` +# Initial setup +To use `ggshield` you need to authenticate against GitGuardian servers. To do so, use the `ggshield auth login` command. This command automates the provisioning of a personal access token and its configuration on the local workstation. +You can learn more about it from [`ggshield auth login` documentation](https://docs.gitguardian.com/internal-repositories-monitoring/ggshield/reference/auth/login). +Alternatively, you can create your personal access token manually and you can store it in the `GITGUARDIAN_API_KEY` environment variable to complete the setup. +# Getting started +You can now use `ggshield` to search for secrets: +- in files: `ggshield secret scan path -r .` +- in repositories: `ggshield secret scan repo .` +- in Docker images: `ggshield secret scan docker ubuntu:22.04` +- in Pypi packages: `ggshield secret scan pypi flask` +- and more, have a look at `ggshield secret scan --help` output for details. +You can also search for vulnerabilities in your IaC files using the following command: +``` +ggshield iac scan . +``` +# Integrations +You can integrate `ggshield` in your [CI/CD workflow](https://docs.gitguardian.com/ggshield-docs/integrations/overview#cicd-integrations-secrets-detection-in-your-cicd-workflow). +To catch errors earlier, use `ggshield` as a [pre-commit, pre-push or pre-receive Git hook](https://docs.gitguardian.com/ggshield-docs/integrations/overview#git-hooks-prevent-secrets-from-reaching-your-vcs). +# Learn more +For more information, have a look at [the documentation](https://docs.gitguardian.com/ggshield-docs/getting-started) +# Output +If no secrets or policy breaks have been found, the exit code will be 0: +```bash +$ ggshield secret scan pre-commit +``` +If a secret or other issue is found in your staged code or in your CI, you will have an alert giving you the type of policy break, the filename where the policy break has been found and a patch giving you the position of the policy break in the file: +```shell +$ ggshield secret scan pre-commit +🛡️ ⚔️ 🛡️ 2 policy breaks have been found in file production.rb +11 | config.paperclip_defaults = { +12 | :s3_credentials => { +13 | :bucket => "XXX", +14 | :access_key_id => "XXXXXXXXXXXXXXXXXXXX", + |_____AWS Keys_____| +15 | :secret_access_key => "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" + |_______________AWS Keys_______________| +16 | } +17 | } +``` +Lines that are too long are truncated to match the size of the terminal, unless the verbose mode is used (`-v` or `--verbose`). +# Related open source projects +- [truffleHog](https://github.com/dxa4481/truffleHog) +- [gitleaks](https://github.com/zricethezav/gitleaks) +- [gitrob](https://github.com/michenriksen/gitrob) +- [git-hound](https://github.com/tillson/git-hound) +- [AWS git-secrets](https://github.com/awslabs/git-secrets) +- [detect-secrets](https://github.com/Yelp/detect-secrets) +# License +`ggshield` is MIT licensed. + +%package help +Summary: Development documents and examples for ggshield +Provides: python3-ggshield-doc +%description help +# [ggshield](https://github.com/GitGuardian/ggshield): protect your code with GitGuardian +[![PyPI](https://img.shields.io/pypi/v/ggshield?color=%231B2D55&style=for-the-badge)](https://pypi.org/project/ggshield/) +[![Docker Image Version (latest semver)](https://img.shields.io/docker/v/gitguardian/ggshield?color=1B2D55&sort=semver&style=for-the-badge&label=Docker)](https://hub.docker.com/r/gitguardian/ggshield) +[![License](https://img.shields.io/github/license/GitGuardian/ggshield?color=%231B2D55&style=for-the-badge)](LICENSE) +[![GitHub stars](https://img.shields.io/github/stars/gitguardian/ggshield?color=%231B2D55&style=for-the-badge)](https://github.com/GitGuardian/ggshield/stargazers) +[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/GitGuardian/ggshield/main.yml?branch=main&style=for-the-badge)](https://github.com/GitGuardian/ggshield/actions) +[![Codecov](https://img.shields.io/codecov/c/github/GitGuardian/ggshield?style=for-the-badge)](https://codecov.io/gh/GitGuardian/ggshield/) +`ggshield` is a CLI application that runs in your local environment or in a CI environment to help you detect more than 350+ types of secrets, as well as other potential security vulnerabilities or policy breaks affecting your codebase. +`ggshield` uses our [public API](https://api.gitguardian.com/doc) through [py-gitguardian](https://github.com/GitGuardian/py-gitguardian) to scan and detect potential vulnerabilities in files and other text content. +Only metadata such as call time, request size and scan mode is stored from scans using `ggshield`, therefore secrets and policy breaks incidents will not be displayed on your dashboard and **your files and secrets won't be stored**. +# Table of Contents + + +- [Installation](#installation) + - [macOS - Using Homebrew](#macos---using-homebrew) + - [Linux packages](#linux-packages) + - [Other Operating Systems - Using pip](#other-operating-systems---using-pip) + - [Installing](#installing) + - [Updating](#updating) +- [Initial setup](#initial-setup) +- [Getting started](#getting-started) +- [Integrations](#integrations) +- [Learn more](#learn-more) +- [Output](#output) +- [Related open source projects](#related-open-source-projects) +- [License](#license) + +# Installation +## macOS - Using Homebrew +You can install `ggshield` using Homebrew by running the following command: +```shell +$ brew install gitguardian/tap/ggshield +``` +## Linux packages +Deb and RPM packages are available on [Cloudsmith](https://cloudsmith.io/~gitguardian/repos/ggshield/packages/). +Setup instructions: +- [Deb packages](https://cloudsmith.io/~gitguardian/repos/ggshield/setup/#formats-deb) +- [RPM packages](https://cloudsmith.io/~gitguardian/repos/ggshield/setup/#formats-rpm) +## Other Operating Systems - Using pip +### Installing +```shell +$ pip install ggshield +``` +`ggshield` supports **Python 3.7 and newer**. +The package should run on MacOS, Linux and Windows. +### Updating +To update `ggshield` you can add the option `-U/--upgrade` to the pip install command. +```shell +$ pip install -U ggshield +``` +# Initial setup +To use `ggshield` you need to authenticate against GitGuardian servers. To do so, use the `ggshield auth login` command. This command automates the provisioning of a personal access token and its configuration on the local workstation. +You can learn more about it from [`ggshield auth login` documentation](https://docs.gitguardian.com/internal-repositories-monitoring/ggshield/reference/auth/login). +Alternatively, you can create your personal access token manually and you can store it in the `GITGUARDIAN_API_KEY` environment variable to complete the setup. +# Getting started +You can now use `ggshield` to search for secrets: +- in files: `ggshield secret scan path -r .` +- in repositories: `ggshield secret scan repo .` +- in Docker images: `ggshield secret scan docker ubuntu:22.04` +- in Pypi packages: `ggshield secret scan pypi flask` +- and more, have a look at `ggshield secret scan --help` output for details. +You can also search for vulnerabilities in your IaC files using the following command: +``` +ggshield iac scan . +``` +# Integrations +You can integrate `ggshield` in your [CI/CD workflow](https://docs.gitguardian.com/ggshield-docs/integrations/overview#cicd-integrations-secrets-detection-in-your-cicd-workflow). +To catch errors earlier, use `ggshield` as a [pre-commit, pre-push or pre-receive Git hook](https://docs.gitguardian.com/ggshield-docs/integrations/overview#git-hooks-prevent-secrets-from-reaching-your-vcs). +# Learn more +For more information, have a look at [the documentation](https://docs.gitguardian.com/ggshield-docs/getting-started) +# Output +If no secrets or policy breaks have been found, the exit code will be 0: +```bash +$ ggshield secret scan pre-commit +``` +If a secret or other issue is found in your staged code or in your CI, you will have an alert giving you the type of policy break, the filename where the policy break has been found and a patch giving you the position of the policy break in the file: +```shell +$ ggshield secret scan pre-commit +🛡️ ⚔️ 🛡️ 2 policy breaks have been found in file production.rb +11 | config.paperclip_defaults = { +12 | :s3_credentials => { +13 | :bucket => "XXX", +14 | :access_key_id => "XXXXXXXXXXXXXXXXXXXX", + |_____AWS Keys_____| +15 | :secret_access_key => "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" + |_______________AWS Keys_______________| +16 | } +17 | } +``` +Lines that are too long are truncated to match the size of the terminal, unless the verbose mode is used (`-v` or `--verbose`). +# Related open source projects +- [truffleHog](https://github.com/dxa4481/truffleHog) +- [gitleaks](https://github.com/zricethezav/gitleaks) +- [gitrob](https://github.com/michenriksen/gitrob) +- [git-hound](https://github.com/tillson/git-hound) +- [AWS git-secrets](https://github.com/awslabs/git-secrets) +- [detect-secrets](https://github.com/Yelp/detect-secrets) +# License +`ggshield` is MIT licensed. + +%prep +%autosetup -n ggshield-1.14.5 + +%build +%py3_build + +%install +%py3_install +install -d -m755 %{buildroot}/%{_pkgdocdir} +if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi +if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi +if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi +if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi +pushd %{buildroot} +if [ -d usr/lib ]; then + find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/lib64 ]; then + find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/bin ]; then + find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/sbin ]; then + find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst +fi +touch doclist.lst +if [ -d usr/share/man ]; then + find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst +fi +popd +mv %{buildroot}/filelist.lst . +mv %{buildroot}/doclist.lst . + +%files -n python3-ggshield -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Tue Apr 11 2023 Python_Bot - 1.14.5-1 +- Package Spec generated diff --git a/sources b/sources new file mode 100644 index 0000000..b657ac2 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +921904a4f23467f0e1360ff27f6bc4af ggshield-1.14.5.tar.gz -- cgit v1.2.3