Skip to content

feat: add offline repository scanning - #72

Merged
techgaun merged 1 commit into
mainfrom
feat/offline-repository-scanning
Sep 15, 2026
Merged

techgaun merged 1 commit into
mainfrom
feat/offline-repository-scanning

Conversation

@techgaun

Copy link
Copy Markdown
Owner

Summary

  • add --local PATH for scanning cloned repositories, source trees, or individual files without GitHub API access
  • use Git-tracked and non-ignored files when possible, with a dependency-free filesystem fallback
  • translate the project dictionaries into local predicates supporting quoted text, OR, NOT, filename:, path:, extension:, and common language: qualifiers
  • reuse text, CSV, JSON, and JSONL result writers for local findings
  • include matching line snippets, relative paths, file URLs, and local file counts
  • skip binary files, symlinks, oversized files, and the scanner output file
  • add --max-file-size with a 1 MB default
  • document offline usage and current working-tree scope

Closes #22. Git history scanning remains a possible follow-up; the original issue described it as optional.

Verification

  • python3 -m unittest discover -s tests -v (35 tests)
  • parsed all 186 bundled dorks successfully
  • python3 -m py_compile github_dorks/local.py github_dorks/cli.py
  • git diff --check
  • built the Python 3.12 Docker image
  • ran github-dorks --local /src --category ai --format jsonl --quiet in the built image

@techgaun
techgaun merged commit 16dc173 into main Sep 15, 2026
11 checks passed
@techgaun
techgaun deleted the feat/offline-repository-scanning branch September 15, 2026 08:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

offline cloned repository scanning

1 participant