Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions config/_default/menus/main.en.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7896,11 +7896,31 @@ menu:
parent: application_security_api_security
identifier: asm_api_security
weight: 1
- name: Services
url: security/application_security/api_posture/api_inventory/services/
parent: asm_api_security
identifier: asm_api_security_services
weight: 10000
- name: API Findings
url: security/application_security/api_posture/api_inventory/api_findings/
parent: asm_api_security
identifier: asm_api_security_api_findings
weight: 10001
- name: Data sources
url: security/application_security/api_posture/api_inventory/data_sources/
parent: asm_api_security
identifier: asm_api_security_data_sources
weight: 10002
- name: Endpoint Scanning
url: security/application_security/api_posture/endpoint_scanning/
parent: application_security_api_security
identifier: application_security_endpoint_scanning
weight: 2
- name: Sensitive Data Detection
url: security/application_security/api_posture/sensitive_data_detection/
parent: application_security_api_security
identifier: application_security_sensitive_data_detection
weight: 10000
- name: Guides
url: security/application_security/guide/
parent: application_security
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,164 @@
---
title: API Posture Inventory
description: Catalog API endpoints, services, and findings, and assess API security risk across your environment.
aliases:
- /security/application_security/api-inventory/
further_reading:
- link: "https://www.datadoghq.com/blog/primary-risks-to-api-security/"
tag: "Blog"
text: "Mitigate the primary risks to API security"
---

API security relies on visibility. The biggest failure mode in most applications isn't missed vulnerabilities, it's missed APIs.

[API Posture Inventory][7] provides a comprehensive, up-to-date catalog and risk assessment of all API endpoints and services in your environment.

**Inventory** is comprised of explorers that correspond to distinct layers in the API security lifecycle:

1. **API Endpoints:** *What APIs exist, and what risk do they expose?*

Each API endpoint is a unique entry point where data or functionality can be accessed. The API Endpoints explorer enables shadow API (undocumented endpoints with no API definition and not detected from Amazon API Gateway) and orphan API (documented endpoints without traffic) detection, asset management, and risk prioritization at the granularity attackers exploit.

2. **[Services][20]:** *Where do risky APIs live, who owns them, and how severe is their collective risk?*

A service groups multiple endpoints into a logical or deployed component (typically aligned with a microservice, app, or backend system).
3. **[API Findings][21]:** *Which API weaknesses, attacks, or misconfigurations require investigation or remediation?*

API Findings are security detections and policy evaluation results tied to endpoints. These represent known or inferred weaknesses or threats in API behavior or configuration.

These explorers correspond to the common API security operational flow:

1. **Discover:** Identify what endpoints exist using **API Endpoints**.
2. **Contextualize:** Identify ownership and dependencies using **[Services][20]**.
3. **Detect and respond:** See where misconfigurations are, and where attacks could occur, using **[API Findings][21]**.

## API Endpoints

[API Endpoints][7] monitors your API traffic to provide visibility into the security posture of your APIs, including:

- **Authentication**: Whether the API enforces authentication.
- **Authentication Method**: Type of authentication used, such as Basic Auth and API key.
- **Public Exposure**: Whether the API is processing traffic from the internet.
- **Sensitive data flows**: Sensitive data handled by the API and flows between APIs.
- **Attack Exposure**: If the endpoint is targeted by attacks.
- **Business Logic**: Business logic and associated business logic suggestions for this API.
- **Vulnerabilities**: If the endpoint contains a vulnerability (powered by [Code Security][8] and [Software Composition Analysis][3]).
- **Findings**: Security findings identified on this API.
- **Dependencies**: APIs and Databases the API depends on.

Using API Endpoints you can:

- See which endpoints process sensitive data, are authenticated, have vulnerabilities or findings, or are publicly available.
- See which endpoints are at risk, and pivot directly into the [Threat Monitoring and Protection][2] service for further investigation or response.
- See which endpoints are associated to your business's logic, and find business logic suggestions based on your endpoint's traffic history.

