Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/katiem0/gh-export-secrets
GitHub CLI extension to generate a report of secrets name and access.
https://github.com/katiem0/gh-export-secrets
export-secrets gh-extension go golang
Last synced: about 1 month ago
JSON representation
GitHub CLI extension to generate a report of secrets name and access.
- Host: GitHub
- URL: https://github.com/katiem0/gh-export-secrets
- Owner: katiem0
- License: mit
- Created: 2023-02-15T16:59:16.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-04-11T20:26:01.000Z (over 1 year ago)
- Last Synced: 2024-06-21T16:52:35.987Z (5 months ago)
- Topics: export-secrets, gh-extension, go, golang
- Language: Go
- Homepage:
- Size: 28.3 KB
- Stars: 7
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# gh-export-secrets
A GitHub `gh` [CLI](https://cli.github.com/) extension to list the name and access level of GitHub Actions, Dependabot, and Codepsaces secrets at the Organization and/or Repository level.
It produces a `csv` report detailing:
- `SecretLevel`: If the secret was created at the organization or repository level
- `SecretType`: If the secret was created for `Actions`, `Dependabot` or `Codespaces`
- `SecretName`: The name of the secret
- `SecretAccess`: If an organization level secret, the visibility of the secret (i.e. `all`, `private`, or `scoped`)
- `RepositoryName`: The name of the repository that the secret can be accessed from
- `RepositoryID`: The `id` of the repository that the secret can be accessed from> **Note**
> This extension does **NOT** retrieve the value of the secret.## Installation
1. Install the `gh` CLI - see the [installation](https://github.com/cli/cli#installation) instructions.
2. Install the extension:
```sh
gh extension install katiem0/gh-export-secrets
```For more information: [`gh extension install`](https://cli.github.com/manual/gh_extension_install)
## Usage
This extension supports `GitHub.com` and GHES, through the use of `--hostname`.
```sh
$ gh export-secrets -hGenerate a report of Actions, Dependabot, and Codespaces secrets for an organization and/or repositories.
Usage:
gh export-secrets [flags] [repo ...]Flags:
-a, --app string List secrets for a specific application or all: {all|actions|codespaces|dependabot} (default "actions")
-d, --debug To debug logging
-h, --help help for gh
--hostname string GitHub Enterprise Server hostname (default "github.com")
-o, --output-file string Name of file to write CSV report (default "report-20230405134752.csv")
-t, --token string GitHub Personal Access Token (default "gh auth token")
```