Query Command
The query command lets you review stored scan results, findings, attack data, and harvested credentials from the local SQLite database without re-running scans.
Every search, enumerate, attack, and pivot command automatically persists results. The query command provides read-only access to this data.
Basic Usage
Section titled “Basic Usage”gogatoz query <subcommand> [options]No GitLab authentication is required. This command works entirely against the local database.
Subcommands
Section titled “Subcommands”| Subcommand | Description |
|---|---|
sessions |
List all scan sessions with timestamps and project counts |
projects |
List all projects discovered across all sessions |
findings |
Show scan findings (optionally filtered by session) |
attacks |
Show attack results (commit-ci, secrets, etc.) |
secrets |
Show exfiltrated secrets from --secrets attacks |
credentials |
Show harvested credentials from pivot operations |
exfil |
Show exfiltrated data from --ror-listen callbacks |
Options
Section titled “Options”--dbSQLite database path (default:~/.local/share/gogatoz/results.db)--formatOutput format:textorjson(default:text)--sessionFilter by session ID (default: all sessions)--limitMax results to return (default: unlimited)--redactedMask secret values in output (default: false)
Examples
Section titled “Examples”List all scan sessions
Section titled “List all scan sessions”gogatoz query sessionsShow findings for a specific session
Section titled “Show findings for a specific session”gogatoz query findings --session 1Show all attack results
Section titled “Show all attack results”gogatoz query attacksShow exfiltrated secrets (redacted)
Section titled “Show exfiltrated secrets (redacted)”gogatoz query secrets --redactedShow pivoted credentials
Section titled “Show pivoted credentials”gogatoz query credentialsShow ROR listener callback data
Section titled “Show ROR listener callback data”gogatoz query exfilReview an engagement
Section titled “Review an engagement”# What sessions have I run?gogatoz query sessions
# What did session 3 find?gogatoz query findings --session 3 --format json | \ jq 'group_by(.severity) | map({severity: .[0].severity, count: length})'
# What credentials did the pivot harvest?gogatoz query credentials --format jsonExport for reporting
Section titled “Export for reporting”# All findings as JSON for post-processinggogatoz query findings --format json > all-findings.json
# Re-generate report from stored datagogatoz report --db ~/.local/share/gogatoz/results.db --session 1 --output report.html- The database is created automatically on first use by any command that persists results.
- WAL mode is enabled on the SQLite database for concurrent read access.
- The
--redactedflag masks secret values but preserves variable names for context. - Use
GOGATOZ_DBenvironment variable to override the default database path globally.