Files
mukul975 27c6414ca5 Add folder anatomy (scripts/agent.py + references/api-reference.md) for 648 cybersecurity skills
Complete skill folder anatomy across all cybersecurity skills:
- scripts/agent.py: 80-150 line Python agents using real libraries (impacket,
  boto3, azure-mgmt-*, kubernetes, pefile, yara, scapy, shodan, stix2, etc.)
- references/api-reference.md: real API documentation with method signatures
- LICENSE: MIT license for all skill folders
2026-03-10 21:02:12 +01:00

1.5 KiB

API Reference: Device Posture Assessment Agent

Dependencies

Library Version Purpose
(stdlib only) Python 3.8+ Platform detection, subprocess for OS security checks

CLI Usage

python scripts/agent.py --output-dir /reports/ --output device_posture.json

Functions

check_os_version() -> dict

Uses platform.system(), platform.version() for OS identification.

check_disk_encryption() -> dict

Windows: manage-bde -status C: (BitLocker). macOS: fdesetup status (FileVault). Linux: lsblk for LUKS.

check_firewall_status() -> dict

Windows: netsh advfirewall show allprofiles state. Linux: ufw status.

check_antivirus() -> dict

Windows: PowerShell Get-MpComputerStatus for Defender real-time protection.

check_screen_lock() -> dict

Windows: Registry InactivityTimeoutSecs check.

compute_posture_score(checks) -> dict

Weighted scoring: encryption (25), firewall (20), AV (25), screen lock (15), OS (15). Returns COMPLIANT/PARTIAL/NON_COMPLIANT.

Posture Checks

Check Weight Tool
Disk Encryption 25 BitLocker/FileVault/LUKS
Firewall 20 Windows Firewall/UFW
Antivirus/EDR 25 Defender/endpoint agent
Screen Lock 15 OS policy
OS Supported 15 Platform detection

Output Schema

{
  "hostname": "WORKSTATION-01",
  "posture": {"score": 85, "compliance": "COMPLIANT"},
  "recommendations": ["Enable disk encryption"]
}