Skip to content

Commit f776549

Browse files
committed
docs: Update README with new secret detection
1 parent dde18bc commit f776549

1 file changed

Lines changed: 18 additions & 6 deletions

File tree

README.md

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ to your clipboard, ready for LLM processing.
2929
- 📋 **Clipboard Integration**: Copy content or output file directly to your clipboard
3030
- 🌲 **Directory Tree View**: Display a tree-style view of your project structure
3131
- 🧮 **Token Estimation**: Get estimated token count for LLM context windows
32+
- 🛡️ **Secret Detection & Redaction**: Uses [gitleaks](https://github.com/gitleaks/gitleaks) to identify potential secrets and prevent sharing sensitive information
3233

3334
## 📦 Installation
3435

@@ -98,6 +99,8 @@ grab [options] [directory]
9899
| `-t, --temp` | Use system temporary directory for output file |
99100
| `-g, --glob pattern` | Include/exclude files and directories (e.g., `--glob="*.{ts,tsx}" --glob="!*.spec.ts"`) |
100101
| `-f, --format format` | Output format (available: markdown, text, xml) |
102+
| `-S, --skip-redaction` | Skip automatic secret redaction (WARNING: This may expose sensitive information) |
103+
| |
101104
| `--theme` | Set the UI theme |
102105

103106
### 📖 Examples
@@ -169,12 +172,13 @@ grab [options] [directory]
169172

170173
### Selection & Output
171174

172-
| Action | Key | Description |
173-
| :------------------- | :--------------------------------- | :----------------------------------------------------------- |
174-
| Select/deselect item | <kbd>tab</kbd> or <kbd>space</kbd> | Toggle selection of the current file or directory |
175-
| Copy to clipboard | <kbd>y</kbd> | Copy the generated output to clipboard |
176-
| Generate output file | <kbd>g</kbd> | Generate the output file with selected content |
177-
| Cycle output formats | <kbd>F</kbd> | Cycle through available output formats (markdown, text, xml) |
175+
| Action | Key | Description |
176+
| :---------------------- | :--------------------------------- | :----------------------------------------------------------- |
177+
| Select/deselect item | <kbd>tab</kbd> or <kbd>space</kbd> | Toggle selection of the current file or directory |
178+
| Copy to clipboard | <kbd>y</kbd> | Copy the generated output to clipboard |
179+
| Generate output file | <kbd>g</kbd> | Generate the output file with selected content |
180+
| Cycle output formats | <kbd>F</kbd> | Cycle through available output formats (markdown, text, xml) |
181+
| Toggle Secret Redaction | <kbd>S</kbd> | Enable/disable automatic secret redaction (Default: On) |
178182

179183
### View Options
180184

@@ -185,6 +189,14 @@ grab [options] [directory]
185189
| Toggle help screen | <kbd>?</kbd> | Show or hide the help screen |
186190
| Quit | <kbd>q</kbd> | Exit the application |
187191

192+
## 🛡️ Secret Detection & Redaction
193+
194+
CodeGrab automatically scans the content of selected files for potential secrets using [gitleaks](https://github.com/gitleaks/gitleaks) with its default rules. This helps prevent accidental exposure of sensitive credentials like API keys, private tokens, and passwords.
195+
196+
- **Enabled by Default**: Secret scanning and redaction are active unless explicitly disabled.
197+
- **Redaction Format**: Detected secrets are replaced with `[REDACTED_RuleID]`, where `RuleID` indicates the type of secret found (e.g., `[REDACTED_generic-api-key]`).
198+
- **Skipping Redaction**: You can disable this feature using the `-S` / `--skip-redaction` flag when running the command, or by pressing `S` in the interactive TUI. Use this option with caution, as it may expose sensitive information in the output.
199+
188200
## 🎨 Themes
189201

190202
CodeGrab comes with several built-in themes:

0 commit comments

Comments
 (0)