> For the complete documentation index, see [llms.txt](https://docs.snyk.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.snyk.io/supported-languages/technical-specifications-and-guidance.md).

# Technical specifications and guidance

Technical requirements for Snyk Code and Snyk Open Source, including file encoding and how Snyk builds the dependency tree

## Unicode character encoding

Both Snyk Code and Snyk Open Source accept source code files in UTF-8 encoding. Consider converting source files to this encoding type before importing them into Snyk.

## Snyk Open Source

Snyk analyzes and builds the dependency tree depending on the language and package manager for the Project, as well as the location of the Project.

### How Snyk for Open Source and licensing works

{% hint style="info" %}
Before testing your Open Source Project for vulnerabilities, with limited exceptions, you must build your Project. For details, see [Open Source Projects that must be built before testing with the Snyk CLI](https://docs.snyk.io/developer-tools/snyk-cli/snyk-cli/scan-and-maintain-projects-using-the-cli/snyk-cli-for-open-source/open-source-projects-that-must-be-built-before-testing-with-the-snyk-cli).
{% endhint %}

Snyk builds a dependency graph and (dependency tree) and then uses the [vulnerability database](https://snyk.io/vuln) to find vulnerabilities in any of the packages anywhere in that tree.

### Snyk policies in Open Source

For information on managing dependencies and vulnerabilities from your developer workflows through the use of policies, see:

* [Defining a secure open-source policy](https://snyk.io/series/open-source-security/open-source-policy/)
* [Use Snyk security policies to prioritize fixes more efficiently](https://snyk.io/blog/snyk-security-policies/)

### Open Source license compliance

To check compliance for open source licenses, see [Snyk License Compliance Management](https://docs.snyk.io/scan-fix-and-prevent/scan-with-snyk/snyk-open-source/scan-open-source-libraries-and-licenses/snyk-license-compliance-management).

## Snyk Code

### File size limit for Snyk Code analysis

Snyk Code automatically excludes the following files from analysis:

* On the Web UI - files that are larger than 1MB.
* On the CLI and IDE - files that are larger than 1MB.
* Minified JS files with 3 or fewer lines.

### Filename length limitation

The analysis is available only for files with names shorter than or equal to 255 characters. If the filename exceeds this limit, you receive an error. To ensure that all files are being analyzed, Snyk recommends shortening long filenames.

### Framework support

To support a specific framework, Snyk Code must both support the relevant language and be trained on Projects using the framework. The found patterns are then annotated by the security team and extended by curated content.

Most frameworks are partially supported out of the box, as Snyk Code needs only to parse the code to analyze it. In some cases, frameworks may require specific rules, or require specific program analysis engine updates, or both.

If you notice any gaps in support for a specific framework, [contact Snyk Support](https://support.snyk.io).

Snyk categorizes framework support into two levels: Comprehensive and Partial.

Comprehensive support includes:

* Sources and sinks: All relevant sources and sinks are identified.
* Data flow testing: Extensive testing provides thorough data flow coverage.
* Engine support: The Snyk Code engine is fully optimized for this framework.
* Limitations: No known limitations; report any false negatives to [Snyk Support](https://support.snyk.io).

Partial support includes:

* Sources and sinks: Coverage may be limited, with some missing elements.
* Data flow testing: Limited testing has been conducted.
* Engine support: Compatibility is restricted, which may impact analysis accuracy.
* Limitations: Potential for false negatives in taint analysis or source/sink identification.

Snyk continuously expands its framework coverage and improves analysis accuracy.

### Template file analysis

Snyk Code analyzes template files together with the application code that renders them. Snyk Code follows data that reaches a template from your application code into the template, so it reports a cross-site scripting vulnerability that becomes exploitable only where the template writes its output. The reported data flow spans both the application code and the template.

Snyk Code takes the escaping behavior of the template engine into account. Snyk Code does not report output written through the default escaping of the engine. Snyk Code treats output written through a construct that bypasses escaping, such as a raw or unescaped directive, as a sink.

Support is defined by the pairing of a template engine with the language that renders the template. The following pairs are supported. Template files are analyzed in addition to the source file formats listed for each language.

| Template engine | File extensions            | Languages            |
| --------------- | -------------------------- | -------------------- |
| EJS             | `.ejs`                     | JavaScript           |
| FreeMarker      | `.ftl`, `.ftlh`, `.ftlx`   | Java, Kotlin, Groovy |
| Handlebars      | `.hbs`, `.handlebars`      | JavaScript           |
| Jinja2          | `.j2`, `.jinja`, `.jinja2` | Python               |
| Mako            | `.mako`                    | Python               |
| Mustache        | `.mustache`, `.mu`         | JavaScript, C#       |
| Pug             | `.pug`, `.jade`            | JavaScript           |
| Razor           | `.cshtml`, `.razor`        | C#                   |
| Thymeleaf       | `.html`                    | Java, Kotlin, Groovy |
| Twig            | `.twig`                    | PHP                  |
| Velocity        | `.vm`, `.vtl`              | Java, Kotlin, Groovy |

Snyk is expanding this coverage. If a template engine or a pair you use is not listed, [contact Snyk Support](https://support.snyk.io).

### How Snyk Code analysis works

Snyk scans your codebase following this sequence:

1. The source code is analyzed to generate an event graph. The event graph is similar to a code map, helping Snyk understand how different parts of the code are related. There are two node types, each node in the graph representing something that happens in the code. Some represent parts of the code, and others represent how the code is used.
2. Rules are run against the event graph to find matches. The rules act as a checklist of known vulnerabilities that Snyk looks for in the event graph.
3. If a match is found, Snyk looks for a vulnerability in the event graph, identifying where problems might be hiding in the code.

For more information, see [Snyk Code AI Engine](https://docs.snyk.io/scan-fix-and-prevent/scan-with-snyk/snyk-code#ai-engine). For more information about Snyk Code language support, see [Supported languages, package managers, and frameworks](/supported-languages/supported-languages-package-managers-and-frameworks.md).

## Language support and CLI, CI/CD, and SCM integrations

Snyk supports a variety of programming languages, enabling seamless integration into your development workflow through CLI commands, CI/CD pipelines, and SCM integrations.

You can use these tools to automatically check your code for security issues as you develop your software. This ensures that strong security practices are part of your development process.

Navigate to the following pages for more details:

* CLI for [Snyk Open Source](https://docs.snyk.io/developer-tools/snyk-cli/scan-and-maintain-projects-using-the-cli/snyk-cli-for-open-source) and [Snyk Code](https://docs.snyk.io/developer-tools/snyk-cli/scan-and-maintain-projects-using-the-cli/snyk-cli-for-snyk-code)
* CI/CD for [Snyk Open Source](https://docs.snyk.io/developer-tools/integrations/snyk-ci-cd-integrations/snyk-ci-cd-integration-deployment-and-strategies/snyk-open-source-specific-ci-cd-strategies) and [Snyk Code](https://docs.snyk.io/developer-tools/integrations/snyk-ci-cd-integrations/use-snyk-code-in-the-ci-cd-pipeline)
* [SCM integrations](https://docs.snyk.io/developer-tools/integrations/scm-integrations/organization-level-integrations) for Snyk Open Source and Snyk Code


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.snyk.io/supported-languages/technical-specifications-and-guidance.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
