turbot/net_insights
Loading controls...

Control: Certificates should be valid

Description

It is recommended that the certificate is not being used before the time when the certificate is valid from.

Usage

Run the control in your terminal:

powerpipe control run net_insights.control.ssl_certificate_valid

Snapshot and share results via Turbot Pipes:

powerpipe login
powerpipe control run net_insights.control.ssl_certificate_valid --share

Steampipe Tables

Params

ArgsNameDefaultDescriptionVariable
$1domain_names
["github.com","microsoft.com"]
DNS domain names.

SQL

select
common_name as resource,
case
when now() < not_before then 'alarm'
else 'ok'
end as status,
case
when now() < not_before then common_name || ' is not yet valid.'
else common_name || ' is valid.'
end as reason
from
net_certificate
where
domain in (
select
jsonb_array_elements_text(to_jsonb($1 :: text [ ]))
)
order by
common_name;