Software of unknown pedigree (SOUP) for Rust and TypeScript

jayvdb 48 views 20 slides Oct 15, 2024
Slide 1
Slide 1 of 20
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20

About This Presentation

Generating SOUP records using Rust


Slide Content

SOUP for Rust and TypeScript
@jayvdb
franklin.ai

franklin.ai

franklin.ai
Kubernetes
Rust services wrapping
Python AI
Electron frontend

Software of unknown pedigree
(SOUP)
software that has NOT been
developed with a known
software development process
 or methodology, or which has
unknown or no safety-related
properties.
https://en.wikipedia.org/wiki/Software_of_unknown_pedigree
 IEC 62304:2006

Software of unknown pedigree
(SOUP)
●i.e. Programming language
compilers/runtimes, and
package managers.
i.e. Open source libraries.
i.e. Docker images. e.g. “redis”
Github actions “uses: …” ?
Helm charts … ?

SOUP records
●For each SOUP:
–Name
–Version
–Manufacturer
–Any custom requirements
–Website of bug reports and release
notes
–How is it used in the product

SOUP risk evaluation
●For each SOUP, what safety classification is it:
–Class A: No unacceptable risk to health
–Class B: Injury is possible but not serious
–Class C: Death or serious injury is possible

Non-product dependencies
●Build dependencies
–Is generated code
being formally
reviewed? Check it
in.
●Test dependencies
–Are the tests
mentioned in the
formal product
verification
protocols?
●Spell checker
●License checker
●Linters
●Optional developer
workflow helpers
X✓
Doc dependencies
Are the docs critical
to product use?
Are the doc outputs
reviewed?
?

Collate the SOUP
●company-product
–company-lib
●Open-source build tool
●Open-source test tool
●Open-source lib
–Open-source lib



x
x

Collate the SOUP
●company-product
–company-lib
●Open-source build tool
●Open-source test tool
●Open-source lib
–Open-source lib



x
x

cargo lock





x

Collate the SOUP
●company-product
–company-lib
●Open-source build tool
●Open-source test tool
●Open-source lib
–Open-source lib



x
x

npm lock
x




x

Collate the SOUP
Two choices:
1)Build SOUP at each level of the dependency tree,
put the SOUP into the versioned library
packages, and merge the SOUP at the top level.
2)Include lock files in library packages, and build a
tool to create the SOUP at the top level, using
the lock files.
Both require a manual process or custom tool to
create the final unified SOUP list.

I chose option 2
●Distributing lock files in packages is a technical
step.
●No significant extra effort during development. No
SOUP step for each library version. Library
versions are cheap.
●Extra effort occurs at product release, combining all
the lock files.
●Only need to consider the versions of libraries
included in the release.

I chose Rust
I used “cargo_metadata” crate to understand cargo
dependency tree.

I chose Rust
I found a 8 star repo that understood package.json.

I chose Rust
I found a 8 star repo that understood package.json.

I chose Rust
I found a random 0 star repo that understood pnpm
lock files. And then needed to create a lib from it.

I chose Rust
●Oh, and we need
package
descriptions
from
npmjs.net ...

TODO
●Add Python using phylum_lockfile
https://github.com/phylum-dev/cli

TODO
●Publish ...
QUESTIONS?
@jayvdb
franklin.ai