Przejdź do treści
Biblioteka skilli
Bezpieczeństwo · Przegląd i audyt

secret-scanner

/secret-scanner

Wykrywa zakodowane na sztywno dane logowania w drzewie plików i historii gita, a potem prowadzi rotację i czyszczenie historii.

Repozytorium
skillforge ↗
Licencja
MIT
Ostatnia zmiana repozytorium
09.11.2026

Ocena i bezpieczeństwo

100/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść35 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
2
Skrypty
1
Komentarze HTML
0
Adresy URL w SKILL.md
2
Przestarzałość

Brak sygnałów. Repozytorium zmienione 09.11.2026, bez odwołań do wycofanych modeli i API.

Licencja

MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.

Co sprawdzić przed instalacją
  • 1 skrypt w paczce. Przejrzyj je przed instalacją, bo Claude może je uruchomić.

Skrypty: scripts/scan_secrets.py

Co robi i kiedy

Wykrywa zakodowane na sztywno dane logowania w drzewie plików i historii gita, a potem prowadzi rotację i czyszczenie historii.

Oryginalny opis (EN)

Detects hard-coded credentials (cloud keys, tokens, private keys, passwords, credentials in URLs) in the working tree and full git history using a bundled zero-dependency scanner, then guides safe rotation and history cleanup. Use before publishing a repo, before a push, after a suspected leak, or when the user asks to check for secrets or API keys.

Jak działa

  1. 1. Scan
  2. 2. Triage every finding
  3. 3. Respond to a real leak (order matters)
  4. 4. Prevent recurrence
  5. Report format
Sekcje z nagłówków SKILL.md, w oryginale · 73 linii, 409 słów
Podgląd SKILL.md
---
name: secret-scanner
description: Detects hard-coded credentials (cloud keys, tokens, private keys, passwords, credentials in URLs) in the working tree and full git history using a bundled zero-dependency scanner, then guides safe rotation and history cleanup. Use before publishing a repo, before a push, after a suspected leak, or when the user asks to check for secrets or API keys.
---

# Secret Scanner

## 1. Scan

The bundled scanner needs only Python 3.8+:

```bash
# Working tree
python3 scripts/scan_secrets.py .

# Working tree + every commit on every branch (do this before making a repo public)
python3 scripts/scan_secrets.py . --history

# CI-friendly
python3 scripts/scan_secrets.py . --json
```

`scripts/` is relative to this skill's directory. Exit code `1` means findings, so it works as a pre-commit hook or CI gate.

If `gitleaks` or `trufflehog` is installed, run it as a second opinion: `gitleaks detect --source . -v` or `trufflehog git file://. --only-verified`.

## 2. Triage every finding
For each hit, open the file and decide:

| Verdict | Signal | Action |
|---|---|---|
| **Real secret** | Valid format, plausible entropy, used in code/config | Go to step 3 immediately |
| **Test fixture** | Clearly fake value in tests/docs | Replace with an obvious placeholder or add `secretscan:ignore` to the line |
| **False positive** | Hash, UUID, public key, base64 asset | Add `secretscan:ignore` with a short reason |

Never print a full secret back to the user. Refer to it by file, line and the masked preview.

## 3. Respond to a real leak (order matters)
1. **Rotate/revoke first.** Assume it's compromised the moment it was pushed anywhere. Generate a new key in the provider console and revoke the old one. Deleting the commit does **not** un-leak it.
2. **Check for abuse:** provider audit logs, billing spikes, unknown resources.
3. **Move the secret out of code:** environment variables, a `.env` file that is git-ignored, or a secret manager (AWS Secrets Manager, GCP Secret Manager, Vault, Doppler, 1Password, GitHub Actions secrets).
4. **Add prevention:**
   ```gitignore
   .env
   .env.*
   !.env.example
   *.pem
   *.key
   ```
   Commit a `.env.example` with placeholder values.
5. **Clean history only if needed** (and with the user's explicit approval, since it rewrites history and requires a force push):
   ```bash
   # Preferred tool: https://github.com/newren/git-filter-repo
   git filter-repo --replace-text <(echo 'THE_OLD_SECRET==>REMOVED')
   ```
   Then every collaborator must re-clone. On GitHub, ask support to purge cached views if the repo was public.

## 4. Prevent recurrence
Suggest a pre-commit hook:
```yaml
# .pre-commit-config.yaml
repos:
  - repo: https://github.com/gitleaks/gitleaks
    rev: v8.21.2
    hooks:
      - id: gitleaks
```
and enable GitHub **secret scanning + push protection** in repository settings.

## Report format
```markdown
## Secret scan: <N> findings (<critical> critical)
| Severity | Rule | Location | Verdict | Action |
|---|---|---|---|---|
| critical | aws-access-key-id | config/prod.js:12 | Real | Rotate, move to env |
```
Pliki w paczce (2)
  • SKILL.md 3 KB
  • scripts/scan_secrets.py 9 KB

Wersje

RepozytoriumWynikLicencja
Ta strona · meyshad/skillforge100MIT
jeremylongshore/tons-of-skills-marketplace100MIT

Migawka bazy z 13.11.2026 · wersja paczki 9152d7e7b7b2 (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 2 · ranking

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 100secrets-scanner
    Wykrywa zakodowane na sztywno sekrety w kodzie, plikach konfiguracyjnych i historii gita, z oceną wagi i krokami naprawy.
  • 90Secret Scanning
    Wyszukuje zakodowane na sztywno dane uwierzytelniające i wyciekłe klucze w kodzie źródłowym oraz historii gita podczas przeglądu white-box.
  • 100secrets-scanner
    Szuka wyciekłych poświadczeń w kodzie, konfiguracji, logach i historii git: zahardkodowanych kluczy API, tokenów, kluczy prywatnych, haseł i connection stringów.
  • 100secrets-scan
    Znajduje klucze API, tokeny i hasła w plikach i historii gita, odróżniając prawdziwe wycieki od szumu, przed publikacją.
  • 100secrets
    Wyszukuje zaszyte hasła, klucze API, pliki .env w commitach i wyciek tokenów, także w historii gita.
  • 90secrets-management-audit
    Szuka wyciekłych sekretów w kodzie, historii gita, logach i konfiguracji oraz audytuje ich przechowywanie, rotację i minimalne uprawnienia.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.