repo_secret_scan_history
Creates, updates, deletes, gets or lists a repo_secret_scan_history resource.
Overview
| Name | repo_secret_scan_history |
| Type | Resource |
| Id | github.secret_scanning.repo_secret_scan_history |
Fields
The following fields are returned by SELECT queries:
- get_scan_history
Response
| Name | Datatype | Description |
|---|---|---|
backfill_scans | array | |
custom_pattern_backfill_scans | array | |
incremental_scans | array | |
pattern_update_scans | array |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_scan_history | select | owner, repo | Lists the latest default incremental and backfill scans by type for a repository. Scans from Copilot Secret Scanning are not included. > [!NOTE] > This endpoint requires GitHub Advanced Security." OAuth app tokens and personal access tokens (classic) need the repo or security_events scope to use this endpoint. If this endpoint is only used with public repositories, the token can use the public_repo scope instead. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
owner | string | The account owner of the repository. The name is not case sensitive. |
repo | string | The name of the repository without the .git extension. The name is not case sensitive. |
SELECT examples
- get_scan_history
Lists the latest default incremental and backfill scans by type for a repository. Scans from Copilot Secret Scanning are not included.
> [!NOTE]
> This endpoint requires GitHub Advanced Security."
OAuth app tokens and personal access tokens (classic) need the repo or security_events scope to use this endpoint. If this endpoint is only used with public repositories, the token can use the public_repo scope instead.
SELECT
backfill_scans,
custom_pattern_backfill_scans,
incremental_scans,
pattern_update_scans
FROM github.secret_scanning.repo_secret_scan_history
WHERE owner = '{{ owner }}' -- required
AND repo = '{{ repo }}' -- required
;