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.6.0.tar.gz (4.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

detect_gh_actions_unused_secrets-0.6.0-py2.py3-none-any.whl (4.8 kB view details)

Uploaded Python 2Python 3

File details

Details for the file detect_gh_actions_unused_secrets-0.6.0.tar.gz.

File metadata

File hashes

Hashes for detect_gh_actions_unused_secrets-0.6.0.tar.gz
Algorithm Hash digest
SHA256 21e78f0a5831f4c8a4bb802b6f28b6cf89ee0649f6487d58bad81bc081b0b589
MD5 e519a307192b576a38efa96c0810e013
BLAKE2b-256 4fd21ea4b01fcac3b07a5c581092929099d56f1da8fed221505229ae5321b177

See more details on using hashes here.

File details

Details for the file detect_gh_actions_unused_secrets-0.6.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for detect_gh_actions_unused_secrets-0.6.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 08f96320008bd37d5f8aa58b5c88228bc17e18adc5ee082a8470b81e921d062e
MD5 3ca5e40fbc648c3f061936026b56f5d7
BLAKE2b-256 d5d7f76cf15d318cb358d2c2f3274052d6a82b485718a98626a2207859d8193a

See more details on using hashes here.

Supported by

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