jenkinsci / deepsecurity-smartcheck-plugin

Jenkins plugin that requests image scans from Deep Security Smart Check
Apache License 2.0
3 stars 2 forks source link

Deep Security Smart Check plugin for Jenkins

Integrate Deep Security Smart Check into your Jenkins container pipeline.

Installation

  1. In Jenkins, go to Manage Jenkins > Manage Plugins
  2. Select the Available tab
  3. Search for Deep Security Smart Check

Usage

Pre-registry scanning

Deep Security Smart Check can scan your images before they are pushed to your production registry. If you have enabled pre-registry scanning on your Deep Security Smart Check instance, you can use the preregistryScan and preregistryCredentialsId parameters in the smartcheckScan method:

smartcheckScan([
    imageName: "registry.example.com/my-project/my-image",
    smartcheckHost: "smartcheck.example.com",
    smartcheckCredentialsId: "smartcheck-auth",
    preregistryScan: true,
    preregistryCredentialsId: "preregistry-auth",
])

Scanning images in your registry

Deep Security Smart Check can also scan images that you have already pushed to your registry. In this example, the registry has credentials stored in the example-registry-auth Jenkins credential, and those credentials are passed in the imagePullAuth parameter to smartcheckScan:

withCredentials([
    usernamePassword([
        credentialsId: "example-registry-auth",
        usernameVariable: "REGISTRY_USER",
        passwordVariable: "REGISTRY_PASSWORD",
    ])
]){
    smartcheckScan([
        imageName: "registry.example.com/my-project/my-image",
        smartcheckHost: "smartcheck.example.com",
        smartcheckCredentialsId: "smartcheck-auth",
        imagePullAuth: new groovy.json.JsonBuilder([
            username: REGISTRY_USER,
            password: REGISTRY_PASSWORD,
        ]).toString(),
    ])
}

Parameters

Development

See DEVELOPMENT.md for instructions on getting started.

Contributing

If you encounter a bug, think of a useful feature, or find something confusing in the docs, please create a new issue!

We :heart: pull requests. If you'd like to fix a bug, contribute to a feature or just correct a typo, please feel free to do so.

If you're thinking of adding a new feature, consider opening an issue first to discuss it to ensure it aligns to the direction of the project (and potentially save yourself some time!).

Support

Official support from Trend Micro is not available. Individual contributors may be Trend Micro employees, but are not official support.