Secure your container images before deployment with Vulnerability Advisor

Share this post:

(Ed.–This post covers 1 of 3 related tutorials you can do around Kubernetes-based application development. At the end, the author mentions the other two–on creating a highly scalable web app in Kubernetes, and on setting up log data visualization.)

This section of an overall solution tutorial called “Continuous deployment to Kubernetes“covers the Vulnerability Advisor tool, which checks the security status of container images both before deployment while the containerized app is running.

If you follow the initial steps in the solution tutorial, you will create a Kubernetes cluster, an Express NodeJS app, and a toolchain to continuously deploy the app updates. You will be then ready to use the Vulnerability Advisor as part of a DevOps pipeline.

Start the full tutorial

Security using Vulnerability Advisor

  1. Go to the toolchain you created under DevOps toolchains and click the Delivery Pipeline tile.
  2. Click on Add Stage and change MyStage to Validate Stage.
  3. Click on JOBS > ADD JOB.
  4. Select Test as the Job Type and Change Test to Vulnerability advisor in the box.
  5. Under Tester type, select Vulnerability Advisor. All the other fields should be populated automatically.
  6. Drag and move the Validate Stage to the middle. Container Registry namespace should be same as the one mentioned in Build Stage of this toolchain.
  7. Click Run on the Validate Stage.You will see that the Validate stage fails.

Let’s fix the vulnerabilities.

  • Open the cloned repository in an IDE or select Eclipse Orion web IDE tile, open Dockerfile and add the below command after EXPOSE 3000

RUN apt-get update && apt-get install -y \
libc6 \
systemd \
sensible-utils \

  • Commit and Push the changes. This should trigger the toolchain and fix the Validate Stage.

git add Dockerfile
git commit -m "Fix Vulnerabilities"
git push origin master

More about Vulnerability Advisor

Seeing the logs and history, you may have figured out that Vulnerability Advisor provides security management for IBM Cloud Kubernetes Service. Vulnerability Advisor generates a security status report, suggests fixes and best practices, and provides management to restrict nonsecure images from running. Fixing the security and configuration issues that are reported by Vulnerability Advisor can help you secure your IBM Cloud infrastructure.

Vulnerability Advisor includes the following features:

  • Scans images for vulnerabilities
  • Provides an evaluation report based on security standards and security practices specific to IBM Cloud Container Service
  • Detects file-based malware
  • Provides recommendations to secure configuration files for a subset of application types
  • Provides instructions on how to fix a reported vulnerable package or configuration issue in its reports

In the Registry dashboard, the SECURITY REPORT column displays the status of your repositories. The report identifies good cloud security practices for your images.

The Vulnerability Advisor dashboard provides an overview and assessment of the security for an image. To find out more about the Vulnerability Advisor dashboard, see Reviewing a vulnerability report.

Slack Integration

As part of the full tutorial, you will setup Slack integration to send notifications on your pipeline stages to a specific channel.

Start the Vulnerability Advisor tutorial

With your pipeline and auto-notifications in place, follow up with another tutorial to add data visualization and analytics to the logging and monitoring that comes with your Kubernetes cluster. And consider doing the tutorial on developing a highly scalable web app. While you’re at it, consider what’s involved in adding a chatbot to that web experience; here’s how online-only banker UBank did it.

Technical Offering Manager & Polyglot Programmer | IBM Cloud

More How-tos stories
May 6, 2019

Use IBM Cloud Certificate Manager to Obtain Let’s Encrypt TLS Certificates for Your Public Domains

IBM Cloud Certificate Manager now lets you obtain TLS certificates signed by Let’s Encrypt. Let’s Encrypt is an automated, ACME-protocol-based CA that issues free certificates valid for 90 days.

Continue reading

May 6, 2019

Are You Ready for SAP S/4HANA Running on Cloud?

Our clients tell us SAP applications are central to their success and strategy for cloud, with a deadline to refresh the business processes and move to SAP S/4HANA by 2025. Now is the time to assess, plan and execute the journey to cloud and SAP S/4HANA

Continue reading

May 1, 2019

What’s Included in the IBM Cloud Developer Tools Version 2.2.0

I’m pleased to announce the latest version of IBM Cloud Developer Tools CLI, which contains some exciting new features.

Continue reading