The StackRox Jenkins Plugin for image scanning and security.
Please take a look at plugin README
- Requirements
- Podman/Docker
- Java 8
- Create HPI file
cd stackrox-container-image-scanner
./mvnw package && ./mvnw hpi:hpi
- Run Jenkins with plugin installed
cp stackrox-container-image-scanner/target/stackrox-container-image-scanner.hpi jenkins/
docker build -t jenkins-test jenkins
docker run -d --add-host host.docker.internal:host-gateway -p 8080:8080 jenkins-test
- Run the E2E tests
export JENKINS_ROX_ENDPOINT='https://host.docker.internal:8000' # endpoint accessed by jenkins
export ROX_ENDPOINT='https://localhost:8000' # endpoint accessed from local machine
export ROX_PASSWORD=... # stackrox admin password
make -C functionaltest-jenkins-plugin test
- This project uses Lombok so you may need to enable Annotation Processing
- Go to recent version of running rox instance (e.g.
https://k8s.demo.stackrox.com
) - Navigate to API Docs
/main/apidocs
- Download OpenAPI specification (link may change between versions)
- Convert JSON to YAML (e.g. with https://editor.swagger.io/)
- Add authorization methods if it's not defined
- In
components:
add
securitySchemes: basicAuth: type: http scheme: basic bearerAuth: type: http scheme: bearer
- In root add:
security: - basicAuth: [ ] - bearerAuth: [ ]
- In
- Save changes in
stackrox-container-image-scanner/api.yaml
The release process is managed by the release.yml GitHub Action. When running the workflow, ensure that the correct version is specified in the workflow options. After the release, it typically takes a few hours for the plugin to be available on the Jenkins Plugin site.