fleetdm / fleet

Open-source platform for IT, security, and infrastructure teams. (Linux, macOS, Chrome, Windows, cloud, data center)
https://fleetdm.com
Other
2.92k stars 405 forks source link

Device health API #14920

Closed noahtalerman closed 8 months ago

noahtalerman commented 10 months ago

Goal

User story
As a security engineer using Fleet's API for device health,
I want to hit one API endpoint to get a device's latest policy pass/fail and vulnerability data
so that I can use this data in my automation to grant or deny end user's access to third party applications.

Requirements

Changes

Product

Engineering

ℹ️  Please read this issue carefully and understand it. Pay special attention to UI wireframes, especially "dev notes".

Context

QA

Risk assessment

Manual testing steps

  1. Step 1
  2. Step 2
  3. Step 3

Testing notes

Confirmation

  1. [ ] Engineer (@____): Added comment to user story confirming succesful completion of QA.
  2. [ ] QA (@____): Added comment to user story confirming succesful completion of QA.
rachaelshaw commented 10 months ago

Updated PR at https://github.com/fleetdm/fleet/pull/15038.

(The original PR with some of the future improvements to policies is still available here)

sharon-fdm commented 9 months ago

Hey team! Please add your planning poker estimate with Zenhub @getvictor @mostlikelee @jahzielv

sharon-fdm commented 9 months ago

Please add your planning poker estimate with Zenhub @sharon-fdm

fleet-release commented 9 months ago

Health API shines, Automation aligns, Access, sublime.

sabrinabuckets commented 8 months ago

Validated able to get results from the endpoint (example response below), refetch host for updated vitals, and then get updated results from endpoint.

