How gnomegl/gitslurp works
Main Components
a. Core Components:
• CLI Interface (Entry Point)
• GitHub API Client Module
• Scanner Module
• Models Layer
• Utils Layer
b. External Dependencies:
• GitHub API
• TruffleHog Patterns Integration
Component Organization
Top Level:
┌─ CLI Interface (main.go)
• Internal Modules
• GitHub Client
• Scanner
• Models
• Utils
Detailed Component Breakdown
a. GitHub Client Module (internal/github):
• Client Configuration
• API Handlers (commits, gists, org)
• Process Management
b. Scanner Module (internal/scanner):
• As a processing layer with:
• Links Scanner
• Patterns Scanner
• Secrets Scanner
c. Models Layer (internal/models):
• As a data structure layer
• To both GitHub and Scanner modules
Data Flow Representation
CLI Interface → GitHub Client → GitHub API
GitHub Client → Scanner Module
Scanner Module → Models Layer
Additional Details
Annotations for:
• Authentication flow
• Rate limiting handling
• Pattern matching rules
• Secret detection patterns
Technical Stack Indicators
Relevant technologies:
• Go 1.21+
• GitHub API v3
• TruffleHog Patterns