Skip to main content

๐Ÿ• CredHound - ๋กœ์ปฌ ํŒŒ์ผ ๋ณด์•ˆ credential ํƒ์ง€ ๋„๊ตฌ (์—…๊ณ„ ํ‘œ์ค€ ์ค€์ˆ˜)

Project description

๐Ÿ• CredHound

PyPI version License: MIT

๋กœ์ปฌ ํŒŒ์ผ์—์„œ ๋ฏผ๊ฐํ•œ credential์„ ํƒ์ง€ํ•˜๋Š” ๋ณด์•ˆ ๋„๊ตฌ. OWASP, SARIF 2.1.0, CWE-798/321 ๋“ฑ ์—…๊ณ„ ํ‘œ์ค€ ์ค€์ˆ˜.

์ฃผ์š” ๊ธฐ๋Šฅ

  • 29๊ฐœ ํƒ์ง€ ๊ทœ์น™ โ€” AWS, GitHub, Slack, JWT, DB, ํŒจ์Šค์›Œ๋“œ, Private Key ๋“ฑ
  • ์—”ํŠธ๋กœํ”ผ ๋ถ„์„ โ€” Shannon ์—”ํŠธ๋กœํ”ผ ๊ธฐ๋ฐ˜ ๋ฏธ์ง€์˜ ์‹œํฌ๋ฆฟ ํƒ์ง€
  • ๋‹ค์ค‘ ์ถœ๋ ฅ โ€” HTML ๋ฆฌํฌํŠธ, JSON, SARIF 2.1.0, ์ฝ˜์†”
  • CI/CD ์—ฐ๋™ โ€” exit code, ๋น„๋Œ€ํ™”ํ˜• ๋ชจ๋“œ, pre-commit ํ›…
  • ๋ณ‘๋ ฌ ์ฒ˜๋ฆฌ โ€” ThreadPoolExecutor ๊ธฐ๋ฐ˜ ๊ณ ์† ์Šค์บ”
  • credential ๋งˆ์Šคํ‚น โ€” ๊ฒฐ๊ณผ ํŒŒ์ผ์— ์‹ค์ œ ๊ฐ’ ๋…ธ์ถœ ๋ฐฉ์ง€ (๊ธฐ๋ณธ ON)
  • false positive ๊ด€๋ฆฌ โ€” baseline ํŒŒ์ผ + ์ธ๋ผ์ธ ํ—ˆ์šฉ๋ชฉ๋ก (# credhound:ignore)
  • CWE ๋งคํ•‘ โ€” SARIF ์ถœ๋ ฅ์— CWE-798/321 ์ฐธ์กฐ ๋ฐ remediation ๊ฐ€์ด๋“œ ํฌํ•จ
  • ์„ค์ • ๋ถ„๋ฆฌ โ€” ๊ธ€๋กœ๋ฒŒ(config.yaml) + ๊ฐœ์ธ(config.local.yaml) ์ž๋™ ๋ณ‘ํ•ฉ

์„ค์น˜

pip install credhound

๋น ๋ฅธ ์‹œ์ž‘

# ์ธํ„ฐ๋ž™ํ‹ฐ๋ธŒ ๋ชจ๋“œ (HTML ๋ฆฌํฌํŠธ ์ž๋™ ์ƒ์„ฑ)
credhound

# ๊ฒฝ๋กœ ์ง€์ •
credhound --path ~/project

# ๋ณ‘๋ ฌ + HIGH ์ด์ƒ๋งŒ
credhound --path ~ --parallel --severity HIGH

์ถœ๋ ฅ ํ˜•์‹

# HTML ๋ฆฌํฌํŠธ (์‹œ๊ฐ์ , ๊ถŒ์žฅ)
credhound --path ~ --format html -o report.html

# JSON (ํ”„๋กœ๊ทธ๋ž˜๋ฐ์  ์†Œ๋น„)
credhound --path ~ --format json -o results.json

# SARIF 2.1.0 (GitHub Code Scanning ์—ฐ๋™)
credhound --path ~ --format sarif -o results.sarif

# ์ฝ˜์†” (๊ธฐ๋ณธ)
credhound --path ~

CI/CD ํŒŒ์ดํ”„๋ผ์ธ

# CI ๋ชจ๋“œ (๋น„๋Œ€ํ™”ํ˜•, exit code ๋ฐ˜ํ™˜)
credhound --path . --ci --severity HIGH
# exit 0 = clean, exit 1 = findings, exit 2 = error

# SARIF + CI
credhound --path . --ci --format sarif -o results.sarif

# Pre-commit ํ›… ์„ค์น˜
credhound --install-hook --path .

์ธ๋ผ์ธ ํ—ˆ์šฉ๋ชฉ๋ก

False positive๋ฅผ ์ฝ”๋“œ์—์„œ ์ง์ ‘ ์ œ์™ธํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค:

API_KEY = "some_value"  # credhound:ignore
PASSWORD = "test123"    # pragma: allowlist secret

์ „์ฒด ์˜ต์…˜

์˜ต์…˜ ์„ค๋ช… ๊ธฐ๋ณธ๊ฐ’
--path, -p ์Šค์บ” ๊ฒฝ๋กœ ์ธํ„ฐ๋ž™ํ‹ฐ๋ธŒ ์ž…๋ ฅ
--format, -f ์ถœ๋ ฅ ํ˜•์‹ (console/json/sarif/html) console
--output, -o ๊ฒฐ๊ณผ ์ €์žฅ ๊ฒฝ๋กœ -
--severity, -s ์ตœ์†Œ ์‹ฌ๊ฐ๋„ (CRITICAL/HIGH/MEDIUM/LOW) LOW
--parallel ๋ณ‘๋ ฌ ์ฒ˜๋ฆฌ ํ™œ์„ฑํ™” OFF
--ci CI ๋ชจ๋“œ (๋น„๋Œ€ํ™”ํ˜•) OFF
--unmask credential ๋งˆ์Šคํ‚น ํ•ด์ œ ๋งˆ์Šคํ‚น ON
--group ๊ฐ™์€ credential ๊ทธ๋ฃนํ•‘ OFF
--cache mtime ๊ธฐ๋ฐ˜ ์บ์‹œ (๋ณ€๊ฒฝ ํŒŒ์ผ๋งŒ ์Šค์บ”) OFF
--incremental Git ๋ณ€๊ฒฝ ํŒŒ์ผ๋งŒ ์Šค์บ” OFF
--no-entropy ์—”ํŠธ๋กœํ”ผ ๋ถ„์„ ๋น„ํ™œ์„ฑํ™” ON
--baseline baseline ํŒŒ์ผ ๊ฒฝ๋กœ .credscan-baseline.json
--update-baseline ์ธํ„ฐ๋ž™ํ‹ฐ๋ธŒ baseline ์—…๋ฐ์ดํŠธ -
--install-hook Pre-commit ํ›… ์„ค์น˜ -
--config ์„ค์ • ํŒŒ์ผ ๊ฒฝ๋กœ config.yaml
--rules ๊ทœ์น™ ํŒŒ์ผ ๊ฒฝ๋กœ rules.yaml
--verbose, -v ์ƒ์„ธ ๋กœ๊ทธ ์ถœ๋ ฅ OFF

์„ค์ • ์ปค์Šคํ„ฐ๋งˆ์ด์ง•

config.yaml ์˜†์— config.local.yaml์„ ๋งŒ๋“ค๋ฉด ์ž๋™์œผ๋กœ ๋ณ‘ํ•ฉ๋ฉ๋‹ˆ๋‹ค:

# config.local.yaml (๊ฐœ์ธ ํ™˜๊ฒฝ ์ „์šฉ, .gitignore์— ์ถ”๊ฐ€)
exclude_dirs:
  - .oh-my-zsh
  - my-large-folder
exclude_patterns:
  - ".*๋‚ด_ํŠน์ •_ํŒŒ์ผ.*"
  • ๋ฆฌ์ŠคํŠธ ๊ฐ’์€ ๊ธฐ์กด์— ํ•ฉ์ณ์ง€๊ณ , ๋‹จ์ผ ๊ฐ’์€ ๋ฎ์–ด์”๋‹ˆ๋‹ค
  • config.yaml์€ ์ˆ˜์ •ํ•˜์ง€ ๋งˆ์„ธ์š” โ€” ์—…๋ฐ์ดํŠธ ์‹œ ์ดˆ๊ธฐํ™”๋ฉ๋‹ˆ๋‹ค

ํƒ์ง€ ๊ทœ์น™ (29๊ฐœ)

์นดํ…Œ๊ณ ๋ฆฌ ๊ทœ์น™ ์‹ฌ๊ฐ๋„
AWS Access Key (AKIA), Secret Key, Session Token CRITICAL
Private Key RSA, DSA, EC, OPENSSH, PGP CRITICAL
HashiCorp Vault Token (hvs.) CRITICAL
GitHub Personal/OAuth/Server Token (ghp_, gho_, ghs_) HIGH
Slack Token (xoxb/xoxp), Webhook HIGH
Azure Storage Connection String HIGH
Stripe Secret/Publishable/Restricted Key HIGH
Twilio API Key, Account SID HIGH
SendGrid API Key (SG.) HIGH
GitLab Personal Access Token (glpat-) HIGH
Shopify API Token (shpat_, shpss_) HIGH
Password ํ•˜๋“œ์ฝ”๋”ฉ๋œ ํŒจ์Šค์›Œ๋“œ, URL ๋‚ด ํŒจ์Šค์›Œ๋“œ HIGH
Google API Key (AIza) MEDIUM
JWT JSON Web Token (eyJ) MEDIUM
Database MongoDB, PostgreSQL, MySQL URL MEDIUM
Telegram Bot Token MEDIUM
Firebase Database URL MEDIUM
Generic API Key, Encryption Key MEDIUM/HIGH
Entropy ๊ณ ์—”ํŠธ๋กœํ”ผ ๋ฌธ์ž์—ด LOW

๊ทœ์ • ์ค€์ˆ˜

ํ‘œ์ค€ ์ค€์ˆ˜์œจ
OWASP Secrets Management 95%
SARIF 2.1.0 (OASIS) 100%
CWE-798 / CWE-321 100%
NIST SP 800-53 Rev 5 100%
PCI DSS v4.0 100%

์ฐธ๊ณ  ๊ธฐ์ค€

ํ…Œ์ŠคํŠธ

python -m unittest test_scanner -v
# 33 tests, 0.5s

๋ผ์ด์„ ์Šค

MIT License โ€” LICENSE ์ฐธ์กฐ

๋ฉด์ฑ…์กฐํ•ญ

๋ณธ ๋„๊ตฌ๋Š” "์žˆ๋Š” ๊ทธ๋Œ€๋กœ(AS IS)" ์ œ๊ณต๋ฉ๋‹ˆ๋‹ค. ์ƒ์„ธ ๋‚ด์šฉ์€ DISCLAIMER.md๋ฅผ ์ฐธ์กฐํ•˜์„ธ์š”.

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

credhound-2.8.1.tar.gz (32.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

credhound-2.8.1-py3-none-any.whl (29.3 kB view details)

Uploaded Python 3

File details

Details for the file credhound-2.8.1.tar.gz.

File metadata

  • Download URL: credhound-2.8.1.tar.gz
  • Upload date:
  • Size: 32.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for credhound-2.8.1.tar.gz
Algorithm Hash digest
SHA256 ec587f5c25d8363a0ddd185bd061c91d9f474462b0620618de172717ecaa6343
MD5 ffbebd79aa2419beca04c027b710555e
BLAKE2b-256 67e5f8babf74f526070145b0dd2b8eea9a8efeffc5d8a8aac746ddcf5968229c

See more details on using hashes here.

Provenance

The following attestation bundles were made for credhound-2.8.1.tar.gz:

Publisher: publish.yml on milv0/credhound

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file credhound-2.8.1-py3-none-any.whl.

File metadata

  • Download URL: credhound-2.8.1-py3-none-any.whl
  • Upload date:
  • Size: 29.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for credhound-2.8.1-py3-none-any.whl
Algorithm Hash digest
SHA256 235bcf29f72f261b599e3df0a5bb1f57cac1a5e53d9e92254131ab33e5f38447
MD5 92ffb80536123aebdc5bbd9f90d48c92
BLAKE2b-256 b3447cc1f6cf5e4686c7a107c60a0fd71520ddf7f35108992a8ef8a757eef4b3

See more details on using hashes here.

Provenance

The following attestation bundles were made for credhound-2.8.1-py3-none-any.whl:

Publisher: publish.yml on milv0/credhound

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page