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

# secret_scanning_list_alerts

> List secret scanning alerts: which pattern matched, which provider, and whether the credential is still valid. The detected secret itself is never returned by this tool — it is dropped from the response whatever the request asked for, because triage does not need it. Requires administrator access.

<div className="tool-route"><span className="tool-row-method" data-method="GET">GET</span><code>{"https://api.github.com/repos/{owner}/{repo}/secret-scanning/alerts"}</code></div>

```python github_secret_scanning_list_alerts.py theme={null}
from charter.packs import github

result = await github.secret_scanning_list_alerts.ainvoke({"owner": ..., "repo": ...})
```

<Note>
  Requires `repo`, `read:user`. Pages by number: `page` with `per_page`.
</Note>

## Path parameters

<div className="reference-table">
  | Field                                                         | Type     | Description                                                                              |
  | ------------------------------------------------------------- | -------- | ---------------------------------------------------------------------------------------- |
  | `owner` <span className="required" title="required">\*</span> | `string` | The account owner of the repository. The name is not case sensitive.                     |
  | `repo` <span className="required" title="required">\*</span>  | `string` | The name of the repository without the `.git` extension. The name is not case sensitive. |
</div>

## Query parameters

<div className="reference-table">
  | Field                | Type                                                                                | Description                                                                                                                                                                           |
  | -------------------- | ----------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
  | `perPage`            | `integer`                                                                           | The number of results per page (max 100). Defaults to 30. <span className="field-constraints">≥ 1; ≤ 100; defaults to `30`</span>                                                     |
  | `page`               | `integer`                                                                           | The page number of the results to fetch. Defaults to 1. <span className="field-constraints">≥ 1; defaults to `1`</span>                                                               |
  | `state`              | [SecretScanningState](/charter/charter/packs/github/monitoring/objects#secretscanningstate) | Set to `open` or `resolved` to only list alerts in a specific state.                                                                                                                  |
  | `secretType`         | `string`                                                                            | A comma-separated list of secret types to return. All default secret patterns are returned when absent. Cannot be combined with `exclude_secret_types`.                               |
  | `excludeSecretTypes` | `string`                                                                            | A comma-separated list of secret types to exclude from the results. Cannot be combined with `secret_type`.                                                                            |
  | `resolution`         | `string`                                                                            | A comma-separated list of resolutions. Valid resolutions are `false_positive`, `wont_fix`, `revoked`, `pattern_edited`, `pattern_deleted` or `used_in_tests`.                         |
  | `assignee`           | `string`                                                                            | Filters alerts by assignee. Use `*` for all assigned alerts, `none` for unassigned, or a GitHub username.                                                                             |
  | `validity`           | `string`                                                                            | A comma-separated list of validities — whether GitHub could confirm the secret still works. Can be: `active`, `inactive`, `unknown`.                                                  |
  | `hideSecret`         | `boolean`                                                                           | Leave the detected secret value out of the response. Set this when the result is going into a model's context: triage needs the type, the location and the state, not the credential. |
  | `isPubliclyLeaked`   | `boolean`                                                                           | Only alerts for secrets that were leaked publicly.                                                                                                                                    |
  | `isMultiRepo`        | `boolean`                                                                           | Only alerts for secrets detected in more than one repository.                                                                                                                         |
  | `sort`               | [CodeScanningSort](/charter/charter/packs/github/pulls/objects#codescanningsort)            | The property to sort the results by. `created` means when the alert was created; `updated` means when it was updated or resolved. GitHub uses `created` when this is absent.          |
  | `direction`          | [SortDirection](/charter/charter/packs/github/issues/objects#sortdirection)                 | The direction to sort the results by. GitHub uses `desc` when this is absent.                                                                                                         |
</div>
