# Secret scanning For `gitx scan`: 1. Perform a read-only scan of non-ignored working-tree files, staged content, commits reachable from `HEAD`, and locally available `origin/*` history. Do not fetch automatically; state that pushed-history results reflect the locally available remote-tracking refs. 2. Prefer an installed secret scanner such as Gitleaks or TruffleHog without installing tools or uploading repository content. When none is available, inspect filenames and content for likely API keys, access tokens, passwords, connection strings, private keys, credentials, tracked `.env` files, and other sensitive configuration. Distinguish real credentials from obvious placeholders and examples. 3. Classify each finding as `UNCOMMITTED`, `STAGED`, `COMMITTED LOCALLY`, or `PUSHED TO ORIGIN`. Use `PUSHED TO ORIGIN` only when the containing commit is reachable from a locally available `origin/*` ref. 4. Begin the report with a two-to-three sentence `Project summary` in plain language. State what the scan found, where it was exposed (current files, local commits, or `origin`), what that means for the project now, and the single most important next action. Do not lead with tool availability, scan mechanics, or a disclaimer. 5. Follow with `Security rating`, `What looks good`, `Problems found`, `Recommended actions`, and `Coverage and limitations`. Use the following shape when there are no credible findings: `No exposed credentials were found in the scanned project files or available Git history. Nothing needs immediate action. This result is limited by .` 6. Assign a security rating from `0–100` and a letter grade based on the most severe credible exposure: `100/A` for no credential findings in the scanned scope; `75/B` for sensitive files or configuration that should be reviewed but contains no credible credential; `50/C` for a credential that is uncommitted or staged; `25/D` for a credential committed only in local history; and `0/F` for a credential pushed to `origin`. If there are several findings, use the lowest applicable rating. State that this is a secret-exposure rating, not a complete application-security audit. 7. Under `What looks good`, name successful checks (for example, no credible credentials in the working tree, no tracked `.env` files, or no secrets found in the locally available `origin/*` history). Never claim the repository is secure; qualify positive results as limited to the scan's coverage. 8. Under `Problems found`, report every credible finding ordered by severity. For each, include severity, exposure class, credential type, file path, line or commit when available, why it is risky, and a recommended action. Redact every value; never print a complete credential or secret. 9. For a pushed credential, state prominently that it must be revoked or rotated immediately, and explain that deleting the file or making another commit does not invalidate it. Discuss history rewriting only when the user explicitly asks for remediation. 10. Under `Coverage and limitations`, state whether a dedicated scanner was used, which repository areas and refs were scanned, and that pushed-history results reflect only locally available remote-tracking refs because no fetch was performed. Keep this section last and express its practical consequence plainly (for example, `Newer commits on GitHub were not checked because this scan did not fetch first`). 11. Make no changes to files, the index, commits, branches, remotes, or history.