---
title: "overlane guard scan"
description: "Scan a file for credentials the way a push would be scanned"
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.overlane.app/llms.txt
> Use this file to discover all available pages before exploring further.

# overlane guard scan

{/* Generated by apps/docs/scripts/generate.mjs (CLI pages from the command registry in packages/cli). Do not edit; run `pnpm --filter @overlane/docs gen`. */}

Sends the text of a file to the secret scanner and reports the rule and line of each finding, never the matched text. Provider-prefixed keys block; generic high-entropy strings are reported only. Exits 6 when something would block.

## Usage

```sh
overlane guard scan --path PATH [--source push|task|evidence|log|memory|api]
```

## Flags

| Flag | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `--path` | string | yes |  | The file to scan |
| `--source` | one of `push`, `task`, `evidence`, `log`, `memory`, `api` | no | `push` | What the text would be: a push, task record, evidence, log or memory |

## Examples

```sh
overlane guard scan --path src/config.ts
overlane guard scan --path ci.log --source log --json
```

## Behavior

- Effect: `read` (changes nothing).
- Needs credentials: yes. Uses the network: yes.
- Supports `--dry-run`: no. Accepts `--force`: no.
- Machine-readable description: `overlane schema guard scan`.

## Result

With `--json` (the default when stdout is not a terminal) the command prints this JSON Schema's shape on stdout.

```json
{
  "type": "object",
  "properties": {
    "tenantId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 128,
      "pattern": "^[A-Za-z0-9][A-Za-z0-9_.:-]*$",
      "description": "tenant identifier"
    },
    "blocked": {
      "type": "boolean"
    },
    "findings": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "tenantId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[A-Za-z0-9][A-Za-z0-9_.:-]*$",
            "description": "tenant identifier"
          },
          "source": {
            "type": "string",
            "enum": [
              "push",
              "task",
              "evidence",
              "log",
              "memory",
              "api"
            ]
          },
          "rule": {
            "type": "string",
            "minLength": 1
          },
          "disposition": {
            "type": "string",
            "enum": [
              "blocked",
              "reported"
            ]
          },
          "path": {
            "type": "string"
          },
          "line": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "tenantId",
          "source",
          "rule",
          "disposition"
        ],
        "additionalProperties": false
      }
    }
  },
  "required": [
    "tenantId",
    "blocked",
    "findings"
  ],
  "additionalProperties": false
}
```

See [exit codes](/cli/#exit-codes) for the status the process returns.

Source: https://docs.overlane.app/cli/guard-scan/index.mdx
