# Pynt for Jenkins

## **What is Jenkins?**

{% hint style="info" %}
💡 [**Jenkins**](https://www.jenkins.io/) is an open-source automation server used for continuous integration and delivery. Jenkins allows developers to build, test, and deploy software by automating tasks in customizable pipelines.
{% endhint %}

<figure><img src="/files/JfHSmuuzCeTDR4s0L6OR" alt="" width="188"><figcaption><p>Jenkins</p></figcaption></figure>

***

## Pynt's integration with Jenkins

As part of its [API security testing](/documentation/api-security-testing/security-testing-overview.md), Pynt allows seamless [integration](/documentation/security-testing-integrations/pynt-on-ci-cd.md) with Jenkins.

Pynt for Jenkins enables you to seamlessly integrate powerful API security testing into your Jenkins CI/CD pipelines. By incorporating Pynt into your Jenkins workflows, you can automate comprehensive security scans with every build, ensuring that your APIs are protected from vulnerabilities throughout the development process. Pynt’s integration with Jenkins is designed to be straightforward, allowing you to enhance your security posture without disrupting your existing CI/CD practices.

***

## Jenkins Configuration

Add [Pynt ID](/documentation/security-testing-integrations/pynt-on-ci-cd/how-to-get-pynt-id-for-ci-cd-authentication.md) to Jenkins environment variables:

<figure><img src="/files/76brHLpkwaiFih6kru0D" alt=""><figcaption></figcaption></figure>

* Make sure Python installed on the agent.
* An example for a Jenkins job running Pynt newman against goat collection:

```bash
echo "Pynt API Security testing"

# Using venv is a good practice
python3 -m venv myenv
. myenv/bin/activate

pip install pyntcli
export PATH=$PATH:/var/lib/jenkins/.local/lib/python3.10/site-packages

curl https://raw.githubusercontent.com/pynt-io/pynt/main/goat_functional_tests/goat.postman_collection.json -o goat.json 
pynt newman --collection goat.json --reporters
cat pynt_results.json

deactivate

```

***

## Controlling the return code from Pynt

`pynt newman` and `pynt command` have an optional flag `--severity-level`

With this flag, you have granular control over whether Pynt returns an error code (non zero) in the event of findings. Use this flag to control when Pynt will break the CI/CD run, allowed values are:

```
'all', 'medium', 'high', 'critical', 'none' (default) 
```

***

{% hint style="info" %}
💡 **Need Help?** For any questions or troubleshooting, reach out to the [**Pynt Community Support**](https://www.pynt.io/community).
{% endhint %}


---

# Agent Instructions: 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.pynt.io/documentation/security-testing-integrations/pynt-on-ci-cd/pynt-for-jenkins.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.
