Git Product home page Git Product logo

secure-pipeline-java-demo's Introduction

Secure Pipelines Demo

Sample spring application with Jenkins pipeline script to demontrate secure pipelines

Pre Requesites

Setup Setps

Minikube setup

  • Setup minikube
    minikube start --nodes=1  --cpus=4 --memory=8g --disk-size=35g --embed-certs=true

Jenkins setup

  • Stup Jenkins server

    helm repo add stable https://kubernetes-charts.storage.googleapis.com
    helm repo update
    helm install jenkins stable/jenkins

    Note: Make a note of the password

  • [Optional] Forward Jenkins server port to access from local machine

    kubectl port-forward svc/jenkins 8080:8080
    open http://localhost:8080
  • Add additonal plugins to Jeninks server (Manage Jenkins -> Manage plugins)

    • BlueOcean
    • Configuration as Code
    • OWASP Dependency-Track

Dependency Track setup

  • Setup Dependency Track server

    helm repo add evryfs-oss https://evryfs.github.io/helm-charts/
    
    helm repo update
    
    kubectl create ns dependency-track
    
    helm install dependency-track evryfs-oss/dependency-track --namespace dependency-track

    Note: dependency-track will take some time to start (~1hr on low end Mac)

Link Jenkins and Dependency Track

  • Login to Dependency track -> Administration -> Access Management -> Teams -> Click on Automation -> Copy the API Keys

  • Login to Jenkins -> Manage Jenkins -> Configure System -> Scroll to bottom -> Configure the Dependency-Track URL and API key -> Save

  • Login to Dependency track -> Projects -> Create Project -> Fill Name and save -> Copy the UUID of the project from the URL

  • Update the UUID in the Jenkinsfile in the Depedency Track upload section

    Note: This UUID step is not required ideally, Projects will get created automatically - Looks like some open issue

New Jenkins Pipeline

Create a new Jenkins pipeline with this repo and trigger build

  • Login to Jenkins -> New Item -> Enter name and choose Pipeline -> Choose GitHub project and set project URL
  • Under pipeline section, Choose Pipeline script from SCM
  • Choose git as SCM and provide repo details
  • Save

Pipeline

Refer the below screenshot for the stages in the pipeline

Pipeline View

Pipeline View

Stage View

Stage View

Dependency Track

Dependency Track View

Tools

Stage Tool Comments
Secrets Scanner truffleHog
Dependency Checker OWASP Dependency checker
SAST OWASP Find Security Bugs
OSS License Checker LicenseFinder
SCA Dependency Track
Image Scanner Trivy
Image Hardening Dockle
K8s Hardening KubeSec
Image Malware scanning ClamAV TODO
DAST OWASP Baseline Scan

secure-pipeline-java-demo's People

Contributors

rmkanda avatar harinee avatar

Watchers

James Cloos avatar

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.