> 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/developer-tools/integrations/snyk-ci-cd-integrations/bitbucket-pipelines-integration-using-a-snyk-pipe/how-to-add-a-snyk-pipe.md).

# How to add a Snyk pipe

Follow these steps to add a Snyk pipe:

1. Add the Snyk pipe while creating your pipeline or while editing an existing pipeline. See the Bitbucket documentation for more information: [pipelines](https://confluence.atlassian.com/bitbucket/configure-bitbucket-pipelines-yml-792298910.html) and [pipes](https://support.atlassian.com/bitbucket-cloud/docs/pipes/). When adding the Snyk pipe, follow the guidelines in the remaining steps.
2. Use the Bitbucket pipeline editor to update the `.yml` file configuration, select the correct language, and use the Bitbucket Pipes build directory when adding the Snyk pipe.
3. Paste the Snyk pipe into the Bitbucket editor interface after all build steps. Build steps are commands such as these: `npm install / composer install / bundle install / dotnet restore / docker build`
4. Ensure you paste the pipe **before** a deployment step, such as `npm publish` or `docker push`.
5. Configure the mandatory variables **SNYK\_TOKEN** and **LANGUAGE**.
6. (Optional) Choose whether to fail the pipeline on vulnerabilities found with **DONT\_BREAK\_BUILD** and **SEVERITY\_THRESHOLD** if it is used, and consider enabling **MONITOR**. For more information, see [Snyk pipe parameters and values](/developer-tools/integrations/snyk-ci-cd-integrations/bitbucket-pipelines-integration-using-a-snyk-pipe/snyk-pipe-parameters-and-values-bitbucket-cloud.md).
7. After Snyk is included in your pipeline commands, it looks for the manifest files in that repository, for example,`package.json`, `package-lock.json` , and performs the scan.

Results appear in the Bitbucket Pipelines output interface, similar to the following:

![Bitbucket Pipelines output interface - here the pipeline fails due to Snyk finding vulnerabilities](/files/xrA5mkduTKTV6wuqFihO)

{% hint style="info" %}
If the build fails, even if **MONITOR** is set to **True**, Snyk does not continue to the monitor stage because no Projects are deployed until the build succeeds. To enable monitoring on snyk.io of Projects with vulnerabilities, set **DONT\_BREAK\_BUILD** to **True**. You can use **SEVERITY\_THRESHOLD** to tell the pipe the severity threshold for failing the pipe at the scanning stage. For more information, see [Snyk pipe parameters and values](/developer-tools/integrations/snyk-ci-cd-integrations/bitbucket-pipelines-integration-using-a-snyk-pipe/snyk-pipe-parameters-and-values-bitbucket-cloud.md).
{% endhint %}


---

# 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://docs.snyk.io/developer-tools/integrations/snyk-ci-cd-integrations/bitbucket-pipelines-integration-using-a-snyk-pipe/how-to-add-a-snyk-pipe.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.
