Coder Social home page Coder Social logo

stackrox / jenkins-plugin Goto Github PK

View Code? Open in Web Editor NEW
5.0 5.0 1.0 2.03 MB

The StackRox Jenkins Plugin for image scanning and security

Home Page: https://plugins.jenkins.io/stackrox-container-image-scanner/

Java 64.09% HTML 1.05% CSS 4.17% JavaScript 6.32% Shell 1.23% Groovy 22.49% Makefile 0.41% Dockerfile 0.24%
containers hacktoberfest jenkins k8s security stackrox

jenkins-plugin's Introduction

jenkins-plugin

The StackRox Jenkins Plugin for image scanning and security.

Configuration

Please take a look at plugin README

Development

Setup

  1. Requirements
  • Podman/Docker
  • Java 8
  1. Create HPI file
 cd stackrox-container-image-scanner
 ./mvnw package && ./mvnw hpi:hpi
  1. 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
  1. 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
  1. This project uses Lombok so you may need to enable Annotation Processing

Updating API Schema

  1. Go to recent version of running rox instance (e.g. https://k8s.demo.stackrox.com)
  2. Navigate to API Docs /main/apidocs
  3. Download OpenAPI specification (link may change between versions)
  4. Convert JSON to YAML (e.g. with https://editor.swagger.io/)
  5. 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: [ ]
  6. Save changes in stackrox-container-image-scanner/api.yaml

jenkins-plugin's People

Contributors

akshatrox avatar clickboo avatar dcaravel avatar dependabot[bot] avatar dhaus67 avatar gaurav-nelson avatar gavin-stackrox avatar janisz avatar joshdk avatar misberner avatar roxbot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

janisz

jenkins-plugin's Issues

Unify build process for tests and plugin

Currently we have maven and gradle. It will be best if functional tests uses the same build tool as jenkins plugin. Ideally it should also use the same deps and generated code. To solve this we may need to move from maven to gradle in jenkins plugin and create a multi project build. This will allow us to share dependencies and generated artifacts between tests and plugin.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.