### Configuration

To view API Endpoints on your services, **you must have App and API Protection Threats Protection enabled**.

For Amazon Web Services (AWS) API Gateway integration, you must set up the following:

- [Amazon Web Services][9]
- [Amazon API Gateway Integration][10]

API Endpoints are discovered from the Datadog Software Catalog and specifically from API definitions [uploaded to Datadog][13]. For instructions on uploading API definitions, see [Create Entities][17].

For information on what library versions are compatible with API Posture Inventory, see [Enabling App and API Protection][11]. [Remote Configuration][1] is required.

|Technology|Minimum tracer version| Support for sensitive data scanning |
|----------|----------|----------|
|Python | v2.1.6 | Requests and responses |
|Java | v1.31.0 | Requests only |
|PHP | v0.98.0 | Requests and responses |
|.NET Core | v2.42.0 | Requests and responses |
|.NET Fx | v2.47.0 | Requests and responses |
|Ruby | v1.15.0 | Requests only |
|Golang | v1.59.0 | Requests only |
|Node.js | v3.51.0, v4.30.0 or v5.6.0 | Requests and responses |

**Note**: On .NET Core and .NET Fx tracers, you need to set the environment variable `DD_API_SECURITY_ENABLED=true` for API Security features to work properly.

### How it works

API Endpoints gathers security metadata about API traffic by leveraging the Datadog SDK with App and API Protection enabled, alongside configurations from Amazon API Gateway and uploaded API Definitions. This data includes the discovered API schema, the types of sensitive data (PII) processed, and the authentication scheme in use. The API information is continuously evaluated, ensuring a comprehensive and up-to-date view of your entire API attack surface.

API Endpoints uses [Remote Configuration][1] to manage and configure scanning rules that detect sensitive data and authentication.

To verify whether discovered endpoints are publicly accessible and require authentication, enable [Endpoint Scanning][19]. Endpoint Scanning actively scans eligible endpoints and enriches API Posture Inventory with verified public accessibility, authentication status, HTTP response status, and last evaluation data.

For details on where endpoint visibility originates, see [Data sources][22].

The following risks are calculated for each endpoint.

### Business logic

These tags (`(users.login.success`, `users.login.failure`, etc.) are determined by the presence of business logic traces associated with the endpoint.

<div class="alert alert-tip">Datadog can suggest a business logic tag for your endpoint based on its HTTP method, response status codes, and URL.</div>

### Publicly accessible

Datadog marks an endpoint as public if the client IP address is outside these ranges:

- 10.0.0.0/8
- 172.16.0.0/12
- 192.168.0.0/16
- 169.254.1.0/16

See [Configuring a client IP header][6] for more information on the required library configuration.

### Endpoint authentication

Authentication is determined by:

- The presence of `Authorization`, `Token` or `X-Api-Key` headers.
- The presence of a user ID within the trace (for example, the `@usr.id` APM attribute).
- The request has responded with a 401 or 403 status code.
- Custom [Endpoint Tagging][15] rules that you configured


When the type of authentication is available, Datadog reports it in a header through the **Authentication Method** facet.

#### Supported authentication methods

| Category | Category facet |
|---------------------------------------------------|------------------|
| JSON Web Token (JWT) | `json_web_token` |
| Bearer tokens (found in `Authorization` headers) | `bearer_token` |
| Basic Authentication | `basic_auth` |
| Digest access authentication | `digest_auth` |

#### Custom Authentication support

Custom authentication detection is possible by configuring [Endpoint Tagging Rules][15]. These rules require the following minimum tracer versions:

|Technology| Minimum tracer version |
|----------|------------------------|
|Java | v1.55.0 |
|.NET | Coming Soon |
|Node.js | v5.76.0 |
|Python | v3.17.0 |
|Ruby | v2.23.0 |
|PHP | v1.15.0 |
|Golang | v2.4.0 |

## Further reading

{{< partial name="whats-next/whats-next.html" >}}

