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/*.yamland.github/workflows/*.yml) and try to find usages of each secret - Report those secrets which are not found
Prerequisites
- GitHub token with
reposcope (GitHub docs)
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file detect_gh_actions_unused_secrets-0.6.0.tar.gz.
File metadata
- Download URL: detect_gh_actions_unused_secrets-0.6.0.tar.gz
- Upload date:
- Size: 4.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
21e78f0a5831f4c8a4bb802b6f28b6cf89ee0649f6487d58bad81bc081b0b589
|
|
| MD5 |
e519a307192b576a38efa96c0810e013
|
|
| BLAKE2b-256 |
4fd21ea4b01fcac3b07a5c581092929099d56f1da8fed221505229ae5321b177
|
File details
Details for the file detect_gh_actions_unused_secrets-0.6.0-py2.py3-none-any.whl.
File metadata
- Download URL: detect_gh_actions_unused_secrets-0.6.0-py2.py3-none-any.whl
- Upload date:
- Size: 4.8 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
08f96320008bd37d5f8aa58b5c88228bc17e18adc5ee082a8470b81e921d062e
|
|
| MD5 |
3ca5e40fbc648c3f061936026b56f5d7
|
|
| BLAKE2b-256 |
d5d7f76cf15d318cb358d2c2f3274052d6a82b485718a98626a2207859d8193a
|