> For the complete documentation index, see [llms.txt](https://cortex-docs.paloaltonetworks.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cortex-docs.paloaltonetworks.com/application-security/code-to-cloud/code-to-cloud.md).

# Code-to-Cloud

Code-to-Cloud (C2C) traceability is the core correlation engine in Cortex Cloud that maps your complete path to production, establishing deterministic, bidirectional lineage across your entire Software Development Life Cycle (SDLC). By connecting source code, build pipelines, artifacts, and runtime infrastructure, C2C transforms fragmented asset data into a unified, traversable graph.

Resolving your lineage chain transitions your organization from a fragmented view to a governed posture by providing the following capabilities.

## Code-to-Cloud (forward traceability)

Follows assets from source code through build pipelines and artifacts to their deployed runtime destinations, enabling you to:

* **Understand deployment exposure**: Determine if, where, and how code is deployed in cloud environments
* **Precision prioritization**: Prioritize code findings using runtime context, such as deployment status, internet exposure, and exploitability, instead of relying only on static severity
* **Support compensating controls**: Identify the affected runtime resources so temporary mitigations or compensating controls can be applied while a permanent code fix is being developed
* **Validate deployment lineage**: Verify that artifacts and infrastructure originated from the expected source and pipeline, providing end-to-end deployment visibility

## Cloud-to-Code (backward traceability)

Traverses from runtime workloads back to the originating artifacts, pipelines, and source code, enabling you to:

* **Attribution**: Identify the owning repository, pipeline, and development team responsible for a runtime workload
* **Fix at the source (shift left)**: Trace runtime findings back to the originating code so vulnerabilities and misconfigurations can be remediated where they were introduced, preventing future deployments of the same issue
* **Accelerated remediation**: Route issues directly to the responsible owners without manual investigation, reducing mean time to remediation (MTTR)

## Cross-lineage capabilities

By correlating both directions of the lineage graph, Cortex Cloud also enables:

* **Contextual application grouping**: Resolve a complete lineage chain and create business applications from related repositories, pipelines, artifacts, and cloud resources using user-defined criteria. This exposes fragmented lineage and allows you to prioritize risk based on business impact rather than isolated asset severity.
* **Drift detection**: Compare the intended state in your Version Control System (VCS) with the observed runtime state. Runtime changes are flagged as drift only when they introduce a security policy violation that does not exist in the source code, reducing operational noise.

## Manage Code-to-Cloud with the API

Retrieve Code-to-Cloud coverage programmatically. See [API endpoints for C2C](/application-security/code-to-cloud/code-to-cloud/api-endpoints-for-c2c.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://cortex-docs.paloaltonetworks.com/application-security/code-to-cloud/code-to-cloud.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
