Table: detectify_policy
This table contains information about policies and the assets that are breaching those policies.
The
token_v3
argument is required to use this table, meaning you need to create an API key for v3 on Detectify.
Examples
List all policies
select policy_name, asset_name, severity, active, statusfrom detectify_policy;
List the domains that are currently breaching policies
select policy_name, asset_name, severity, active, statusfrom detectify_policywhere active = 'true';
Count assets by policy and status
select count(*) as assets, policy_name, statusfrom detectify_policygroup by policy_name, status;
Schema for detectify_policy
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form. | |
active | boolean | Indicates if the item is active. | |
asset_id | text | ID of the asset. | |
asset_name | text | Name of the asset. | |
disappeared_at | timestamp with time zone | Timestamp when the item disappeared. | |
first_seen_at | timestamp with time zone | Timestamp when the item was first seen. | |
id | text | Unique ID of the item. | |
policy_id | text | ID of the policy. | |
policy_name | text | Name of the policy. | |
severity | text | Severity level. | |
sp_connection_name | text | =, !=, ~~, ~~*, !~~, !~~* | Steampipe connection name. |
sp_ctx | jsonb | Steampipe context in JSON form. | |
status | text | Status of the item. | |
status_updated_at | timestamp with time zone | Timestamp when the status was last updated. |