Skip to main content

A CLI tool to search, clean, and verify sensitive info on GitHub.

Project description

Hub Search

A powerful Python CLI tool to detect, extract, and verify sensitive information (like API keys) from GitHub.

Features

  • Search: Query GitHub Code Search API with enumeration (a-z0-9) and pagination support.
  • Clean: Extract specific patterns (e.g., sk-xxxxxxxx) from raw search result files.
  • Verify: Validate extracted DashScope/OpenAI-compatible API keys by testing them against the live API.

Installation

pip install hub-search

Configuration

Set your GitHub Token (required for search rate limits):

export GITHUB_TOKEN='your_github_token'

Usage

1. Search

Search for keys using enumeration mode.

hub-search search "DASHSCOPE_API_KEY=sk-" --enum --limit 100

2. Clean

Extract keys from the search results directory.

hub-search clean 202512271649 keys.txt

3. Verify

Validate extracted keys.

hub-search verify keys.txt --output valid.txt --threads 10

4. Automated Task

Run the entire workflow (Search -> Clean -> Verify) in one go.

# Automatically creates .hub-search directory and manages results
hub-search task "DASHSCOPE_API_KEY=sk-" --limit 100

Creates a timestamped directory inside .hub-search/ containing raw results, clean keys, and valid keys.

Token Permissions

  • Public Search: No scopes required (Classic Token).
  • Private Search: repo scope required.

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

hub_search-0.1.2.tar.gz (7.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

hub_search-0.1.2-py3-none-any.whl (9.6 kB view details)

Uploaded Python 3

File details

Details for the file hub_search-0.1.2.tar.gz.

File metadata

  • Download URL: hub_search-0.1.2.tar.gz
  • Upload date:
  • Size: 7.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.14

File hashes

Hashes for hub_search-0.1.2.tar.gz
Algorithm Hash digest
SHA256 7d89bb1f9b17a30d83560cdc199b4a8c6410740a28df8854d396330d34744ba0
MD5 a6f0d8b037063ab85d7aef2083f9347e
BLAKE2b-256 2fbebea722131f343ecc4279747ad6e41ab7e7bf3fc1e35c641a478f0be1c086

See more details on using hashes here.

File details

Details for the file hub_search-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: hub_search-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 9.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.14

File hashes

Hashes for hub_search-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 b390ba127c0f1625a9ec07ee2e2bc92e105fff4d199819b203ed4bb7df151e8e
MD5 10639eda3f7dc7a02fcca87cd38a2080
BLAKE2b-256 8199af88d3446952244ce2ff01f5d0eed89ab835d938627f1efe970ff8d6cad4

See more details on using hashes here.

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