🔘Pynt for Jenkins

Integrate Pynt with Jenkins for automated API security testing. Enhance your CI/CD pipeline by adding Pynt’s robust security scans to your Jenkins workflows.

What is Jenkins?

💡 Jenkins 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.


Pynt's integration with Jenkins

As part of its API security testing, Pynt allows seamless integration 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 to Jenkins environment variables:

  • Make sure Python installed on the agent.

  • An example for a Jenkins job running Pynt newman against goat collection:

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 --return-error

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-findings' (warnings or errors),
'errors-only',
'never' (default)

💡 Need Help? For any questions or troubleshooting, reach out to the Pynt Community Support.

Last updated