b8fe088d4b1f6b2ce0797a114be757fc0bb34d2a
- Use POST /v2/device/{id}/patch/software/apply
- Triggers patch installation per device (not per patch)
- Shows offline device failures clearly
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
CVE Resolution Tool for NinjaOne
Queries NinjaOne's REST API to aggregate CVE/vulnerability data across all organizations and prioritize remediation efforts.
Setup
-
Copy config example and add your NinjaOne API credentials:
cp config.example.py config.py -
Get API credentials from NinjaOne:
- Go to Administration > Apps > API
- Create a new API application (Client Credentials grant type)
- Copy the Client ID and Client Secret
-
Install dependencies:
pip install -r requirements.txt
Usage
python ninjaone.py
NinjaOne API Endpoints Used
| Endpoint | Description |
|---|---|
GET /api/v2/organizations |
List all organizations |
GET /api/v2/devices-detailed |
List all devices with details |
GET /api/v2/device/{id}/software |
Device software inventory |
GET /api/v2/queries/os-patches |
OS patches report |
GET /api/v2/queries/software-patches |
Third-party software patches |
GET /api/v2/vulnerability/scan-groups |
Vulnerability scan data |
Output
Generates a prioritized CVE remediation report showing:
- Summary across all organizations
- Patches grouped by CVSS severity (Critical/High/Medium/Low)
- Critical items requiring immediate attention
- Affected device counts
Resources
Description
Languages
Python
100%