cloud-workload-security

Manage Datadog CSM Threats agent rules, policies, and deployment monitoring via the pup CLI.

5|2|Updated Mar 9, 2026
One-click install
npx skills add https://github.com/lauhon/pi --skill cloud-workload-security-lauhon
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cloud-workload-security
Source: https://github.com/lauhon/pi/tree/main/skills/cloud-workload-security
Command: npx skills add https://github.com/lauhon/pi --skill cloud-workload-security-lauhon

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Managing runtime security detection rules and tracking Cloud Workload Security agent coverage across a large fleet requires navigating complex Datadog APIs and SECL expression syntax, which is slow and error-prone when done manually. ## Core Features & Use Cases - Agent Rules Management: Create, list, update, and delete Workload Protection detection rules written in SECL (Security Event Language), with support for MITRE ATT&CK product tags and rule actions like kill, set, and hash. - Policy Management: Group rules into policies targeted at hosts via host tags or AND/OR host tag lists, and download policies for manual or air-gapped deployment. - Deployment Monitoring: List CSM agents and serverless agents (Fargate, Lambda) with filters on CWS enablement, CSPM status, and Remote Configuration to identify coverage gaps. - Use Case: Ask which production hosts lack CWS coverage, then create a privilege-escalation detection rule and assign it to a Kubernetes production policy in one workflow. ## Quick Start Ask the agent to list all Workload Protection rules and show which hosts have CWS enabled.

Frequently Asked Questions about cloud-workload-security

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a Datadog Workload Protection detection rule?

Use the pup cws rules create command with a name, description, SECL expression, and enabled flag. For example, an expression like exec.file.name in ["sh", "bash"] detects shell execution, and you can attach the rule to a policy with --policy-id.

How do I write SECL expressions for CWS rules?

SECL expressions combine event types like exec, open, and bind with attributes such as exec.file.name or open.file.path using operators like ==, in, =~, &&, and ||. The skill documents common patterns for shell detection, sensitive file access, container escape, and privilege escalation.

How can I check which hosts have CWS enabled in Datadog?

Run pup cws agents list with the query filter is_cws_enabled:true to see covered hosts, or is_cws_enabled:false to find gaps. You can combine filters for hostname, environment, agent version, and Remote Configuration status.

Does CWS rule management work on the Datadog US1-FED government site?

Yes, but US1-FED uses the Security Monitoring API endpoints instead of the Remote Configuration API used by commercial sites. The pup CLI automatically selects the correct endpoints based on your DD_SITE configuration.

Why am I getting a permission denied error when listing CWS rules?

The error means your API keys lack the required scopes such as security_monitoring_cws_agent_rules_read or csm_read. Verify your Datadog API and application keys have Workload Protection permissions and that your organization has CSM Threats enabled.

Can I deploy Workload Protection policies without Remote Configuration?

Yes, use pup cws policies download to export a policy file and deploy it manually to agents. This approach suits air-gapped environments, though Remote Configuration is recommended for automatic rule distribution without agent restarts.