> For the complete documentation index, see [llms.txt](https://docs.sealights.io/knowledgebase/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sealights.io/knowledgebase/setup-and-configuration/sealights-agents-and-plugins/go-agent/go-agent-v1/scanning-a-build.md).

# Scanning a Build

Report the structure of your build to SeaLights. Following this step, you will see the build structure in the SeaLights dashboard.\
Statically instrument the code files, creating a version of the files for testing (the original code is not modified). The instrumentation inserts code to gather and send coverage (function signatures only, no runtime arguments) to SeaLights.

## Scanning a standalone project <a href="#scanning-a-standalone-project" id="scanning-a-standalone-project"></a>

{% code overflow="wrap" lineNumbers="true" %}

```sh
./slcli scan --bsid buildSessionId.txt  --path-to-scanner <path-to-build-scanner-executable>/slgoagent --workspacepath <path-to-app-dir> --disable-on-init true \
    --scm git --scmBaseUrl <base-url> --scmVersion "0" --scmProvider github
```

{% endcode %}

If working from the root directory of your project, you can use the following command

{% code overflow="wrap" lineNumbers="true" %}

```sh
./slcli scan --bsid buildSessionId.txt --path-to-scanner ./slgoagent --workspacepath ./ --scm git --disable-on-init true
```

{% endcode %}

{% hint style="info" %}
If you want to identify the parameters for the `scm` options, please refer to [Incorrect SCM Links](/knowledgebase/setup-and-configuration/troubleshooting-faq/general/incorrect-scm-links.md)
{% endhint %}

## Scanning a Lambda project <a href="#scanning-a-lambda-project" id="scanning-a-lambda-project"></a>

{% code overflow="wrap" lineNumbers="true" %}

```sh
./slcli scan --collector-url http://<your-collector-url>/api --light-mode true \
    --bsid buildSessionId.txt --path-to-scanner ./<path-to-build-scanner-executable>/slgoagent --workspacepath <path-to-app-dir> --disable-on-init true \
    --scm git --scmBaseUrl <base-url> --scmVersion "0" --scmProvider github 
```

{% endcode %}

{% hint style="warning" %}
**Unit Test Coverage in Lambda Workflows**

Using `--light-mode true` during the scan step may result in inaccurate Unit Test coverage data, depending on your workflow. If you find this is the case, you should take the following steps:\
1\. Remove `light-mode true` from the `slcli scan` command\
2\. Set the environment variable `SEALIGHTS_LIGHT_MODE: "true"`\
\
As noted, “light-mode” is a necessary parameter when deploying a Lambda function with SeaLights. Using this approach allows the unit test coverage data to be accurately resolved while still deploying the Lambda layer with the correct configuration.
{% endhint %}

## Ignoring Files during the build scan <a href="#ignoring-files-during-the-build-scan" id="ignoring-files-during-the-build-scan"></a>

To ignore certain files during the buildscan phase, create an `.slignore` file and place it at the root folder of the project. The agent will automatically look for this file during the execution of the command.

Below is a sample content of the file

{% code overflow="wrap" lineNumbers="true" %}

```
types # ignoring all the files and folders below types folder
types/results # ignoring all the files and folders below types/results folder
server/calc.go # ignoring only calc.go file under the server folder
**/result.go # ignoring all the result.go files under all the folders
cmd
```

{% endcode %}


---

# 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:

```
GET https://docs.sealights.io/knowledgebase/setup-and-configuration/sealights-agents-and-plugins/go-agent/go-agent-v1/scanning-a-build.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
