Skip to main content

repo_secret_scan_history

Creates, updates, deletes, gets or lists a repo_secret_scan_history resource.

Overview

Namerepo_secret_scan_history
TypeResource
Idgithub.secret_scanning.repo_secret_scan_history

Fields

The following fields are returned by SELECT queries:

Response

NameDatatypeDescription
backfill_scansarray
custom_pattern_backfill_scansarray
incremental_scansarray
pattern_update_scansarray

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_scan_historyselectowner, repoLists 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.

NameDatatypeDescription
ownerstringThe account owner of the repository. The name is not case sensitive.
repostringThe name of the repository without the .git extension. The name is not case sensitive.

SELECT examples

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
;