Skip to main content

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

Project description

๐Ÿ• CredHound

PyPI version License: MIT

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

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

  • 30๊ฐœ ํƒ์ง€ ๊ทœ์น™ โ€” 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

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

์นดํ…Œ๊ณ ๋ฆฌ ๊ทœ์น™ ์‹ฌ๊ฐ๋„
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.2.1.tar.gz (26.3 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.2.1-py3-none-any.whl (27.2 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for credhound-2.2.1.tar.gz
Algorithm Hash digest
SHA256 6ae9e59139d94a44eda4296be0411141a98d8cdcb5d2bc9f93f546ed4e8bfe1b
MD5 9ac212abd300d561cbea0bd382ce08cf
BLAKE2b-256 eb6e13f290300158fe65a3cc59cc4ded0df3b80a2b25f5e59357931d0214a35c

See more details on using hashes here.

Provenance

The following attestation bundles were made for credhound-2.2.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.2.1-py3-none-any.whl.

File metadata

  • Download URL: credhound-2.2.1-py3-none-any.whl
  • Upload date:
  • Size: 27.2 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.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e0daa6cf795361a2dbab0ac1a9dce5206fc5e7208f6c40749d15781ebc2eabea
MD5 d5619ff2cdf3b166b25caf3400ab29e0
BLAKE2b-256 86a4b0c653fc4f58798df7681532d95a4d645e941520ce90551c9fa4b96c5b04

See more details on using hashes here.

Provenance

The following attestation bundles were made for credhound-2.2.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