January 20, 2021 By Steven Weaver 2 min read

In this article, we’ll show you how you can quickly set up Code Risk Analyzer to scan a simple Node.js app in your Git repo.

Code Risk Analyzer — a part of IBM Cloud Continuous Delivery — takes all of your Git-based code, configurations and deployment artifacts, builds a dependency graph and runs a pipeline of regulatory compliance control checks. It is embedded into existing development workflows, such as creating a change request or promoting a code change into the main development branch. It integrates the comprehensive security coverage and rich threat intelligence provided by Snyk and other sources to help developers automatically find, prioritize and fix vulnerabilities in open-source dependencies and containers, early in their workflow.

Setting up your toolchain

Code Risk Analyzer supports the Java™, Node.js and Python languages. For Node.js, dependencies are calculated by using the following files:

  • package-lock.json: The purpose of the file is to provide a manifest that calls out the exact version of every package in your tree the last time you ran npm install. It’s this file that Code Risk Analyzer uses to identify package dependencies in your code.
  • deployment.yml: This file specifies all the parameters involved in deploying your application to the Kubernetes cluster. This file is scanned for any misconfigurations or potential security or compliance issues, based on community and industry standards.
  • dockerfile: A dockerfile is a recipe for building Docker images, and the act of running a build command produces the image from that recipe. Code Risk Analyzer scans the dockerfile for OS and image dependencies which are then checked against known vulnerabilities.

To scan your repository, follow these steps (for more details, see the Code Risk Analyzer documentation):

  1. Use the Build your own toolchain template to create an empty toolchain. Note that currently, Code Risk Analyzer is available only in the Dallas region.
  2. Add the DevOps Insights tool integration to the toolchain.
  3. Add the code repo that contains the code you want to scan to the toolchain. For example, add a GitHub or GitLab repo.
  4. Create an API key to authenticate with Code Risk Analyzer.
  5. Create and configure a Tekton pipeline.
  6. Create a new Merge/Pull request in your repo. When the request is submitted, Code Risk Analyzer will automatically run a Tekton delivery pipeline to scan your repo. 
  7. Results of the scan will be shown in your Merge/Pull Request. 

Watch the how-to video

More resources and getting started

Code Risk Analyzer is included as part of IBM Cloud Continuous Delivery and is available in the IBM Cloud Dallas (US-South) region.

  • Read the IBM Research blog on Code Risk Analyzer.
  • For more information on Code Risk Analyzer, see the documentation
  • If you have any questions, get help directly from the IBM Cloud development teams by joining us on Slack.
Was this article helpful?
YesNo

More from Cloud

How digital solutions increase efficiency in warehouse management

3 min read - In the evolving landscape of modern business, the significance of robust maintenance, repair and operations (MRO) systems cannot be overstated. Efficient warehouse management helps businesses to operate seamlessly, ensure precision and drive productivity to new heights. In our increasingly digital world, bar coding stands out as a cornerstone technology, revolutionizing warehouses by enabling meticulous data tracking and streamlined workflows. With this knowledge, A3J Group is focused on using IBM® Maximo® Application Suite and the Red Hat® Marketplace to help bring…

How fintechs are helping banks accelerate innovation while navigating global regulations

4 min read - Financial institutions are partnering with technology firms—from cloud providers to fintechs—to adopt innovations that help them stay competitive, remain agile and improve the customer experience. However, the biggest hurdle to adopting new technologies is security and regulatory compliance. While third and fourth parties have the potential to introduce risk, they can also be the solution. As enterprises undergo their modernization journeys, fintechs are redefining digital transformation in ways that have never been seen before. This includes using hybrid cloud and…

IBM Cloud expands its VPC operations in Dallas, Texas

3 min read - Everything is bigger in Texas—including the IBM Cloud® Network footprint. Today, IBM Cloud opened its 10th data center in Dallas, Texas, in support of their virtual private cloud (VPC) operations. DAL14, the new addition, is the fourth availability zone in the IBM Cloud area of Dallas, Texas. It complements the existing setup, which includes two network points of presence (PoPs), one federal data center, and one single-zone region (SZR). The facility is designed to help customers use technology such as…

IBM Newsletters

Get our newsletters and topic updates that deliver the latest thought leadership and insights on emerging trends.
Subscribe now More newsletters