Skip to main content

Towards more secure containerized workloads

One element to improve the security of your software systems, is the Software Bill Of Materials(SBOM). Today most applications are build using a combination of open source and commercial software components. The SBOM lists all the components that make up the software , or were used to build it.

The concept of a BOM is well-established in traditional manufacturing as part of supply chain management.A manufacturer uses a BOM to track the parts it uses to create a product. If defects are later found in a specific part, the BOM makes it easy to locate affected products.

The recent Log4J vulnerability was a good example of why such an SBOM is important to find out if one of your systems or applications is impacted or not. Some of my customers had no idea if they were impacted or not and had to search through all there systems and applications which of course is time consuming and error-prone.

Docker sbom

Starting from Docker Desktop 4.7, a new CLI command is introduced that displays the SBOM for a docker image. This helps to make container images more transparent and gives you an easy way to see what is inside of them.

It is using the open source syft project behind the scenes.

Let’s give the command a try for one of our containers. We’ll use the masstransit/rabbitmq:latest image as an example. 

PS C:\> docker sbom masstransit/rabbitmq:latest
NAME                    VERSION                TYPE
.otp-run-deps           20211006.011020        apk
alpine-baselayout       3.2.0-r16              apk
alpine-keys             2.3-r1                 apk
apk-tools               2.12.7-r0              apk
bash                    5.1.4-r0               apk
busybox                 1.33.1-r3              apk
ca-certificates-bundle  20191127-r5            apk
expat                   2.4.1-r0               apk
gdbm                    1.19-r0                apk
libbz2                  1.0.8-r1               apk
libc-utils              0.7.2-r3               apk
libcrypto1.1            1.1.1l-r0              apk
libffi                  3.3-r2                 apk
libgcc                  10.3.1_git20210424-r2  apk
libintl                 0.21-r0                apk
libproc                 3.3.17-r0              apk
libretls                3.3.3p1-r2             apk
libssl1.1               1.1.1l-r0              apk
libstdc++               10.3.1_git20210424-r2  apk
mpdecimal               2.5.1-r1               apk
musl                    1.2.2-r3               apk
musl-utils              1.2.2-r3               apk
ncurses-libs            6.2_p20210612-r0       apk
ncurses-terminfo-base   6.2_p20210612-r0       apk
procps                  3.3.17-r0              apk
python3                 3.9.5-r1               apk
readline                8.1.0-r0               apk
scanelf                 1.3.2-r0               apk
sqlite-libs             3.35.5-r0              apk
ssl_client              1.33.1-r3              apk
su-exec                 0.2-r1                 apk
xz-libs                 5.2.5-r0               apk
zlib                    1.2.11-r3              apk
   

It is also possible to output this list to a file in any of the following formats:

Here we write the output to an sbom.json file using the syft format:

PS C:\> docker sbom masstransit/rabbitmq:latest --format syft-json --output sbom.json

We can now load this file in a tool like Grype to check for any known vulnerabilities, but that is something I’ll show in my post tomorrow.

More information: https://anchore.com/sbom/docker-sbom-command-creates-sbom-using-syft/

Popular posts from this blog

Azure DevOps/ GitHub emoji

I’m really bad at remembering emoji’s. So here is cheat sheet with all emoji’s that can be used in tools that support the github emoji markdown markup: All credits go to rcaviers who created this list.

Kubernetes–Limit your environmental impact

Reducing the carbon footprint and CO2 emission of our (cloud) workloads, is a responsibility of all of us. If you are running a Kubernetes cluster, have a look at Kube-Green . kube-green is a simple Kubernetes operator that automatically shuts down (some of) your pods when you don't need them. A single pod produces about 11 Kg CO2eq per year( here the calculation). Reason enough to give it a try! Installing kube-green in your cluster The easiest way to install the operator in your cluster is through kubectl. We first need to install a cert-manager: kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.14.5/cert-manager.yaml Remark: Wait a minute before you continue as it can take some time before the cert-manager is up & running inside your cluster. Now we can install the kube-green operator: kubectl apply -f https://github.com/kube-green/kube-green/releases/latest/download/kube-green.yaml Now in the namespace where we want t

DevToys–A swiss army knife for developers

As a developer there are a lot of small tasks you need to do as part of your coding, debugging and testing activities.  DevToys is an offline windows app that tries to help you with these tasks. Instead of using different websites you get a fully offline experience offering help for a large list of tasks. Many tools are available. Here is the current list: Converters JSON <> YAML Timestamp Number Base Cron Parser Encoders / Decoders HTML URL Base64 Text & Image GZip JWT Decoder Formatters JSON SQL XML Generators Hash (MD5, SHA1, SHA256, SHA512) UUID 1 and 4 Lorem Ipsum Checksum Text Escape / Unescape Inspector & Case Converter Regex Tester Text Comparer XML Validator Markdown Preview Graphic Color B