Skip to content

Commit 1f9dfd6

Browse files
committed
docs: improve README with features, architecture, and privacy sections
Added tables for redaction examples, noise stripping details, advisory detection, input format support, architecture diagram, testing info, and privacy statement.
1 parent c05ebaa commit 1f9dfd6

1 file changed

Lines changed: 74 additions & 13 deletions

File tree

README.md

Lines changed: 74 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,32 +4,93 @@ Browser-based tool that redacts sensitive values from Docker Compose YAML while
44

55
**Live:** [bakerboy448.github.io/compose-sanitizer](https://bakerboy448.github.io/compose-sanitizer/)
66

7-
## What Gets Redacted
7+
## Features
88

9-
- **Sensitive env var values** matching password, secret, token, api_key, auth, credential patterns
10-
- **Email addresses** detected in any value
11-
- **Home directory paths** in volume mounts (`/home/user/...` becomes `~/...`)
9+
### Redaction
1210

13-
## What Gets Kept
11+
| What | Example | Result |
12+
|------|---------|--------|
13+
| Sensitive env values | `MYSQL_PASSWORD: supersecret` | `MYSQL_PASSWORD: **REDACTED**` |
14+
| Email addresses | `NOTIFY: user@example.com` | `NOTIFY: **REDACTED**` |
15+
| Home directory paths | `/home/john/media:/tv` | `~/media:/tv` |
1416

15-
- Container names, images, labels, networks, ports
16-
- Volume mounts (with anonymized home paths)
17-
- Environment variable **names** (only values redacted)
18-
- PUID, PGID, TZ, UMASK values (explicitly safelisted)
17+
Detected patterns: `password`, `secret`, `token`, `api_key`, `auth`, `credential`, `private_key`, `vpn_user`, and more.
18+
19+
Safe-listed keys (kept as-is): `PUID`, `PGID`, `TZ`, `UMASK`, `LOG_LEVEL`, `WEBUI_PORT`, etc.
20+
21+
### Noise Stripping
22+
23+
Removes auto-generated fields that clutter compose output:
24+
25+
- `com.docker.compose.*` labels
26+
- S6-overlay env vars (`S6_*`)
27+
- Default runtime values (`ipc: private`, `entrypoint: /init`)
28+
- Locale/path env vars (`PATH`, `LANG`, `XDG_*`)
29+
- Empty maps and arrays
30+
31+
### Advisories
32+
33+
Detects common misconfigurations and shows warnings with links to documentation:
34+
35+
- **Hardlinks advisory**: Warns when separate `/tv`, `/movies`, etc. mounts prevent hardlinks and instant moves
36+
37+
### Input Handling
38+
39+
Accepts multiple input formats:
40+
41+
- Raw `docker-compose.yml` content
42+
- Output from `docker compose config`
43+
- Output from [`docker-autocompose`](https://github.com/Red5d/docker-autocompose) (strips shell prompts and non-YAML lines)
44+
45+
### Customizable Patterns
46+
47+
The Settings panel allows custom sensitive patterns (regex) and safe key lists. Configuration persists in `localStorage`.
1948

2049
## Self-Hosting
2150

22-
Download `compose-sanitizer.html` from the [latest release](https://github.com/bakerboy448/compose-sanitizer/releases) and open it in any browser. Everything runs client-side — no server required.
51+
Download `compose-sanitizer.html` from the [latest release](https://github.com/bakerboy448/compose-sanitizer/releases/latest) and open it in any browser. Everything runs client-side in a single HTML file — no server, no network requests, no data leaves your browser.
2352

2453
## Development
2554

2655
```bash
2756
npm install
28-
npm run dev # Start dev server
29-
npm run test # Run tests
30-
npm run build # Build single-file output
57+
npm run dev # Start Vite dev server
58+
npm test # Run tests (vitest)
59+
npm run build # Build single-file dist/index.html
3160
```
3261

62+
### Architecture
63+
64+
Single-page app built with Vite + vanilla TypeScript. The build produces one self-contained HTML file via `vite-plugin-singlefile`.
65+
66+
```
67+
src/
68+
patterns.ts # Shared type guards, regex patterns, utility functions
69+
extract.ts # Extracts YAML from mixed console output
70+
redact.ts # Redacts sensitive values, anonymizes paths
71+
noise.ts # Strips auto-generated noise fields
72+
advisories.ts # Detects misconfigurations (hardlinks, etc.)
73+
config.ts # Customizable patterns, localStorage persistence
74+
clipboard.ts # Copy, PrivateBin, and Gist sharing
75+
disclaimer.ts # PII warnings and legal disclaimers
76+
main.ts # UI assembly and event wiring
77+
```
78+
79+
### Testing
80+
81+
104 tests across 7 test files with >93% statement coverage:
82+
83+
```bash
84+
npm test # Run tests
85+
npx vitest run --coverage # Run with coverage report
86+
```
87+
88+
## Privacy
89+
90+
- All processing happens in your browser — no data is sent anywhere
91+
- No analytics, tracking, or external requests
92+
- The "Open PrivateBin" and "Open GitHub Gist" buttons copy to clipboard and open a new tab — you paste manually
93+
3394
## License
3495

3596
MIT

0 commit comments

Comments
 (0)