{"id":50311551,"url":"https://github.com/stratus-security/gitrekt","last_synced_at":"2026-05-28T21:02:17.806Z","repository":{"id":355518167,"uuid":"1226208784","full_name":"Stratus-Security/GitRekt","owner":"Stratus-Security","description":"GitRekt is an (optionally) AI enabled tool for security professionals to find exposed secrets, credentials or organization information on GitHub.","archived":false,"fork":false,"pushed_at":"2026-05-04T01:35:21.000Z","size":80817,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-05-04T03:28:38.692Z","etag":null,"topics":["ai","ai-agents","penetration-testing","security","security-tools"],"latest_commit_sha":null,"homepage":"https://www.stratussecurity.com","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Stratus-Security.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-01T05:17:46.000Z","updated_at":"2026-05-04T01:33:41.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/Stratus-Security/GitRekt","commit_stats":null,"previous_names":["stratus-security/gitrekt"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/Stratus-Security/GitRekt","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Stratus-Security%2FGitRekt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Stratus-Security%2FGitRekt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Stratus-Security%2FGitRekt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Stratus-Security%2FGitRekt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Stratus-Security","download_url":"https://codeload.github.com/Stratus-Security/GitRekt/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Stratus-Security%2FGitRekt/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33626142,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-28T02:00:06.440Z","response_time":99,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","ai-agents","penetration-testing","security","security-tools"],"created_at":"2026-05-28T21:02:15.758Z","updated_at":"2026-05-28T21:02:17.800Z","avatar_url":"https://github.com/Stratus-Security.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GitRekt\n\nGitRekt helps you triage GitHub code-search results for exposed secrets, credentials, sensitive configuration, and high-risk personal data across public or authorized repositories.\n\nGitHub code search is powerful, but raw results are noisy: the same snippet can appear in many generated files, old exports, backups, fixtures, docs, or false-positive examples. GitRekt adds the workflow layer around search: direct file links, line resolution, duplicate reduction, rate-limit handling, optional GitHub App auth, and optional AI review that can explain why a match is worth looking at.\n\n\u003e GitRekt is a triage tool. Treat findings as leads to review, not proof that a secret is valid or exploitable.\n\n\u003cimg src=\"demo.gif\" alt=\"GitRekt demo\" width=\"1440\"\u003e\nThe above example is a useful use case when penetration testing. Simply search the customers domain (e.g. @domain.com) with AI and agent mode enabled for best results as seen here. This often finds valid credentials or leaked data for individual companies.\n\n## When GitRekt Helps\n\nUse GitRekt when you already have a signal you want to investigate across GitHub:\n\n- leaked-looking passwords, tokens, API keys, client secrets, private keys, or connection strings,\n- company domains, internal hostnames, product names, customer names, or project codenames,\n- backup files, config files, `.env` files, CSV exports, logs, or migration dumps,\n- broad PII searches where you need to separate useful findings from ordinary public contact data,\n- periodic checks for accidental exposure across your own repositories or repositories you are authorized to review.\n\n## How It Works\n\nGitRekt searches GitHub gists and repositories, streams matches as they are found, and prints readable results with direct GitHub links. By default it searches `gists,repos` in that order. Gists are discovered through GitHub's gist search results, then GitRekt fetches matching gist files for snippets, line anchors, and AI context. When AI validation is enabled, each result is classified as `likely`, `possible`, or `none` so you can filter out obvious noise.\n\nAgent mode goes further: before classifying a match, GitRekt gathers repository context such as the matched file, high-signal companion files, and suspicious paths from the repository tree. This helps catch cases where the first match is only a clue, but a nearby `.env`, config backup, CSV export, or token-bearing file is the real issue.\n\n## What It Is Not\n\nGitRekt does not validate whether a credential still works, exploit findings, or replace secret-scanning in CI. It is best used as a discovery and triage layer for researchers, security teams, and maintainers who need to review GitHub search results quickly and consistently.\n\n## Download\n\nDownload prebuilt binaries from the [GitHub Releases page](https://github.com/Stratus-Security/GitRekt/releases).\n\nAfter extracting on Linux or macOS, make the binary executable if needed:\n\n```bash\nchmod +x GitRekt\n```\n\n## Basic Usage\n\nSearch for a simple string:\n\n```bash\nGitRekt --query \"Password1\"\n```\n\nSearch for multiple terms in one run:\n\n```bash\nGitRekt --query \"Password1\" --query \"Password2\" --query \"@example.com\"\n```\n\nSearch only repositories:\n\n```bash\nGitRekt --query \"Password1\" --sources repos\n```\n\nChoose ordered sources explicitly:\n\n```bash\nGitRekt --query \"Password1\" --sources repos,gists\n```\n\nWrite output to a file:\n\n```bash\nGitRekt --query \"Password1\" --output results.txt\n```\n\nUse advanced GitHub code-search syntax exactly as written:\n\n```bash\nGitRekt --advanced --query \"\\\"Password1\\\" language:C# path:/src/\"\n```\n\n## GitHub Authentication\n\nUnauthenticated GitHub searches are very limited. For realistic use, authenticate.\n\n### Personal Access Token\n\nA fine-grained personal access token is the simplest option for individual use. Create one from [GitHub's personal access token settings](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token):\n\n1. Go to GitHub: **Settings** -\u003e **Developer settings** -\u003e **Personal access tokens** -\u003e **Fine-grained tokens**.\n2. Click **Generate new token**.\n3. Choose the owner and repositories GitRekt should be allowed to search.\n4. Set repository permissions:\n   - **Contents**: **Read-only**\n   - **Metadata**: **Read-only** if GitHub shows it as configurable; GitHub often includes metadata access automatically.\n5. Generate the token and store it somewhere safe. GitHub only shows it once.\n\nSet an environment variable:\n\n```bash\nexport GITHUB_ACCESS_TOKEN=\"github_pat_...\"\nGitRekt --query \"Password1\"\n```\n\nOr pass it directly:\n\n```bash\nGitRekt --token \"github_pat_...\" --query \"Password1\"\n```\n\nIf you must use a classic token, use the smallest scope that works for your target repositories. Private repository searches generally require the broader `repo` scope.\n\n### GitHub App\n\nGitHub App auth is a better fit for longer scans because installation tokens can be refreshed and scoped to the installed account.\n\nCreate the app from [GitHub's GitHub App registration page](https://docs.github.com/en/apps/creating-github-apps/registering-a-github-app):\n\n1. Go to GitHub: **Settings** -\u003e **Developer settings** -\u003e **GitHub Apps** -\u003e **New GitHub App**. For an organization-owned app, use the organization's settings instead.\n2. Give it a clear name, such as `GitRekt Scanner`.\n3. Set **Homepage URL** to your project, company, or repository URL.\n4. Disable **Active** webhooks unless you need them for something else. GitRekt does not need webhooks.\n5. Set repository permissions:\n   - **Contents**: **Read-only**\n   - **Metadata**: **Read-only**\n6. Do not subscribe to webhook events.\n7. Choose where the app can be installed:\n   - **Only on this account** for personal/internal use.\n   - **Any account** if other organizations should install it.\n8. Click **Create GitHub App**.\n9. Copy the **App ID** from the app's **General** page.\n10. Under **Private keys**, click **Generate a private key** and download the `.pem` file.\n11. Click **Install App** and install it on the account or repositories GitRekt should scan.\n\nIf the app has multiple installations, copy the installation ID from the installed app URL. It is the numeric ID in a URL like `https://github.com/settings/installations/12345678`.\n\nSet:\n\n```bash\nexport GITHUB_APP_ID=\"12345\"\nexport GITHUB_APP_INSTALLATION_ID=\"67890\"\nexport GITHUB_APP_PRIVATE_KEY_PATH=\"/path/to/app.private-key.pem\"\n\nGitRekt --query \"Password1\"\n```\n\nIf the app has exactly one installation, `GITHUB_APP_INSTALLATION_ID` is optional. GitRekt can also pick up exactly one `*.private-key.pem` file from the current directory when `GITHUB_APP_ID` is set.\n\nGitHub App installation tokens are short-lived; GitRekt creates and refreshes them from the app ID, installation ID, and private key. The app does not bypass GitHub code-search rate limits, but it gives cleaner per-installation scoping and avoids long-lived user credentials.\n\nEquivalent CLI flags:\n\n```bash\nGitRekt \\\n  --github-app-id 12345 \\\n  --github-app-installation-id 67890 \\\n  --github-app-private-key-path app.private-key.pem \\\n  --query \"Password1\"\n```\n\n## AI Validation\n\nAI validation can classify each displayed result as:\n\n- `likely`\n- `possible`\n- `none`\n\nYou can filter the output by verdict, which includes more sensitive verdicts too:\n\n```bash\nGitRekt --query \"Password1\" --ai --ai-model llama3.2 --ai-verdict possible\n```\nThis example command shows sensitive and potentially sensitive results but hides any that aren't considered sensitive by the AI.\n\nUse strict mode when broad PII-style searches produce too many ordinary business contact matches:\n\n```bash\nGitRekt --query \"@example.com\" --ai --strict --ai-model llama3.2 --ai-verdict possible\n```\n\nStrict mode treats marketing lists, public staff directories, and ordinary work contact details such as name, company, email, job title, and office phone as low signal. It still keeps higher-impact findings such as credentials, tokens, private keys, home addresses, government IDs, dates of birth, salary or compensation data, financial data, medical data, personal account data, and private customer records.\n\n### Agent Mode\n\nAgent mode gathers same-repository context before validation. It works with every AI by adding matched file excerpts and high-signal repository candidates before asking the model to classify the result.\nThe agent also looks for other sensitive files within the repo, automagically finding secrets, PII, etc that may be leaked relating to a matching keyword. For gist results, agent mode is limited to the matched gist and other files in that same gist.\n\n\u003e Note: This mode uses more tokens, plain AI mode simply classifies the context from GitHub search.\n\n```bash\nGitRekt --query \"Password1\" --ai-agent --ai-model llama3.2 --ai-verdict possible\n```\n\n### Ollama\n\nOllama is the default AI provider.\n\n```bash\nGitRekt --query \"Password1\" --ai --ai-model llama3.2\n```\n\n### Gemini\n\n```bash\nexport GEMINI_API_KEY=\"...\"\n\nGitRekt --query \"Password1\" --ai-provider gemini --ai-model gemini-2.5-flash\n```\n\nYou can also use `GOOGLE_API_KEY`, `--ai-api-key`, or `--gemini-api-key`.\n\n### OpenAI\n\n```bash\nexport OPENAI_API_KEY=\"...\"\n\nGitRekt --query \"Password1\" --ai-provider openai --ai-model gpt-5-mini\n```\n\nYou can also use `--ai-api-key` or `--openai-api-key`.\n\n## Rate Limits\n\nGitHub code search has a small rate-limit bucket compared with many other GitHub APIs. GitRekt tries to reduce unnecessary API use by:\n\n- sizing repository-scoped searches to the requested limit,\n- caching fetched file contents,\n- caching repository trees,\n- using repository tree inspection in agent mode instead of repeated broad code searches,\n- batching same-repository AI validation work,\n- avoiding duplicate AI validation for identical file snippets,\n- pacing requests when GitHub exposes rate-limit reset headers,\n- refreshing GitHub App installation tokens during long runs.\n\nFor heavier use, prefer a GitHub App installed per customer or organization. Avoid running many customers through one shared GitHub credential.\n\n## Acknowledgements\n\nGitRekt was inspired in part by Bishop Fox's [GitGot](https://github.com/BishopFox/GitGot), a long-standing GitHub secret-search tool.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstratus-security%2Fgitrekt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstratus-security%2Fgitrekt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstratus-security%2Fgitrekt/lists"}