> For the complete documentation index, see [llms.txt](https://docs.debricked.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.debricked.com/overview/language-support/go-go-modules-go-dep-bazel.md).

# Go - Go Modules, Go Dep, Bazel

This section provides a breakdown of the file formats and features supported in Go.

Fortify SCA supports tracking Go dependencies through:

* Go Modules, using *go.mod* files
* Go Dep, using *gopkg.lok* files
* Bazel, using *WORKSPACE* files

### **Go Modules**

Fortify SCA supports tracking Go dependencies using the Go Modules dependency management system and its associated go.mod file. To achieve the fastest and most accurate results, it is necessary to create a file containing the resolved dependency tree, *.gomod.debricked.lock*, before scanning.

This can be done using the [High Performance Scans](/tools-and-integrations/cli/debricked-cli/high-performance-scans.md) technology in [Fortify SCA CLI](/tools-and-integrations/cli/debricked-cli.md). If you execute the *resolve* command, the CLI automatically identifies all manifest files that lack the recommended *go.lock* files and generates them as needed.

You can manually generate the recommended file(s) by running *go mod graph* followed by *go list -m all*, and storing the outputs separated by two new lines between the sections in the *gomod.debricked.lock* file.

```bash
printf "$(go mod graph)\n\n$(go list -mod=readonly -e -m all)" > gomod.debricked.lock
```

Every *gomod.debricked.lock* must be put in the same directory as the corresponding *go.mod.*

Fortify SCA recommends running *go mod tidy* to clean up unused modules before pushing the *go.mod* files, ensuring more accurate service results.

### **Bazel**

Fortify SCA supports Go projects that utilize Bazel, scanning the *WORKSPACE* file format alongside any *Go* file formats in use. Although Bazel does not have native support for Go, support can be added using [Gazelle](https://github.com/bazelbuild/bazel-gazelle).

### **Go Dep**

Go Dep and its associated file *Gopkg.lock* is deprecated and will not get any improvements present in other formats, such as Go Modules.

### **Supported file formats and features**

<table data-full-width="true"><thead><tr><th>Package manager</th><th>Supported file formats</th><th data-type="checkbox">Root dependencies</th><th data-type="checkbox">Indirect dependencies</th><th data-type="checkbox">Dependency trees</th><th data-type="checkbox">Security scanning</th><th data-type="checkbox">License scanning</th><th data-type="checkbox">Root fix</th><th data-type="checkbox">Pull Request</th><th data-type="checkbox">Reachability Analysis</th><th>High Performance Scan</th></tr></thead><tbody><tr><td>Bazel</td><td><em>WORKSPACE</em></td><td>true</td><td>true</td><td>true</td><td>true</td><td>true</td><td>true</td><td>false</td><td>false</td><td>-</td></tr><tr><td>Bazel</td><td><em>install.json</em></td><td>true</td><td>true</td><td>true</td><td>true</td><td>true</td><td>true</td><td>false</td><td>false</td><td>Yes*</td></tr><tr><td>Go Modules</td><td><em>go.mod</em></td><td>true</td><td>true</td><td>true</td><td>true</td><td>true</td><td>true</td><td>false</td><td>false</td><td>Yes</td></tr><tr><td>Go Dep</td><td><em>gopkg.lock</em></td><td>true</td><td>true</td><td>false</td><td>true</td><td>true</td><td>false</td><td>false</td><td>false</td><td>Yes*</td></tr></tbody></table>

**\***&#x54;his is a native lock file format. Native lock file formats are the fastest formats to scan.


---

# 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.debricked.com/overview/language-support/go-go-modules-go-dep-bazel.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.
