Files
Anthropic-Cybersecurity-Skills/skills/implementing-attack-path-analysis-with-xm-cyber/references/api-reference.md
T
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

60 lines
1.7 KiB
Markdown

# API Reference: XM Cyber Attack Path Analysis Agent
## Dependencies
| Library | Version | Purpose |
|---------|---------|---------|
| requests | >=2.28 | HTTP client for XM Cyber REST API |
## CLI Usage
```bash
python scripts/agent.py \
--url https://xmcyber.example.com \
--api-key YOUR_API_KEY \
--output-dir /reports/ \
--output attack_path_report.json
```
## Functions
### `XMCyberClient(base_url, api_key)`
Client class with Bearer token auth for the XM Cyber API.
### `get_scenarios() -> list`
GET `/api/v1/scenarios` - Lists all attack simulation scenarios.
### `get_attack_paths(scenario_id) -> list`
GET `/api/v1/scenarios/{id}/attack-paths` - Returns attack paths for a scenario.
### `get_choke_points(scenario_id) -> list`
GET `/api/v1/scenarios/{id}/choke-points` - Returns points where attack paths converge.
### `get_critical_assets() -> list`
GET `/api/v1/critical-assets` - Lists defined critical business assets.
### `get_entities_at_risk(scenario_id) -> list`
GET `/api/v1/scenarios/{id}/entities-at-risk` - Entities reachable via attack paths.
### `get_remediation_actions(scenario_id) -> list`
GET `/api/v1/scenarios/{id}/remediations` - Prioritized fix recommendations.
### `analyze_choke_points(choke_points) -> dict`
Ranks choke points by paths_through count, returns top 10.
### `compute_risk_score(attack_paths, critical_assets) -> dict`
Calculates critical asset exposure percentage from reachable targets.
## Output Schema
```json
{
"scenarios": [{
"name": "Full Environment",
"attack_paths": 1234,
"choke_point_analysis": {"total_choke_points": 45, "top_choke_points": []},
"risk_score": {"critical_asset_exposure_pct": 67.5}
}]
}
```