[1]: /tracing/guide/remote_config/
[2]: /security/application_security/
[3]: /security/code_security/software_composition_analysis/
[6]: /security/application_security/policies/library_configuration/#configuring-a-client-ip-header
[7]: https://app.datadoghq.com/security/appsec/inventory/apis
[8]: /security/code_security/iast/
[9]: /integrations/amazon-web-services
[10]: /integrations/amazon-api-gateway
[11]: /security/application_security/setup/
[13]: /internal_developer_portal/software_catalog/entity_model/native_entities/?tab=api#native-entity-types
[15]: https://app.datadoghq.com/security/configuration/asm/trace-tagging
[17]: /internal_developer_portal/software_catalog/set_up/create_entities/#through-the-datadog-ui
[19]: /security/application_security/api_posture/endpoint_scanning/
[20]: /security/application_security/api_posture/api_inventory/services/
[21]: /security/application_security/api_posture/api_inventory/api_findings/
[22]: /security/application_security/api_posture/api_inventory/data_sources/
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
title: API Findings
description: Triage detected API risks across definitions, gateways, and live traffic.
---

**API Findings** provides a central triage view of all detected API risks across definitions, gateways, and live traffic. It provides a set of default rules to detect common vulnerabilities and misconfigurations. You can also set up [custom rules][1] to adapt to specific use cases.

**API Findings** columns:

- **Severity:** Each issue is ranked by risk.
- **Endpoints:** Shows how many endpoints are affected and their services.
- **Status and Ticketing:** `Open` or `In Progress` tracks remediation progress and workflow integration.

Use the **Service** facet to see each service's endpoints to identify ownership and prioritize by business impact.

## Common operations

Click a finding to view its details and perform a workflow such as Validate > Investigate > Fix > Track:

1. Validate:
- Review **What Happened** and **Detected In** to ensure the detection is accurate (service, endpoint, method).
- In **Next Steps**, choose whether to **Mute**, **Create Ticket**, or **Run Workflow** depending on ownership and impact.
2. Investigate:
- Use the **Context** tab to examine the endpoint snapshot and attributes (method, path, authentication flags, tags).
- **Detected In** provides information for routing ownership and remediation.
- In **Detection Rule Query**, you can edit an API finding rule by clicking **See Detection Rule**.
3. Fix:
- Follow the guidance under **Remediation**.
4. Track:
- Use **Create Ticket** to link the issue to your tracking system.
- Use **Reference Links** for developer education or code review.

[1]: /security/application_security/policies/custom_rules/
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
---
title: Data sources
description: Understand the sources Datadog uses to populate the API endpoint inventory.
---

In the [API Endpoints][1] explorer, the **Data Sources** show where visibility originates.

The following data sources are explored.

## Amazon API Gateway

The Amazon API Gateway service formally defines your API structure. Datadog AWS integration reads this pre-defined configuration from the Amazon API Gateway, and then Datadog uses this configuration to create API endpoint entries in **Inventory**.

Use **AWS API Gateway** in **Data Source** to gain visibility into these exposed endpoints. You can also use the query `datasource:aws_apigateway`.

## Software Catalog

The **Software Catalog** data source shows API endpoints that Datadog learned about from the formal specification uploaded to Datadog. The API specification is attached to, or registered as, a dedicated API component within the IDP service entity.

This source ensures that your API inventory is complete by including all planned and formally documented endpoints.

## APM traces

The **Spans** data source shows real traffic and data exposure. Remediation should be performed in code, config, or access controls immediately.

What actions you take depend on each of the attack surfaces:

- **Vulnerabilities:** Patch any vulnerable libraries surfaced by SCA or Runtime Code Analysis, then redeploy the service.
- **API findings discovered:** Review each issue in context of the traced service, fix any code or configurations, and then validate using new traces.
- **Processing sensitive data:** Confirm data handling complies with policy, sanitize or encrypt PII, and limit access to necessary services.
- **Unauthenticated endpoint:** If the endpoint is not intentionally public, enforce authentication and update service configurations.

