Giter Club home page Giter Club logo

jenkinsci-secone-security-plugin's Introduction

Sec1 Security

Sec1

Introduction

Sec1 Security plugin help developers/teams to scan their SCM for open source vulnerabilities against Sec1 Security DB

Usage

To use the plugin up you will need to take the following steps in order:

  1. Install the Sec1 Security Plugin
  2. Configure a Sec1 API Token Credential
  3. Add Sec1 Security to your Project

1. Install the SEC1 Security Plugin

  • Go to "Manage Jenkins" > "System Configuration" > "Plugins".
  • Search for "Sec1 Security" under "Available plugins".
  • Install the plugin.

Custom API Endpoints

By default, Sec1 uses the https://api.sec1.io endpoint. It is possible to configure Sec1 to use a different endpoint by changing the SEC1_INSTANCE_URL environment variable:

  • Go to "Manage Jenkins" > "System Configuration" -> "System"
  • Under "Global properties" check the "Environment variables" option
  • Click "Add"
  • Set the name to SEC1_INSTANCE_URL and the value to the custom endpoint

2. Configure a Sec1 API Token Credential

  • Go to "Manage Jenkins" > "Security" > "Credentials"
  • Choose a Store
  • Choose a Domain
  • Go to "Add Credentials"
  • Select "Secret text"
  • Add <YOUR_SEC1_API_KEY_ID> as ID and Configure the Credentials.
  • Remember the "ID" as you'll need it when configuring the build step.

To get Sec1 Api Key navigate to Scopy > "Login with GitHub" > "Settings"

  • In "API key" section, click on "Generate API key"
  • Copy key for use.
๐Ÿ“ท Show Preview

Sec1 API Token

3. Add Sec1 Security to your Project

This step will depend on if you're using Freestyle Projects or Pipeline Projects.

Freestyle Projects

  • Select a project
  • Go to "Configure"
  • Under "Build", select "Add build step" select "Execute Sec1 Security Scanner"
  • Configure as needed. Click the "?" icons for more information about each option.
๐Ÿ“ท Show Preview

Basic configuration

Pipeline Projects

Use the sec1Security step as part of your pipeline script. You can use the "Snippet Generator" to generate the code from a web form and copy it into your pipeline.

๐Ÿ“ท Show Example
pipeline {
  agent any

  stages {
    stage('Build') {
      steps {
        echo 'Building...'
      }
    }
    stage('Sec1 Security') {
            steps {
                script {
                    sec1Security (
                        scanFileLocation: "${WORKSPACE}", // this is the location of you scm checkout directory. if not configured don't change it.
                        apiCredentialsId: "<Your Sec1 Api Key ID>", 
                        //optional
                        applyThreshold: true,
                        actionOnThresholdBreached: "unstable",
                        threshold: [criticalThreshold: '0', highThreshold: '0']
                    )
                }
            }
        }
    stage('Deploy') {
      steps {
        echo 'Deploying...'
      }
    }
  }
}
Whether the step should fail if issues and vulnerabilities are found. You can pass the following parameters to your `sec1Security` step.

scanFileLocation (required, default: ${WORKSPACE})

Location where scm checkout is done. Default is ${WORKSPACE} of build job.

Scan will fill if you dont provide this value.

apiCredentialsId (optional, default: none)

Sec1 Api Key Credential ID. As configured in "2. Configure a Sec1 API Token Credential".

applyThreshold (optional, default: false)

Whether vulnerability threshold needs to be applied on the build.

threshold (optional, default: false)

Threshold values for each type of vulerability. e.g. configuration: [criticalThreshold: '0', highThreshold: '10', mediumThreshold: '0', lowThreshold: '0']

If scan reports gives more vulnerabilities than configured threshold for the respective type of vulnerability then error will be shown in console and build status will be modified based on actionOnThresholdBreached value.

actionOnThresholdBreached (optional, default: fail)

The action which needs to be taken on build if vulnerability threshold is breached. Possible values: fail, unstable, continue

Troubleshooting

To see more information on your steps:

  • View the "Console Output" for a specific build.

-- Sec1 team

jenkinsci-secone-security-plugin's People

Contributors

rahuldarekar222 avatar dependabot[bot] avatar 2lambda123 avatar imgbotapp avatar pixeebot avatar penify-dev[bot] avatar

Watchers

 avatar

jenkinsci-secone-security-plugin's Issues

๐Ÿงš๐Ÿค– Pixeebot Activity Dashboard

DashList

๐Ÿ‘‹ This dashboard summarizes my activity on the repository, including available improvement opportunities.

Recommendations

Last analysis: May 24 | Next scheduled analysis: May 28

Open

โœ… Nice work, you're all caught up!

Available

โœ… Nothing yet, but I'm continuing to monitor your PRs.

Completed

โœ… You merged improvements I recommended View

Metrics

What would you like to see here? Let us know!

Resources

๐Ÿ“š Quick links
Pixee Docs | Codemodder by Pixee

๐Ÿงฐ Tools I work with
Sonar, CodeQL, Semgrep

๐Ÿš€ Pixee CLI
The power of my codemods in your local development environment. Learn more

๐Ÿ’ฌ Reach out
Feedback | Support


โค๏ธ Follow, share, and engage with Pixee: GitHub | LinkedIn | Slack

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.