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.11.tar.gz (34.1 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.11-py3-none-any.whl (30.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: credhound-2.8.11.tar.gz
  • Upload date:
  • Size: 34.1 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.11.tar.gz
Algorithm Hash digest
SHA256 15895ae3ffa1eaf92f3386855f447fdebd566ce99ba33b742667965f2683db07
MD5 63c02caab2fc7bae1b8f18a393e1a60e
BLAKE2b-256 3c798d849d7f3d56d3bebeace9501c6382c6fec2e1a5413267c0dea40090d795

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: credhound-2.8.11-py3-none-any.whl
  • Upload date:
  • Size: 30.4 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.11-py3-none-any.whl
Algorithm Hash digest
SHA256 e3aa40d6da6676c1683821000e44e2c5cb429ed6cdebe260f7132df5806d6319
MD5 d1141c7b64782e25a91c7e975972875d
BLAKE2b-256 fb26e1ba11cb54470ae5249f7ecda9f4791479ce9a9647bada8cede2d74846b1

See more details on using hashes here.

Provenance

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