{
    "host_id": 22,
    "health": {
        "updated_at": "2023-12-12T20:15:41Z",
        "os_version": "macOS 13.6",
        "disk_encryption_enabled": false,
        "vulnerable_software": [
{
    "host_id": 22,
    "health": {
        "updated_at": "2023-12-12T16:00:56Z",
        "os_version": "macOS 13.6",
        "disk_encryption_enabled": true,
        "vulnerable_software": [
            {
                "id": 183,
                "name": "Safari.app",
                "version": "16.6",
                "bundle_identifier": "com.apple.Safari",
                "source": "apps",
                "browser": "",
                "generated_cpe": "cpe:2.3:a:apple:safari:16.6:*:*:*:*:macos:*:*",
                "vulnerabilities": [
                    {
                        "cve": "CVE-2023-35074",
                        "details_link": "https://nvd.nist.gov/vuln/detail/CVE-2023-35074",
                        "cvss_score": 8.8,
                        "epss_probability": 0.00109,
                        "cisa_known_exploit": false,
                        "cve_published": "2023-09-27T15:18:00Z",
                        "cve_description": "The issue was addressed with improved memory handling. This issue is fixed in tvOS 17, Safari 17, watchOS 10, iOS 17 and iPadOS 17, macOS Sonoma 14. Processing web content may lead to arbitrary code execution.",
                        "resolved_in_version": "17.0"
                    },
                    {
                        "cve": "CVE-2023-40417",
                        "details_link": "https://nvd.nist.gov/vuln/detail/CVE-2023-40417",
                        "cvss_score": 5.4,
                        "epss_probability": 0.00116,
                        "cisa_known_exploit": false,
                        "cve_published": "2023-09-27T15:19:00Z",
                        "cve_description": "A window management issue was addressed with improved state management. This issue is fixed in Safari 17, iOS 17 and iPadOS 17, watchOS 10, macOS Sonoma 14. Visiting a website that frames malicious content may lead to UI spoofing.",
                        "resolved_in_version": "17.0"
                    },
                    {
                        "cve": "CVE-2023-40447",
                        "details_link": "https://nvd.nist.gov/vuln/detail/CVE-2023-40447",
                        "cvss_score": 8.8,
                        "epss_probability": 0.0011,
                        "cisa_known_exploit": false,
                        "cve_published": "2023-10-25T19:15:00Z",
                        "cve_description": "The issue was addressed with improved memory handling. This issue is fixed in iOS 17.1 and iPadOS 17.1, watchOS 10.1, iOS 16.7.2 and iPadOS 16.7.2, macOS Sonoma 14.1, Safari 17.1, tvOS 17.1. Processing web content may lead to arbitrary code execution.",
                        "resolved_in_version": "17.1"
                    },
                    {
                        "cve": "CVE-2023-40451",
                        "details_link": "https://nvd.nist.gov/vuln/detail/CVE-2023-40451",
                        "cvss_score": 8.8,
                        "epss_probability": 0.00083,
                        "cisa_known_exploit": false,
                        "cve_published": "2023-09-27T15:19:00Z",
                        "cve_description": "This issue was addressed with improved iframe sandbox enforcement. This issue is fixed in Safari 17. An attacker with JavaScript execution may be able to execute arbitrary code.",
                        "resolved_in_version": "17.0"
                    },
                    {
                        "cve": "CVE-2023-41074",
                        "details_link": "https://nvd.nist.gov/vuln/detail/CVE-2023-41074",
                        "cvss_score": 8.8,
                        "epss_probability": 0.0011,
                        "cisa_known_exploit": false,
                        "cve_published": "2023-09-27T15:19:00Z",
                        "cve_description": "The issue was addressed with improved checks. This issue is fixed in tvOS 17, Safari 17, watchOS 10, iOS 17 and iPadOS 17, macOS Sonoma 14. Processing web content may lead to arbitrary code execution.",
                        "resolved_in_version": "17.0"
                    },
                    {
                        "cve": "CVE-2023-41976",
                        "details_link": "https://nvd.nist.gov/vuln/detail/CVE-2023-41976",
                        "cvss_score": 8.8,
                        "epss_probability": 0.00458,
                        "cisa_known_exploit": false,
                        "cve_published": "2023-10-25T19:15:00Z",
                        "cve_description": "A use-after-free issue was addressed with improved memory management. This issue is fixed in iOS 17.1 and iPadOS 17.1, watchOS 10.1, iOS 16.7.2 and iPadOS 16.7.2, macOS Sonoma 14.1, Safari 17.1, tvOS 17.1. Processing web content may lead to arbitrary code execution.",
                        "resolved_in_version": "17.1"
                    },
                    {
                        "cve": "CVE-2023-41983",
                        "details_link": "https://nvd.nist.gov/vuln/detail/CVE-2023-41983",
                        "cvss_score": 6.5,
                        "epss_probability": 0.00084,
                        "cisa_known_exploit": false,
                        "cve_published": "2023-10-25T19:15:00Z",
                        "cve_description": "The issue was addressed with improved memory handling. This issue is fixed in macOS Sonoma 14.1, Safari 17.1, iOS 16.7.2 and iPadOS 16.7.2, iOS 17.1 and iPadOS 17.1. Processing web content may lead to a denial-of-service.",
                        "resolved_in_version": "17.1"
                    },
                    {
                        "cve": "CVE-2023-41993",
                        "details_link": "https://nvd.nist.gov/vuln/detail/CVE-2023-41993",
                        "cvss_score": 9.8,
                        "epss_probability": 0.00617,
                        "cisa_known_exploit": true,
                        "cve_published": "2023-09-21T19:15:00Z",
                        "cve_description": "The issue was addressed with improved checks. This issue is fixed in Safari 17, iOS 16.7 and iPadOS 16.7, macOS Sonoma 14. Processing web content may lead to arbitrary code execution. Apple is aware of a report that this issue may have been actively exploited against versions of iOS before iOS 16.7.",
                        "resolved_in_version": "17.0"
                    },
                    {
                        "cve": "CVE-2023-42852",
                        "details_link": "https://nvd.nist.gov/vuln/detail/CVE-2023-42852",
                        "cvss_score": 8.8,
                        "epss_probability": 0.00147,
                        "cisa_known_exploit": false,
                        "cve_published": "2023-10-25T19:15:00Z",
                        "cve_description": "A logic issue was addressed with improved checks. This issue is fixed in iOS 17.1 and iPadOS 17.1, watchOS 10.1, iOS 16.7.2 and iPadOS 16.7.2, macOS Sonoma 14.1, Safari 17.1, tvOS 17.1. Processing web content may lead to arbitrary code execution.",
                        "resolved_in_version": "17.1"
                    },
                    {
                        "cve": "CVE-2023-42916",
                        "details_link": "https://nvd.nist.gov/vuln/detail/CVE-2023-42916",
                        "cvss_score": 6.5,
                        "epss_probability": 0.00119,
                        "cisa_known_exploit": true,
                        "cve_published": "2023-11-30T23:15:00Z",
                        "cve_description": "An out-of-bounds read was addressed with improved input validation. This issue is fixed in iOS 17.1.2 and iPadOS 17.1.2, macOS Sonoma 14.1.2, Safari 17.1.2. Processing web content may disclose sensitive information. Apple is aware of a report that this issue may have been exploited against versions of iOS before iOS 16.7.1.",
                        "resolved_in_version": "17.1.2"
                    },
                    {
                        "cve": "CVE-2023-42917",
                        "details_link": "https://nvd.nist.gov/vuln/detail/CVE-2023-42917",
                        "cvss_score": 8.8,
                        "epss_probability": 0.00088,
                        "cisa_known_exploit": true,
                        "cve_published": "2023-11-30T23:15:00Z",
                        "cve_description": "A memory corruption vulnerability was addressed with improved locking. This issue is fixed in iOS 17.1.2 and iPadOS 17.1.2, macOS Sonoma 14.1.2, Safari 17.1.2. Processing web content may lead to arbitrary code execution. Apple is aware of a report that this issue may have been exploited against versions of iOS before iOS 16.7.1.",
                        "resolved_in_version": "17.1.2"
                    }
                ],
                "last_opened_at": "2023-12-11T16:38:10Z",
                "installed_paths": [
                    "/System/Volumes/Preboot/Cryptexes/App/System/Applications/Safari.app"
                ]
            },
            {
                "id": 5462,
                "name": "Microsoft Teams classic.app",
                "version": "1.00.633757",
                "bundle_identifier": "com.microsoft.teams",
                "source": "apps",
                "browser": "",
                "generated_cpe": "cpe:2.3:a:microsoft:teams:1.00.633757:*:*:*:*:macos:*:*",
                "vulnerabilities": [
                    {
                        "cve": "CVE-2023-24881",
                        "details_link": "https://nvd.nist.gov/vuln/detail/CVE-2023-24881",
                        "cvss_score": 6.5,
                        "epss_probability": 0.00141,
                        "cisa_known_exploit": false,
                        "cve_published": "2023-07-11T17:15:00Z",
                        "cve_description": "Microsoft Teams Information Disclosure Vulnerability",
                        "resolved_in_version": "2.10.1"
                    },
                    {
                        "cve": "CVE-2023-29328",
                        "details_link": "https://nvd.nist.gov/vuln/detail/CVE-2023-29328",
                        "cvss_score": 8.8,
                        "epss_probability": 0.01436,
                        "cisa_known_exploit": false,
                        "cve_published": "2023-08-08T18:15:00Z",
                        "cve_description": "Microsoft Teams Remote Code Execution Vulnerability",
                        "resolved_in_version": "1.0.0.2023070204"
                    },
                    {
                        "cve": "CVE-2023-29330",
                        "details_link": "https://nvd.nist.gov/vuln/detail/CVE-2023-29330",
                        "cvss_score": 8.8,
                        "epss_probability": 0.01436,
                        "cisa_known_exploit": false,
                        "cve_published": "2023-08-08T18:15:00Z",
                        "cve_description": "Microsoft Teams Remote Code Execution Vulnerability",
                        "resolved_in_version": "1.0.0.2023070204"
                    }
                ],
                "last_opened_at": "2023-12-11T16:48:24Z",
                "installed_paths": [
                    "/Applications/Microsoft Teams classic.app"
                ]
            }
        ]
    }
}
fleet-release commented 8 months ago

Device health in cloud, API brings light to dark, Access, secured, proud.