SAST (Static Code Analysis)

SAST (Static Code Analysis) is a check that analyzes source code without executing the program to find vulnerabilities and maintainability problems before they reach production. In Datadog, Static Code Analysis plays this role, and the results appear in PRs, the IDE, and the Code Security list.

Overview

SAST stands for Static Application Security Testing, a check that reads the source code itself without running the program to find vulnerable patterns and coding styles that lower maintainability. Datadog's Static Code Analysis corresponds to this feature; once you connect a repository, it is scanned on every commit, and the results appear as line comments in PRs, findings in the IDE, and in the Code Security list. You care about it when you want to mechanically stop weaknesses in code before review, when you separate its role from SCA, which looks at dependency libraries, and when you decide on operations so that false positives do not stop developers' hands.

A check that reads the source without executing it

SAST is a testing method that analyzes pre-production code without executing the program, and the official docs position it as a clear-box method that tests while looking at the internals (as of September 2026, Source: Static Code Analysis (SAST)). In Datadog, the feature named Static Code Analysis corresponds to this, and its purpose is to find security vulnerabilities and maintainability problems at an early stage of development. Without it, typical weaknesses such as how SQL statements are assembled and how input values are handled slip past the reviewer's eye and reach production. With it, a machine stops them at the PR stage against the same standard, so review can spend its time on design discussion. Datadog's Code Security as a whole is composed of multiple features including SAST, and the overall picture is left to the Code Security explanation.

Where it runs in Datadog - two choices: hosted scanning or CI

There are two ways to run it. Hosted scanning, which runs on Datadog's infrastructure, supports repositories on GitHub, GitLab, Azure DevOps, and Bitbucket Cloud. The other is running datadog-ci in your own CI (as of September 2026, Source: Static Code Analysis Setup). On the CI path, the default branch must be analyzed once before results appear in the UI.

  • Connect the repository and scan the default branch with the default rulesets for each language.
  • From then on, every commit is scanned, and violations are aggregated per repository.
  • Violations appear in the Datadog UI as well as in PRs and the IDE.
  • Which rules to keep is adjusted in the Datadog UI or in code-security.datadog.yaml.
Source: the descriptions in Static Code Analysis Setup and Static Code Analysis (SAST), arranged in setup order (as of September 2026).

The supported languages are 12: Python, JavaScript, TypeScript, Java, C#, Go, Ruby, PHP, Kotlin, Elixir, Apex, and Swift. Docker and YAML files are also covered (as of September 2026, Source: Static Code Analysis (SAST)). The touchpoints are three: IDE, PR, and CI, and the design of how far to block is summarized in the Code Security explanation.

How it differs from SCA - your own code, or dependency libraries

It is easily confused with the similarly named SCA (Software Composition Analysis), so separate them by what they look at.

Division of roles between SAST and SCA
Aspect (what is compared)SAST (Static Code Analysis)SCA (Software Composition Analysis)
What it looks at.First-party code that you wrote yourselves.Open source libraries the application uses.
What it finds.Vulnerable patterns and quality problems in the code.Known vulnerabilities contained in dependencies.
Where it looks.Pre-production code in the repository.Both the repository and running services.
Source: the descriptions of each feature in Code Security, arranged as a comparison (as of September 2026).

Adding SAST does not catch known vulnerabilities in dependency libraries, and conversely SCA does not look at how your own code is written. The 3 lines of what Datadog calls "vulnerabilities" and the range SAST covers among them are summarized in the Vulnerability glossary entry.

Results are split into two tabs, "vulnerabilities" and "quality"

Scan results are aggregated per repository and split into two tabs. Those that hit rules in the Security category are listed in the Code Vulnerabilities tab (as of September 2026, Source: Static Code Analysis (SAST)). The remaining 4 categories, Best Practices, Code Style, Error Prone, and Performance, go into the Code Quality tab. Opening a violation shows 3 tabs, Details, Remediation, and Event, and on GitHub the suggested fix can be applied from Fix Violation by opening a PR or committing directly. Violations are tied to a service and a team and delivered to the owner. To map them explicitly, write the code location in the service definition in Software Catalog; without it, the mapping is inferred from Error Tracking usage patterns or names.

How to handle false positives, and results from other tools can be brought in

Because static analysis has no runtime context, false positives are unavoidable. In Datadog, for some SAST findings, Bits AI reads the context and attaches an assessment of true positive or false positive with a short reason. Findings a person judges to be false positives can be reported with a reason and are used on the Datadog side to improve the rulesets (as of September 2026, Source: Static Code Analysis (SAST)). If you already use Snyk, CodeQL, or Semgrep, you can ingest SARIF-format results with datadog-ci sarif upload and handle them in the same list. SARIF's 4-level severity is mapped to CVSS severity (Source: Static Code Analysis Setup). The expectation that enabling SAST also catches CVEs in dependency libraries is mistaken; that is SCA's job. The billing unit is left to the pricing section of the Code Security explanation.

Share