dd-audit
Audit Trail investigations - who changed what, key compromise, cost spike root cause, compliance evidence (SOC 2/PCI), and AI activity auditing.
What this skill does
# Datadog Audit Trail Investigate user activity, configuration changes, access patterns, and compliance evidence using `pup audit-logs`. ## Sub-Skills | Sub-skill | Use when | |-----------|----------| | **security-investigation** | "Who changed X?", "What did this user do?", "Show me deletions in the last 24h" | | **key-compromise** | "Was this API key compromised?", "What did key XYZ do?", "Investigate suspicious key activity" | | **cost-spike-investigation** | "Why did my bill go up?", "What caused this usage spike?", "Investigate LLM cost increase" | | **compliance-report** | "Generate SOC 2 evidence", "PCI audit log", "User provisioning report for auditor" | | **ai-activity-audit** | "What did the AI assistant do?", "Audit MCP tool calls", "AI governance report" | ## Prerequisites ```bash pup auth login # OAuth2 (recommended) # or set DD_API_KEY + DD_APP_KEY with audit_logs_read scope ``` ## Commands ```bash # List recent events pup audit-logs list --from 1h --limit 100 # Search with a query pup audit-logs search --query "@action:deleted" --from 24h # JSON output for piping to jq pup audit-logs search --query "@usr.email:[email protected]" --from 7d -o json | jq '.data[].attributes' ``` ## Event Schema Quick Reference | Field | Description | Example values | |-------|-------------|----------------| | `@usr.email` | Actor email | `[email protected]` | | `@evt.actor.type` | How action was taken | `USER`, `API_KEY`, `SUPPORT_USER` | | `@action` | Verb | `created`, `modified`, `deleted`, `accessed`, `login` | | `@evt.name` | Event category | `Dashboard`, `Monitor`, `Authentication`, `Access Management` | | `@asset.type` | Resource type | `dashboard`, `monitor`, `api_key`, `role`, `user` | | `@asset.id` | Resource identifier | `abc-123` | | `@metadata.api_key.id` | API key used (if applicable) | `key_abc123` | | `@metadata.app_key.id` | App key used (if applicable) | `app_abc123` | | `@network.client.ip` | Client IP address | `1.2.3.4` | | `@network.client.geoip.country.name` | Country | `United States` | | `@network.client.geoip.as.name` | ASN name | `Amazon.com` | | `@http.url_details.path` | API endpoint path | `/api/v1/dashboard/xyz` | ## Search Syntax Same Lucene-style syntax as Log Explorer: | Query | Meaning | |-------|---------| | `@evt.name:Dashboard` | Exact field match | | `@action:deleted` | Action filter | | `@usr.email:[email protected]` | Specific user | | `@evt.name:Monitor AND @action:modified` | Compound | | `-@action:deleted` | Negation | | `@usr.email:*` | Field exists | | `@network.client.ip:1.2.3.4` | IP filter | ## Retention Default retention is **90 days**. If querying beyond 90 days, archive to S3/GCS/Azure Blob must be configured. Always check whether the requested time window falls within retention before running a query. ## Troubleshooting | Problem | Cause | Fix | |---------|-------|-----| | 403 Forbidden | Missing `audit_logs_read` scope | Add scope to app key in Datadog UI | | Empty results | Time window outside retention | Check archive config; default max is 90 days | | Timeout | Query too broad | Narrow time window or add more filters | | No IP data | Internal action or pre-enrichment event | Not all events have geo data | ## References - [Audit Trail API](https://docs.datadoghq.com/api/latest/audit/) - [Audit Trail documentation](https://docs.datadoghq.com/account_management/audit_trail/) - [Search syntax](https://docs.datadoghq.com/logs/explorer/search_syntax/)
Related in Security
mac-ops
IncludedComprehensive macOS workstation operations — diagnose kernel panics, identify failing drives, audit launchd startup items, decode wake reasons, triage TCC permission denials, manage APFS snapshots, recover from no-boot. Use for: Mac is slow, slow bootup, won't boot, kernel panic, kernel_task hot, mds_stores CPU, photoanalysisd, cloudd, login loop, gray screen, sleep wake failure, drive failing, IO errors, APFS snapshots eating space, Time Machine local snapshots, Spotlight indexing, launchd, LaunchAgent, LaunchDaemon, login items, TCC permissions, Full Disk Access, Screen Recording denied, Gatekeeper, quarantine, com.apple.quarantine, app is damaged, helper tool, /Library/PrivilegedHelperTools, pmset, wake reasons, dark wake, sysdiagnose, panic.ips, DiagnosticReports, configuration profile, MDM profile, remote diagnostics over SSH.
a11y-audit
IncludedRun accessibility audits on web projects combining automated scanning (axe-core, Lighthouse) with WCAG 2.1 AA compliance mapping, manual check guidance, and structured reporting. Output is configurable: markdown report only, markdown plus machine-readable JSON, or markdown plus issue tracker integration. Use this skill whenever the user mentions "accessibility audit", "a11y audit", "WCAG audit", "accessibility check", "compliance scan", or asks to check a web project for accessibility issues. Also trigger when the user wants to verify WCAG conformance or map findings to a specific standard (CAN-ASC-6.2, EN 301 549, ADA/AODA).
erpclaw
IncludedAI-native ERP system with self-extending OS. Full accounting, invoicing, inventory, purchasing, tax, billing, HR, payroll, advanced accounting (ASC 606/842, intercompany, consolidation), and financial reporting. 413 actions across 14 domains, 43 expansion modules. Constitutional guardrails, adversarial audit, schema migration. Double-entry GL, immutable audit trail, US GAAP.
assess
IncludedAssesses and rates quality 0-10 across multiple dimensions (correctness, maintainability, security, performance, testability, simplicity) with pros/cons analysis. Compares against project conventions and prior decisions from memory. Produces structured evaluation reports with actionable improvement suggestions. Use when evaluating code, designs, architectures, or comparing alternative approaches.
spring-boot-security-jwt
IncludedProvides JWT authentication and authorization patterns for Spring Boot 3.5.x covering token generation with JJWT, Bearer/cookie authentication, database/OAuth2 integration, and RBAC/permission-based access control using Spring Security 6.x. Use when implementing authentication or authorization in Spring Boot applications.
code-hardcode-audit
IncludedDetect hardcoded values, magic numbers, and leaked secrets. TRIGGERS - hardcode audit, magic numbers, PLR2004, secret scanning.