Skip to content
KitploitKITPLOIT
도구블로그
제출
도구블로그
제출

해킹, 침투 테스트 및 사이버 보안 도구를 당신의 보안 무기고에!

Kitploit은 해킹, 사이버 보안 및 침투 테스트 도구 디렉토리입니다. 최신 프로젝트 업데이트를 발견하여 취약점을 찾고, 시스템을 분석하고, 테스트를 자동화하고, 보안을 강화하세요.

··피드·문의·개인정보·© 2026 Kitploit

도구 디렉토리

카테고리

모든 카테고리 보기
Loading categories
dbslice — 프로덕션 데이터베이스의 일부를 추출하여 로컬에서 버그를 재현하세요. dbslice를 레코드에 지정하면 외래 키를 따라가며 완전하고 가져올 수 있는 하위 집합을 제공합니다. | Kitploit
도구/GitHubGitHub/nabroleonx/dbslice
General Purpose UtilitiesConfiguration AuditingData RecoveryDevSecOpsPrivacyDatabase Security
GitHubnabroleonx/dbslice

dbslice

프로덕션 데이터베이스의 일부를 추출하여 로컬에서 버그를 재현하세요. dbslice를 레코드에 지정하면 외래 키를 따라가며 완전하고 가져올 수 있는 하위 집합을 제공합니다.

저장소 보기
141632개월 전Kitploit 검토 완료

인기

모두 보기 →

커뮤니티에서 가장 많이 사용되는 도구를 찾아보세요.

모든 도구 탐색

도구 컬렉션을 둘러보세요

모든 도구 보기 →
웹사이트
공유

dbslice 로고

dbslice

PyPI version License: MIT Python 3.10+

로컬 개발 및 디버깅을 위해 최소한의 참조 무결성을 유지하는 데이터베이스 하위 집합을 추출합니다.

문제

전체 프로덕션 데이터베이스를 로컬 머신으로 복사하는 것은 불가능합니다. 하지만 버그 재현을 위해서는 종종 버그를 유발한 정확한 데이터가 필요합니다. dbslice는 외래 키 관계를 따라가며 참조 무결성을 보장하여 필요한 레코드만 추출함으로써 이 문제를 해결합니다.

dbslice — 시드에서 하위 집합으로

빠른 시작

root@kitploit:~
# Install globally
uv tool install dbslice   # or: pip install dbslice

# Extract an order and all related records
dbslice extract postgres://localhost/myapp --seed "orders.id=12345" > subset.sql

# Import into local database
psql -d localdb < subset.sql

기능

  • 제로 구성 시작 -- 스키마를 자동으로 분석하며 데이터 모델 파일이 필요 없습니다.
  • 단일 명령어 -- 한 번의 CLI 호출로 완전한 데이터 하위 집합을 추출합니다.
  • 기본적으로 안전 -- 민감한 필드(이메일, 전화번호, 주민등록번호 등)를 자동으로 탐지하고 익명화합니다.
  • 규정 준수 프로필 -- 2단계 PII 스캐닝을 제공하는 GDPR, HIPAA Safe Harbor, PCI-DSS 프로필이 내장되어 있습니다.
  • 컬럼 매핑 UI -- 로컬 브라우저 UI를 통해 시각적으로 컬럼을 매핑하고, 규정 준수 프로필을 적용하며, 설정을 내보낼 수 있습니다.
  • 다양한 출력 형식 -- SQL, JSON, CSV 지원
  • 스트리밍 -- 대규모 데이터셋(10만 행 이상)을 메모리 효율적으로 추출합니다.
  • 가상 외래 키 -- Django GenericForeignKey 및 설정을 통한 암시적 관계를 지원합니다.
  • 설정 파일 -- 반복 가능한 추출을 위한 YAML 기반 설정
  • 검증 -- 추출된 데이터의 참조 무결성을 확인합니다.

데이터베이스 지원

데이터베이스상태
PostgreSQL완전 지원
MySQL계획됨 (아직 구현되지 않음)
SQLite계획됨 (아직 구현되지 않음)

설치

root@kitploit:~
# Install with uv (recommended)
uv add dbslice

# Try without installing
uvx dbslice --help

# Or with pip
pip install dbslice

사용법

기본 추출

root@kitploit:~
# Extract by primary key
dbslice extract postgres://user:pass@host:5432/db --seed "orders.id=12345"

# Extract with WHERE clause
dbslice extract postgres://localhost/db --seed "orders:status='failed' AND created_at > '2024-01-01'"

# Multiple seeds
dbslice extract postgres://localhost/db \
  --seed "orders.id=100" \
  --seed "orders.id=101"

탐색 제어

root@kitploit:~
# Limit depth (default: 3)
dbslice extract postgres://... --seed "orders.id=1" --depth 2

