voltone

voltone

SBoM - Mix task to generate a Software Bill-of-Materials (SBoM)

Generates a dependency inventory, or “Software Bill-of-Materials” (SBoM), including package versions and licenses, in a format that can be imported into free or commercial tools for Software Composition Analysis. Currently supports CycloneDX format.

Hex: https://hex.pm/packages/sbom
Hexdocs: https://hexdocs.pm/sbom/
GitHub: https://github.com/voltone/sbom

Blog post, showing the creation of a combined Hex/NPM SBoM for a Phoenix project, including loading the result into an OWASP Dependency-Track server: https://blog.voltone.net/post/24

Most Liked

hauleth

hauleth

I have created GitHub Action for generating SBoM using this project. I hope that this will help with adoption.

voltone

voltone

Version 3.7.1 of OWASP Dependency-Track comes with Hex integration, flagging available package updates:

kip

kip

ex_cldr Core Team

Thanks for the suggestion - updated all my libs with the :licenses key as you suggest. Now to check out @hauleth’s GitHub action!

voltone

voltone

Specifically for CVEs there isn’t anything that can be done: CVEs use CPE values to identify affected software components, and CPEs are assigned by NVD or a CVE Numbering Authority (CNA) if and when they are needed. For open source projects hosted on GitHub the CPE is often derived from the account and repo names, but that’s not guaranteed. Officially a CPE value does not exist until it is added to the NVD database.

An alternative scheme, called purl, allows for more reliable package identification, regardless of whether or not a vulnerability was previously reported for it. This scheme is preferred over CPEs by CycloneDX, Dependency-Track and services like Sonatype’s OSS Index. I have proposed a formal definition of Hex package URLs to the Hex team.

One thing package maintainers can do to help SBoM tools, though unrelated to vulnerabilities, is to specify a package’s license using official SPDX Identifier in mix.exs:

  def project do
    [
      # ...
      package: [
        licenses: ["BSD-3-Clause"],
        # ...
      ]
    ]
  end

This ensures the package license is properly identified, and the SBoM scanner doesn’t have to fall back to heuristics or just mark the license as ‘unknown’.

voltone

voltone

Update:

I’ve published a Rebar3 plugin as well.

Hex: https://hex.pm/packages/rebar3_sbom
GitHub: https://github.com/voltone/rebar3_sbom

Where Next?

Popular in Libraries Top

wmnnd
Hi there, for my project DBLSQD, I needed a file storage solution that is a bit more flexible than Arc. Because I thought others might f...
New
versilov
Could not wait for the missing Elixir ML libraries to appear, so, I wrote one myself, taking https://github.com/sdwolfz/exlearn as a foun...
New
deadtrickster
I’ve just released stable versions of my Prometheus Elixir libs: Elixir client [docs]; Ecto collector [docs]; Plugs instrumenter/Export...
New
woutdp
Hi! I wanted to introduce my latest project LiveSvelte. It allows you to render Svelte inside LiveView with end-to-end reactivity. It’s ...
New
jakub-zawislak
Hi everyone, I’m coming from the Symfony (PHP) framework. I like Phoenix, but it has a one thing that was build much better in the Symfo...
New
danschultzer
None of the current solutions worked well for me, so I went ahead and built a user management system from scratch. This project took far...
548 27727 240
New
gabrielpoca
Hello everyone! I want to share with you something that I’m really proud of: https://stillstatic.io/ Still is a static site builder for...
New
KallDrexx
For a good number of months I've been working on creating a very basic RTMP live video streaming server. Now that I have a very, very ba...
New
ostinelli
Let’s write a database! Well not really, but I think it’s a little sad that there doesn’t seem to be a simple in-memory distributed KV da...
New
New

Other popular topics Top

chrismccord
Phoenix 1.4.0 released Phoenix 1.4 is out! This release ships with exciting new features, most notably with HTTP2 support, improved deve...
688 30048 115
New
yawaramin
In the Dialyzer docs ( http://erlang.org/doc/man/dialyzer.html#requesting-or-suppressing-warnings-in-source-files ), there is a way to tu...
New
openscript
Hello! Sorry for this astonishing simple question, but I’m really stuck. I try to set up the intellij-elixir plugin, but I don’t know ho...
New
sergio_101
I am VERY much an elixir newbie. I have taken one elixir course and one phoenix course on Udemy. During that course, I saw the instructor...
New
New
chrismccord
This release brings a number of exciting features, including integration with the new Phoenix LiveDashboard and Phoenix LiveView. There h...
New
chensan
I have a User schema with a :from_id field set to type :string: defmodule TweetBot.Repo.Migrations.CreateUsers do use Ecto.Migration ...
New
ashish173
I am using Ecto timestamps with postgres, I can see the timestamps() use the :naive_dateime but for my use case I wanted to store the ti...
New
qwerescape
Is there a way to get the call stack or stack trace at any point in the code? Not from exceptions, but an expression that returns how the...
New
Qqwy
Original source of discussion: This topic on the Pragmatic Programmers' Functional Web Development with Elixir, OTP, and Phoenix forum. ...
New

Sub Categories:

We're in Beta

About us Mission Statement