Skip to main content

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

Project description

๐Ÿ• CredHound

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

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

  • 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 ํŒŒ์ผ๋กœ ์˜คํƒ ์ œ์™ธ
  • ์„ค์ • ๋ถ„๋ฆฌ โ€” ๊ธ€๋กœ๋ฒŒ(config.yaml) + ๊ฐœ์ธ(config.local.yaml) ์ž๋™ ๋ณ‘ํ•ฉ

์„ค์น˜

# ๋กœ์ปฌ ์„ค์น˜
pip install -e .

# ์ดํ›„ ์–ด๋””์„œ๋“ 
credhound --path ~ --parallel --format html -o report.html

๋น ๋ฅธ ์‹œ์ž‘

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

# ๊ฒฝ๋กœ ์ง€์ •
python main_v2.py --path ~/project

# ๋ณ‘๋ ฌ + HIGH ์ด์ƒ๋งŒ
python main_v2.py --path ~ --parallel --severity HIGH

์ถœ๋ ฅ ํ˜•์‹

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

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

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

# ์ฝ˜์†” (๊ธฐ๋ณธ)
python main_v2.py --path ~

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

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

# SARIF + CI
python main_v2.py --path . --ci --format sarif -o results.sarif

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

์ „์ฒด ์˜ต์…˜

์˜ต์…˜ ์„ค๋ช… ๊ธฐ๋ณธ๊ฐ’
--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 (๊ธ€๋กœ๋ฒŒ โ€” ๋ชจ๋“  ์‚ฌ์šฉ์ž ๊ณตํ†ต)

scan:
  max_workers: 4
  max_file_size: 10485760  # 10MB
exclude_dirs:
  - node_modules
  - .git
  - __pycache__
  # ...

config.local.yaml (๊ฐœ์ธ ํ™˜๊ฒฝ โ€” .gitignore์— ์ถ”๊ฐ€)

# ๊ธ€๋กœ๋ฒŒ์— ๋ณ‘ํ•ฉ๋จ (๋ฆฌ์ŠคํŠธ๋Š” ํ•ฉ์นจ, ๊ฐ’์€ ๋ฎ์–ด์“ฐ๊ธฐ)
exclude_dirs:
  - .oh-my-zsh
exclude_patterns:
  - ".*๋‚ด_ํŠน์ •_ํŒŒ์ผ.*"

ํƒ์ง€ ๊ทœ์น™ (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

์ฐธ๊ณ  ๊ธฐ์ค€

ํ…Œ์ŠคํŠธ

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

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.1.0.tar.gz (20.6 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.1.0-py3-none-any.whl (22.3 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for credhound-2.1.0.tar.gz
Algorithm Hash digest
SHA256 bae5beaa904fbf7b443791669b6c6ddfcf4356bf36833d5f44f21b364e336626
MD5 c83cf093381f0b0a114ddc52ee8ff6b5
BLAKE2b-256 7a6f300ced8fa7142de8931f8d8fb66ea7ae5dbaf54d944fea18d8c4f0e5424d

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: credhound-2.1.0-py3-none-any.whl
  • Upload date:
  • Size: 22.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.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 66ea0670f67a952f7200e4ba38adb23c46540eec00ad0fe9d02a940afea0a7f3
MD5 b413dbcd97d9ca0e949037e931af0974
BLAKE2b-256 8c2b2413b9c05c6632f90db3c05321088dcb0b7e18d6692c511d6c461cc9e8fc

See more details on using hashes here.

Provenance

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