mirror of
https://github.com/mukul975/Anthropic-Cybersecurity-Skills.git
synced 2026-06-12 22:24:56 +03:00
27c6414ca5
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
53 lines
1.5 KiB
Markdown
53 lines
1.5 KiB
Markdown
# API Reference: Azure AD Conditional Access Audit Agent
|
|
|
|
## Dependencies
|
|
|
|
| Library | Version | Purpose |
|
|
|---------|---------|---------|
|
|
| requests | >=2.28 | HTTP client for Microsoft Graph API |
|
|
|
|
## CLI Usage
|
|
|
|
```bash
|
|
python scripts/agent.py \
|
|
--tenant-id TENANT_ID --client-id CLIENT_ID --client-secret SECRET \
|
|
--output-dir /reports/
|
|
```
|
|
|
|
## Functions
|
|
|
|
### `ConditionalAccessClient(tenant_id, client_id, client_secret)`
|
|
Authenticates via OAuth2 client credentials to Microsoft Graph.
|
|
|
|
### `list_policies() -> list`
|
|
GET `/identity/conditionalAccess/policies` - All conditional access policies.
|
|
|
|
### `list_named_locations() -> list`
|
|
GET `/identity/conditionalAccess/namedLocations` - Named locations for geo-fencing.
|
|
|
|
### `audit_policy(policy) -> dict`
|
|
Checks for: MFA requirement, enabled state, app coverage, grant controls.
|
|
|
|
### `check_baseline_policies(policies) -> list`
|
|
Verifies essential baselines: MFA for admins, block legacy auth, require compliant devices.
|
|
|
|
### `generate_report(client) -> dict`
|
|
Full audit with per-policy findings and baseline gap analysis.
|
|
|
|
## Microsoft Graph Endpoints
|
|
|
|
| Endpoint | Purpose |
|
|
|----------|---------|
|
|
| `GET /identity/conditionalAccess/policies` | List CA policies |
|
|
| `GET /identity/conditionalAccess/namedLocations` | Named locations |
|
|
|
|
## Output Schema
|
|
|
|
```json
|
|
{
|
|
"total_policies": 15, "enabled_policies": 12,
|
|
"summary": {"high_risk": 3, "missing_baselines": 1},
|
|
"baseline_checks": [{"baseline": "Require MFA for admins", "implemented": true}]
|
|
}
|
|
```
|