🔘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.

Intro:

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.

Instructions:

Add Pynt ID to Jenkins environment variables:

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)

Last updated