query for discovering TLS certs (#7797)

* query for discovering TLS certs

* Update standard-query-library.yml

* Use Nabil as the contributor

Co-authored-by: Zach Wasserman <zach@fleetdm.com>

* More accurate description of query purpose

Co-authored-by: Zach Wasserman <zach@fleetdm.com>

Co-authored-by: Zach Wasserman <zach@fleetdm.com>
This commit is contained in:
Mo Zhu 2022-09-20 11:16:59 -07:00 committed by GitHub
parent f78dc8febd
commit 325adad941
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -919,4 +919,15 @@ spec:
platforms: macOS
tags: compliance, built-in
platform: darwin
contributors: GuillaumeRoss
contributors: GuillaumeRoss
---
apiVersion: v1
kind: query
spec:
name: Discover TLS certificates
platforms: Linux, Windows, macOS
description: Retrieves metadata about TLS certificates for servers listening on the local machine. Enables mTLS adoption analysis and cert expiration notifications.
query: SELECT * FROM curl_certificate WHERE hostname IN (SELECT DISTINCT 'localhost:'||port FROM listening_ports WHERE protocol=6 AND address!='127.0.0.1' AND address!='::1');
purpose: Informational
tags: network, tls
contributors: nabilschear