# Direction: up (parents only), down (children only), both (default)
dbslice extract postgres://... --seed "orders.id=1" --direction up

익명화

root@kitploit:~
# Auto-anonymize detected sensitive fields
dbslice extract postgres://... --seed "users.id=1" --anonymize

# Redact additional fields
dbslice extract postgres://... --seed "users.id=1" --anonymize --redact "audit_logs.ip_address"

컬럼 매핑 UI

로컬 브라우저 UI에서 시각적으로 컬럼을 매핑하고, 규정 준수 프로필을 적용하며, 바로 사용 가능한 설정을 생성할 수 있습니다.

root@kitploit:~
dbslice map postgres://localhost/myapp

# Custom port
dbslice map postgres://localhost/myapp --port 8888

# Also works with uvx (no install needed)
uvx dbslice map postgres://localhost/myapp
컬럼을 익명화 규칙에 매핑설정 생성 및 내보내기
컬럼 매핑생성된 설정

일회성 세션 토큰과 함께 127.0.0.1:9473에서 실행되며, 데이터가 로컬 머신을 벗어나지 않습니다. 한 번의 클릭으로 GDPR, HIPAA 또는 PCI-DSS 프로필을 적용하고, 마스킹될 내용을 검토한 후 YAML을 다운로드할 수 있습니다.

규정 준수 프로필

root@kitploit:~
# HIPAA Safe Harbor — auto-masks all 18 identifier types
dbslice extract postgres://... --seed "patients.id=1" --compliance hipaa --compliance-strict

# Multiple profiles + audit manifest
dbslice extract postgres://... --seed "users.id=1" --compliance gdpr --compliance pci-dss -f subset.sql
# Produces subset.sql + subset.manifest.json

출력 형식

root@kitploit:~
# SQL (default)
dbslice extract postgres://... --seed "orders.id=1" --output sql

# JSON fixtures
dbslice extract postgres://... --seed "orders.id=1" --output json --out-file fixtures/

# CSV
dbslice extract postgres://... --seed "orders.id=1" --output csv --out-file data/

가상 외래 키

데이터베이스 스키마에 정의되지 않은 관계(Django GenericForeignKey, 암시적 관계)를 처리합니다:

root@kitploit:~
# dbslice.yaml
database:
  url: postgres://localhost:5432/myapp

virtual_foreign_keys:
  - source_table: notifications
    source_columns: [object_id]
    target_table: orders
    description: "Generic FK to orders via ContentType"

  - source_table: audit_log
    source_columns: [user_id]
    target_table: users
    description: "Implicit FK without DB constraint"
root@kitploit:~
dbslice extract --config dbslice.yaml --seed "users.id=1"

스키마 확인

root@kitploit:~
dbslice inspect postgres://localhost/myapp

설정 파일

root@kitploit:~
# Generate config from database
dbslice init postgres://localhost/myapp --out-file dbslice.yaml

# Use config
dbslice extract --config dbslice.yaml --seed "orders.id=12345"

작동 방식

  1. 스키마 분석 -- 데이터베이스 스키마를 읽어 테이블과 외래 키 관계를 파악합니다.
  2. 탐색 -- 시드 레코드에서 시작하여 BFS 방식으로 외래 키 관계를 따라갑니다.
  3. 추출 -- 식별된 모든 레코드를 가져옵니다.
  4. 정렬 -- 올바른 INSERT 순서를 위해 테이블을 위상 정렬합니다.
  5. 출력 -- 적절한 이스케이프 처리를 적용하여 SQL/JSON/CSV를 생성합니다.

비교

dbslice는 가볍고 제로 구성의 Python 옵션으로, 1분 이내에 설치하고 추출할 수 있습니다.

개발

root@kitploit:~
git clone https://github.com/nabroleonx/dbslice.git
cd dbslice
uv sync --dev
uv run pytest

라이선스

MIT

도구 다운로드
기능dbsliceJailerGreenmaskslice-db
언어PythonJavaGoRuby
구성제로 구성모델 파일 필요구성 필요수동 YAML
설정 시간몇 초몇 시간중간중간
익명화내장 (Faker)플러그인 기반고급 변환기없음
규정 준수 프로필GDPR, HIPAA, PCI-DSS없음없음없음
컬럼 매핑 UI내장 (로컬)없음없음없음
PII 값 스캐닝2단계 (마스크 전/후)없음없음없음
하위 집합 추출FK 탐색FK 탐색제한적FK 탐색
출력 형식SQL, JSON, CSVSQL, XML, CSVSQLSQL만
순환 처리자동수동 설정해당 없음수동
스트리밍내장설정 가능내장없음
유지 관리활발활발활발중단됨