## Static Endpoint Discovery

<div class="alert alert-info">Static Endpoint Discovery is in Preview.</div>

{{< site-region region="gov,gov2" >}}
<div class="alert alert-warning">Static Endpoint Discovery is not available for the {{< region-param key="dd_site_name" >}} site.</div>
{{< /site-region >}}

The **Source Code** data source shows API endpoints discovered directly from your source code. This complements runtime-based discovery by surfacing endpoints earlier in the development life cycle, including endpoints that may not receive live traffic.

To use this data source, configure the [Source Code Integration][2] with GitHub, GitLab, or Azure DevOps. The following languages and frameworks are supported:

| Language | Framework |
|----------|-----------|
| Python | FastAPI, Flask, Tornado |
| Java | Spring |
| Go | Beego, Chi, Echo, Fiber, Gin, Gorilla Mux, fasthttp, go-zero |
| C# | ASP.NET Core MVC |
| Node.js | Express, Fastify |

To filter for source code endpoints, use **Source Code** in the **Data Source** facet or the query `datasource:source_code`. Scans run when code is pushed to the default branch and on an 8-hour recurring schedule. Discovered endpoints are removed after 12 hours if they are not re-discovered by a subsequent scan.

### Map source code endpoints to services

Static Endpoint Discovery uses heuristics to infer which service an endpoint belongs to. For more accurate mapping, explicitly define service-to-code relationships using the `codeLocations` field in your [Software Catalog service definition (v3 schema)][3]:

```yaml
apiVersion: v3
kind: service
metadata:
name: my-service
owner: my-team
datadog:
codeLocations:
- repositoryURL: https://github.com/org/myrepo.git
paths:
- path/to/service/code/**
```

Without explicit `codeLocations`, endpoints may not merge correctly with data from other sources.

[1]: https://app.datadoghq.com/security/appsec/inventory/apis
[2]: /integrations/guide/source-code-integration/
[3]: /internal_developer_portal/software_catalog/entity_model/
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
title: Services
description: View where API findings, vulnerabilities, and runtime signals converge by service.
---

The **Services** explorer shows where findings from API Endpoints, vulnerabilities, and runtime signals converge by service. Consider it the operational risk view of your applications.

Review your services for the following:

- **Vulnerability risk:** The **Vulnerability Risk** column shows aggregated SCA and IAST results for each service. Vulnerable services have components needing patching or upgrading.
- **Signals and attacks:** Click a service to see charts showing ongoing detections for active exploit attempts or recurring attack patterns.
- **Sensitive data exposure:** Services processing PII (such as SSNs or emails) demand stricter controls and monitoring.
- **Coverage and mode:** Use the **App & API Protection In Monitoring Mode**, **App & API Protection In Blocking Mode**, and the **Inactive** facet to identify where App and API Protection is enabled and enforcing runtime protection.
- **Trend graphs:** The **Trend** column indicates activity and attack frequency over time.

## Coverage

The **Coverage** column shows the active protection and analysis capabilities for each service. Use **Coverage** to measure the completeness of your protection stack.

For example, here are some use cases for **Coverage**:

- **Runtime protection coverage with App and API Protection**:
- Identify the services in **Monitoring** or **Blocking** mode.
- Move ready-to-block services into blocking mode to actively stop attacks.
- Investigate inactive services to see if instrumentation or configuration gaps are leaving APIs exposed.
- **Software Composition Analysis (SCA) coverage**:
- Track the services with analyzed open source dependencies.
- Enable SCA for unscanned services to detect vulnerable libraries early.
- Prioritize patching inactive services with high dependency risk.
- **Runtime Code Analysis (IAST) coverage**:
- Pinpoint where code-level vulnerability detection is missing.
- Enable IAST for production or high-risk apps to uncover exploitable issues in live traffic.
- Use results to confirm whether library vulnerabilities are actually reachable in code.
Loading
Loading