Software supply chain security Flashcards

1
Q

What is the basic SW supply chain flow?

A

Left: Upstream actors
Right: Downstream actors

Component sourcing - Development - production - distribution - consumption

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What does the software supply chain concern?

A

An organization’s use of externally supplied software in products

(open source or comercially purchased)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Name 4 properties of SW supply chain attacks

A

Compromise

Alteration

propagation

Exploitation

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is compromise?

A

Attacker finds an compromises an existing weakness within a supply chain

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is alteration?

A

An attacker leverages the initial compromise to alter the software supply chain

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is propagation?

A

The change introduced by the attacker propagates to downstream components and links

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is exploitation?

A

The attacker exploits the alteration in a downstream link

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is the different between supply chain attacks and vulnerable components?

A

Vulnerable components could be the consequence of careless or unintended use/integration of vulnerable components by downstream users.

Supply chain attacks always have malicious attackers in the loop, who purposely inject vulnerabilities and plan to exploit them in the future.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Name countermeasure strategies for each step in the supply chain attack

A

Compromise - transparency

Alteration - validity

Propagation - Separation

Exploitation - Recovery

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is transparency?

A

Builds trust and security

Enables perfect vision of all actors, ops and artifacts across the supply chain

Allow supply chain managers to identify link weaknesses before they are compromised, effectively preventing attackers from completing the first stage

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is validity?

A

By maintaining:
- integrity of artifacts, operations
- authentication of actors

No unautorized changes can be made to the supply chain

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is separation?

A

Compartmentalize and moderate interactions between entities.

Connections between artifacts, operations, and
actors are managed so malicious changes cannot affect other supply chain components.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is SBOM?

A

Software Bill of Materials

A nested inventory, a list of ingredients that compromise sw components

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is NPM audit?

A

Automatically checks all dependencies and its dependency tree for vulnerable packages.

Command: npm audit

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is code scanning?

A

Feature to analyze code in a git repo, to find vulnerabilities or code errors

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is dependabot?

A

discovers insecure dependencies in a project

When git detects vulnerable dependency in the default branch, dependabot creates a pull request to fix it.

PRs will upgrade the dependency to the minimum possible secure version needed to avoid the vulnerability

17
Q

What is in toto?

A

Framework that enforces the integrity of a SW supply chain by gathering cryptographically verifiable information about the chain itself

18
Q

What is a key element in In toto?

A

Layout: A recipe that identifies which steps will be performed, by whom, and in what order

Link metadata

The delivered product

19
Q

What is Link metadata in In toto?

A

Each link serves as a statement that a given step was carried out.

Sharing link metadata ensures no artifact are altered in transit

Cryptographically signed

20
Q

What is the delivered product in In toto?

A

End user utilize layout and link metadata to verify delivered product.

End user uses link metadata to verify that SW provided has not been tampered with and that all steps were performed as the project owner intended

21
Q

What is sigstore?

A

Makes software signing part of an invisible and ubiquitous infrastructure

Uses existing identity providers to issue short lived certificates of individual package signing workflows.

Users can sign with ephemeral keys, which allows devs to sign packages without managing their cryptographic material

22
Q

What 3 technologies does Sigstore use?

A

Artifact signing

Transparency logging

Identity providers (OpenID connect)

23
Q

What is transparency logging in Sigstore?

A

Certificate Transparency keeps a public transparency log of issued certificates so that a third party could notice if two CAS were to issue a certificate to the same domain

24
Q

What is Proxy?

A

Protects against fetching arbitrary packages in pace of legitimate packages, by not allowing an upstream request to the public registries

25
Q

Describe a threat model that regards Proxies

A

An attacker publishes a malicious package to a public registry, with the same name but higher version as an existing package in the private registry.

If a system omits the setting for only using internal registries, the package manager could default to public registry and download the malicious package.

26
Q

What is mirroring (threat model and countermeasure)?

A

Threat model: Package manager may download malicious packages from public registries

Countermeasure:
Organizations create private package feeds, to mitigate risk of pulling dependencies from public sources

27
Q

Give an example of mirroring countermeasures?

A

Using Maven

Specify the sources you want to download artifacts from

28
Q

What is Git commit signing used for?

A

Transparency and validity

29
Q

How does Git commit signing work?

A

Generate public-private key

Use private to sign commit

Use public keys to verify the author of a commit

30
Q

Name threat model and countermeasures of GitHub actions

A

Threat: Attack can modify build process

Counter:
- precise and repeatable build steps
- You know exactly what was running during build
- Ensure each build start in new environment

31
Q

What is scope used for?

A

Validity and separation

32
Q

What is the threat model and countermeasure of scope?

A

Threat: Dependency confusion risk, when internal package name is claimed by attacker on public registry

Counter:
- Restricting package namespace to organization or user using scope
- Can associate scopes with registry, ensuring all packages requests are routed to that registry

33
Q

Give an example of how scope is used

A

@somescope/packageName

34
Q

What is Containerization used for?

A

Separation

35
Q

Name the threat model and countermeasure of containerization

A

Threat: Attacker can propagate attack or consequences via unintended connections

Counter:
- Separate internal operations, artifacts and actors

36
Q

What is version locking used for?

A

Validity and separation

37
Q

Name the threat model and countermeasure of version locking

A

Threat: Malicious changes upstream may propagate downstream

Counter:
- Version locking ensure a link includes a particular version of an upstream component
- Relies on actors accurately setting and managing version numbers

38
Q

How should supply chain security move forways?

A

Most approaches do now focus on managing artifacts

More approaches are needed to focus on operations and actors

39
Q

Name the 3 countermeasure strategies

A

Transparency

Validity

Separation