Skip to main content

Detects secrets that are defined in the repository and are not used in Github Actions

Project description

detect-gh-actions-unused-secrets

Detects secrets that are defined in the repository and are not used in Github Actions.

What it does:

  • Get repository secrets using Github Actions API
  • Clone the repository
  • Search through the Github Actions related files (.github/workflows/*.yaml and .github/workflows/*.yml) and try to find usages of each secret
  • Report those secrets which are not found

Prerequisites

Installation

pip install detect-gh-actions-unused-secrets

Usage

detect-gh-actions-unused-secrets <token> <owner>/<repo1> <owner/repo2>

--generate-curls

Option to generate a text file with curls to delete all unused secrets in the repositories that were scanned.

detect-gh-actions-unused-secrets <token> <owner>/<repo1> --generate-curls

This command will produce a file called curls.sh that will contain line-by-line curl commands to delete all unused secrets in <owner>/<repo1> repository. This endpoint will be utilized.

Project details


Download files

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

Source Distribution

detect_gh_actions_unused_secrets-0.5.0.tar.gz (3.9 kB view hashes)

Uploaded Source

Built Distribution

detect_gh_actions_unused_secrets-0.5.0-py2.py3-none-any.whl (4.7 kB view hashes)

Uploaded Python 2 Python 3

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