Skip to content
Tutorials Center
My learning

Topics

Lesson 30 of 37 ยท Synthetics and Security

Security Monitoring

Tour Datadog's security products: Cloud SIEM detection rules, App and API Protection, Cloud Security posture, vulnerability management and Sensitive Data Scanner.

The data Datadog already collects (logs, traces, cloud configuration) is also what a security team needs. Datadog's security products reuse the Agent and integrations you already have. This lesson is a tour with the concepts you must understand to use them, plus runnable stand-ins that show how detection rules and scanners think.

None of the security products can run on this site, and product names and packaging change, so treat this as orientation and check the current documentation before you plan a rollout.

The product areas

Area What it watches Typical question
Cloud SIEM Logs (cloud audit, auth, network, application) "Is someone brute-forcing logins or using a stolen key?"
App and API Protection (ASM) Live requests in your services, via the tracer "Is this request an injection or an attack on my API?"
Cloud Security (CSPM, CWPP, identity risk) Cloud account configuration, hosts and containers "Is a bucket public? Is a container running as root?"
Vulnerability management Libraries in code, images and hosts "Which running service uses a vulnerable library?"
Sensitive Data Scanner Logs, traces, RUM events "Are credit card numbers or tokens leaking into logs?"
Workload / Runtime security Syscalls and file changes on hosts "Did a process spawn a shell inside the container?"

Cloud SIEM: detection rules

A detection rule is a query over logs plus a condition. When it matches, Datadog creates a security signal with a severity (info, low, medium, high, critical), which you triage in Security > Cloud SIEM > Signals.

Rule types you will meet:

  • Log detection: count or group logs, for example "more than 10 failed logins for one user in 5 minutes".
  • Impossible travel: the same user signs in from locations too far apart for the time between them.
  • Threshold, new value and anomaly detections: "first time this account used this API from this country".
  • Signal correlation: combine several weaker signals into one stronger one.

Datadog ships many out-of-the-box rules (for AWS CloudTrail, Okta, Google Workspace and others) that you enable and tune before you write your own. Route signals to Slack, PagerDuty or a case with notification rules, and keep security signal handling separate from on-call performance alerts.

Stand-in: a brute-force detection rule

JS Stand-in: failed-login threshold by user

Press Run (or Ctrl + Enter) to see the console output here.

No output.

App and API Protection

With the tracer installed, setting DD_APPSEC_ENABLED=true turns on in-app threat detection. The library inspects requests for known attack patterns (SQL injection, SSRF, path traversal, suspicious scanners), attaches the finding to the trace, and Datadog shows attacks and attackers in Security > App and API Protection. You can add blocking rules that block an IP or a user from the library (or from an edge such as a gateway) and create rules from observed attack patterns. It also finds vulnerable libraries actually loaded at runtime and inventories your API endpoints.

Cloud Security and posture

Cloud Security scans your cloud accounts through an integration role with read-only permissions. It evaluates misconfiguration rules mapped to benchmarks such as CIS, and lists findings with severity, affected resource and remediation text: public storage buckets, security groups open to the world, unencrypted databases, missing MFA on privileged users. A security graph helps you see attack paths, for example an internet-exposed host with a privileged role and a known vulnerability.

Sensitive Data Scanner

Logs often contain emails, card numbers, API keys, or national IDs that should never be there. Sensitive Data Scanner applies out-of-the-box and custom regex scanning rules on ingestion and can redact, hash or partially mask matches, optionally limited to certain services or tags.

JS Stand-in: redact sensitive values

Press Run (or Ctrl + Enter) to see the console output here.

No output.

Test regular expressions on realistic samples. Very broad rules produce false positives (a long order number looks like a card), and very narrow ones miss data. Datadog's validators (such as a checksum test for card numbers) lower false positives.

Good habits

  • Enable only what you can triage; unattended signals are worse than none.
  • Give every signal an owner and a runbook.
  • Keep audit logs for the retention your compliance framework requires, in cheaper archives (for example object storage) and not only in indexed logs.
  • Use least-privilege API keys and rotate them; limit who can change security rules.
  • Treat blocking carefully: test in monitor-only mode first so you do not block legitimate customers.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. What does a Cloud SIEM detection rule produce when it matches?

    Matches create signals that are triaged by severity.
  2. 2. Which product finds attacks against a running service via the tracer?

    App and API Protection uses the tracing library to detect attacks in live requests.
  3. 3. What does Sensitive Data Scanner do?

    It applies scanning rules on ingestion and can mask or redact matches.
  4. 4. Why try blocking rules in monitor-only mode first?

    Observing first shows whether a rule would block real traffic.

Summary

  • Datadog security reuses your logs, traces and cloud data: SIEM, App and API Protection, Cloud Security, vulnerability management and Sensitive Data Scanner.
  • Detection rules create signals; tune the out-of-the-box rules before writing your own.
  • Cloud Security checks configuration against benchmarks with read-only access.
  • Scrub or redact sensitive data at ingestion, and roll out blocking gradually.

Next: Cost Management and Custom Metrics