Commit 1bd6795a authored by Mark Lodato's avatar Mark Lodato
Browse files

Merge slsa-controls into this repository.

Each repo is small enough that it didn't make sense to have them

git-subtree-dir: controls
git-subtree-mainline: b0b5339e
git-subtree-split: 9f8fe446
parents b0b5339e 9f8fe446
Apache License
Version 2.0, January 2004
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
implied, including, without limitation, any warranties or conditions
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
See the License for the specific language governing permissions and
limitations under the License.
# SLSA: Technical Controls
This repository contains an index of technical controls that fit into the
[SLSA Framework](
NOTE: This is still a work in progress.
## Contents
* [Software Attestations]( How to represent software artifact
* [Policies]( Conventions for how to express security policies
based on attestations.
* [Survey]( Survey of existing and in-development controls that
relate to the framework.
## Project Goals
(1) Build an ecosystem around software attestations and policies, applicable to
use cases beyond SLSA and supply chain integrity:
* Establish clear and consistent terminology and data models.
* Define simple interfaces between layers/components, to allow
compatibility between implementations and to encourage discrete,
composable technologies.
* Recommend a cohesive suite of formats, conventions, and tools that are
known to work well together.
Currently, there are various projects in this space with overlapping missions
and incompatible interfaces. No one project solves all problems and it is
confusing to understand how the pieces fit together. Our goal is to define a
"well-lit path" to make it easier for users to achieve the guarantees they
(2) Provide recipes for achieving SLSA, built on the ecosystem above:
* Identify base technologies that meet the SLSA requirements, which serves as
guidance to system implementers on how to build SLSA-compl8iant services.
Example: "CI/CD systems should produce provenance attestations in format X."
* Recommend simple end-to-end solutions for end users (software developers) to
achieve SLSA. Example: "Configure GitHub this way to reach SLSA 3."
# Software Attestations
Author: \
Date: March 2021 \
## Objective
Standardize the terminology, data model, layers, and conventions for software
artifact metadata.
## Overview
A software attestation is a signed statement (metadata) about a software
artifact or collection of software artifacts. (Sometimes called a
"[software bill of materials]("
or SBoM. Not to be confused with
[remote attestation](
in the trusted computing world.)
An attestation is the generalization of raw artifact/code signing, where the
signature is directly over the artifact or a hash of artifact:
* With raw signing, a signature *implies* a single bit of metadata about the
artifact, based on the public key. The exact meaning must be negotiated
between signer and verifier, and a new keyset must be provisioned for each
bit of information. For example, a signature might denote who produced an
artifact, or it might denote fitness for some purpose, or something else
* With an attestation, the metadata is *explicit* and the signature only
denotes who created the attestation. A single keyset can express an
arbitrary amount of information, including things that are not possible with
raw signing. For example, an attestation might state exactly how an artifact
was produced, including the build command that was run and all of its
## Intended Use Case
The primary intended use case is to feed into an
[automated policy framework]( See that doc for more info.
Other use cases are "nice-to-haves", including ad-hoc analysis.
## Model and Terminology
We define the following model to represent any software attestations, regardless
of format. Not all formats will have all fields or all layers, but to be called
an "attestation" it must fit this general model.
The key words MUST, SHOULD, and MAY are to be interpreted as described in
[RFC 2119](
<p align="center"><img width="100%" src="images/attestation_layers.svg"></p>
Example in English:
<p align="center"><img width="80%" src="images/attestation_example_english.svg"></p>
- **Artifact:** Immutable blob of data, usually identified by cryptographic
content hash. Examples: file content, git commit, Docker image. May also
include a mutable locator, such as a package name or URI.
- **Attestation:** Authenticated, machine-readable metadata about one or more
software artifacts. MUST contain at least:
- **Envelope:** Authenticates the message. At a minimum, it contains:
- **Message:** Content (statement) of the attestation. The message
type SHOULD be authenticated and unambiguous to avoid confusion
- **Signature:** Denotes the **attester** who created the attestation.
- **Statement:** Binds the attestation to a particular set of artifacts.
This is a separate layer is to allow for predicate-agnostic processing
and storage/lookup. MUST contain at least:
- **Subject:** Identifies which artifacts the predicate applies to.
- **Predicate:** Metadata about the subject. The predicate type SHOULD
be explicit to avoid misinterpretation.
- **Predicate:** Arbitrary metadata in a predicate-specific schema. MAY
- **Link:** *(repeated)* Reference to a related artifact, such as
build dependency. Effectively forms a
[hypergraph]( where the
nodes are artifacts and the hyperedges are attestations. It is
helpful for the link to be standardized to allow predicate-agnostic
graph processing.
- **Bundle:** A collection of Attestations, which are usually but not
necessarily related.
- Note: The bundle itself is unauthenticated. Authenticating multiple
attestations as a unit is [TBD](#compound-statement).
- **Storage/Lookup:** Convention for where attesters place attestations and
how verifiers find attestations for a given artifact.
See [Survey]( for examples.
## Recommended Suite
We recommend a single suite of formats and conventions that work well together
and have desirable security properties. Our hope is to align the industry around
this particular suite because it makes everything easier. That said, we
recognize that other choices may be necessary in various cases.
Summary: Generate [in-toto]( attestations.
* Envelope:
(TODO: Recommend Crypto/PKI)
* Statement:
* Predicate: Choose as appropriate.
* [Provenance](
* [SPDX](
* If none are a good fit, invent a new one.
* Bundle and Storage/Lookup:
* Local Filesystem: TODO
* Docker/OCI Registry:
See [survey]( for other options.
## Future Extensions
### Expanded artifact definition
TODO: Can a subject of an attestation be something like "GCP project at time T"?
That is logically immutable since the "at time T" cannot change.
### Compound predicate
TODO: One subject but multiple predicates. Should we offer an opinion on whether
this is represented at the Statement layer (repeated predicate) or Predicate
layer (a "compound" type predicate)?
### Compound statement
TODO: One envelope has multiple statements (separate subject+predicate pairs)
signed as a unit, which are not valid individually. Is this one attestation or
TODO: Should we represent this as multiple messages within the envelope (i.e. a
shim) or as a new type of Statement that refers to the other Statements (perhaps
too complicated).
### Attestation as an artifact
TODO: If you have separate signed attestations and want to refer to the
collection (e.g. a signed bundle), you can create a statement referring to all
of them as the subject.
TODO: Figure out serialization. Previously I had been thinking envelopes didn't
have to be serialized deterministically, but now if they are an Artifact it does
have to be deterministic/immutable.
## Appendix: Naming
TODO(lodato) Provide a survey of possible names we considered, along with
pros/cons: Attestation, Testimony, Testament, Claim, Voucher, Statement,
Predicate, Message, Finding.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
# Attestation-based Policies
Author: \
Date: March 2021 \
## Objective
Standardize the terminology, data model, and interfaces for admission control
policy based on [software attestations](
## Model and Terminology
*TODO: Define what an attestation-based admission control policy is.*
<p align="center"><img width="50%" src="images/policy_model.svg"></p>
To make the decision, a policy engine combines the following:
- The artifact identifier, usually a cryptographic content hash.
- One or more attestations about the artifact or related artifacts.
- A policy describing the requirements as a function of the attestations.
The decision is usually "allow" or "deny". It may be preventative
("enforcement") or detective ("auditing").
*TODO: Better define the policy model, including the notion of attester, subject
verification, logging, etc.*
*TODO: Note that a policy decision may itself be an attestation that can be fed
into further policy decisions down the line.*
*TODO: Two modes: (a) only allow if a "good" attestation exists,
even if there also exists some "bad" attestation; (b) block if some "bad"
attestation exists, even if there also exists some "good" attestation. Talk
about threat model and whether the attestation storage is trusted. (a) is better
for enforcement in the critical path, while (b) is useful for vulnerability
# Survey of Known Technologies
Author: \
Date: March 2021 \
## Objective
Document all known technologies that relate to SLSA, how they map to our model,
and a (hopefully not too biased) assessment of various properties of each.
See [Attestations]( and [Policy]( for the
corresponding models and terminology.
## Overview
The following table provides an overview of how various technologies map to our
model. Subsequent sections analyze each layer.
[Binary Authorization]:
[Notary v2]:
[Simple Signing]:
[in-toto v1]:
[in-toto v2]:
Project | Envelope | Statement | Predicate | Storage | Generation | Policy | Status
---------------------- | -------- | --------- | --------- | ------- | ---------- | ------ | ------
Raw signing | ✓ | ✓ | ✗ | | | | (varies)
[JSS] | ✓ | | | | | | Abandoned
[JWS] | ✓ | | | | | | IETF Standard
[JWT] | ✓ | | | | | | IETF Standard
[OpenPGP] | ✓ | | | | | | IETF Standard
[PASETO] | ✓ | | | | | | Stable
[signing-spec] | ✓ | | | | | | In development
[in-toto v1] | ✓ | ✓ | ✓ | | ✓ | ✓ | Stable
[Notary v2] | ~ | ✓ | ✗ | ✓ | | ✓ | In development
[Simple Signing] | ~ | ✓ | | | | | Stable
[in-toto v2] | ~ | ✓ | | | | | In development
[SPDX] | | | ✓ | | | | Stable
[Binary Authorization] | ~ | ~ | ✗ | ~ | | ✓ | Stable
* ✓ Defines this layer
* ✗ Does not support this layer
* ~ Imposes requirements on this layer
* (blank) No opinion on this layer
* Envelope: Defines the envelope layer of the attestation.
* Statement: Defines the statement layer of the attestation.
* Predicate: Defines the predicate layer of the attestation.
* Storage: Provides a mechanism for attestation storage and retrieval.
* Generation: Provides a mechanism for generating attestations.
* Policy: Provides a mechanism for consuming attestations and rendering policy
* Status: Is it available now?
## Envelope Layer (not specific to Attestations)
Property | [signing-spec] | [OpenPGP] | [JWS] | [JWT] | [PASETO] | [in-toto v1] | [JSS]
----------------------- | -------------- | --------- | ----- | ----- | -------- | ------------ | -----
Authenticated Purpose | ✓ | ✗ | ✓ | ✓ | ✗ | ✓ | ✗
Arbitrary Message Type | ✓ | ✓ | ✓ | ✗ | ✗ | ✗ | ✗
Simple | ✓ | ✗ | ✗ | ✗ | ✓ | ✓ | ✓
Avoids Canonicalization | ✓ | ✓ | ✓ | ✓ | ✓ | ✗ | ✓
Pluggable Crypto | ✓ | ✗ | ✓ | ✓ | ✗ | ✓ | ✓
Efficient Encoding | ✓ | ✗ | ✗ | ✗ | ✗ | ✓ | ✗
Widely Adopted | ✗ (not yet!) | ✓ | ✓ | ✓ | ✗ | ✗ | ✗
- **Authenticated Purpose:** Does the envelope authenticate how the verifier
should interpret the message in order to prevent confusion attacks?
- ✓ signing-spec: `payloadType`, JWS: `typ`, JWT: `aud`, in-toto v1:
- **Arbitrary Message Type:** Does the envelope support arbitrary message
types / encodings?
- ✗ PASETO, JWT, in-toto v1, JSS: only supports JSON messages
- **Simple:** Is the standard simple, easy to understand, and unlikely to be
implemented incorrectly?
- ✗ PGP: Enformous RFC.
- ✗ JWS, JWT: Enormous RFC, many vulnerabilities in the past.
- **Avoids Canonicalization:** Does the protocol avoid relying on
canonicalization for security, in order to reduce attack surface?
- ✗ in-toto v1: Relies on Canonical JSON
- **Pluggable Crypto:** If desired, can the cryptographic algorithm and key
management be swapped out if desired? (Not always desirable.)
- ✗ OpenPGP: Uses PGP
- ✗ PASETO: Mandates very specific algorithms, e.g. ed25519
- **Efficient Encoding:** Does the standard avoid base64, or can the envelope
be re-encoded in a more efficient format, such as protobuf or CBOR, without
invalidating the signature?
- **Widely Adopted:** Is the standard widely adopted?
- ✗ signing-spec: Not yet used, though in-toto and TUF plan to.
- ✗ PASETO: Not common.
- ✗ in-toto v1: Only by in-toto and TUF.
- ✗ JSS: Abandoned, never used.
## Statement Layer
Property | [in-toto v2] | [in-toto v1] | [Simple Signing] | [Notary v2] | Raw Signing
--------------------- | ------------ | ------------ | ---------------- | ----------- | -----------
Recommended Envelope | signing-spec | in-toto v1 | OpenPGP | JWT | (various)
Subject: Clear | ✓ | ✗ | ✓ | ✓ | ✓
Subject: Any Type | ✓ | ✓ | ✗ | ✓ | (depends)
Subject: Multi-Digest | ✓ | ✓ | ✗ | ✗ | (depends)
Predicate: Supported | ✓ | ✓ | ✓ | ✗ | ✗
Predicate: Flexible | ✓ | ✗ (*) | ✓ | (n/a) | (n/a)
Predicate: Typed | ✓ | ✗ | ✗ | (n/a) | (n/a)
Layered | ✓ | ✗ | ✓ | (n/a) | (n/a)
Evolvable | ✓ | ✓ | ✗ | ✓ | ✗
- **Recommended Envelope:** Which envelope is recommended (or possibly
- **Subject: Clear:** Is the Attestation clearly about a particular
- ✗ in-toto v1: Subject is ambiguous between `materials` and `products`.
- **Subject: Any Type:** Does Subject support arbitrary Artifact types?
- ✗ Simple Signing: `critical.image` only supports Docker/OCI image
manifests (and because it's `critical`, that field is required.) Also,
`critical.identity` is required but not applicable to all use cases
(e.g. build provenance, where the identity is not yet known).
- **Subject: Multi-Digest:** Does Subject support specifying multiple digest
algorithms for crypto agility?
- ✗ Simple Signing, Notary v2: Only one digest supported. (The `multihash`
algorithm mentioned in the OCI image-spec is not defined or implemented
- **Predicate: Supported:** Can a predicate be supplied?
- ✗ Notary v2: Does not officially support a predicate. Undefined what
happens if extra predicate fields are added to the JWT.
- **Predicate: Flexible:** Can a user-defined predicate be used?
- ✗ in-toto v1: Several fixed, required predicate fields. Technically
arbitrary data can be added to `environment` but that is not well
documented or standardized.
- ✓ Simple Signing: Can use `optional` field.
- **Predicate: Typed:** Is there a well-established convention of indicating
the meaning of the Attestation and/or the schema of the user-defined
predicate unambiguous?
- **Layered:** Does the schema clearly match the layers of our
- ✗ in-toto v1: Statement and Predicate fields are mixed together.
- **Evolvable:** Can the spec be modified to support required features?
- ✗ Simple Signing: The `critical` field can effectively never change
because the producer and consumer must agree in lock step.
## Bundle + Storage/Lookup
- Local filesystem
- (none yet)
- OCI/Docker Registry:
- [sigstore/cosign]( **(recommended)**
- [Notary v2]
## Raw artifact signing
For reference, we list examples of raw artifact signing, where the statement
only contains the subject.
- [Node.js](
- Envelope: PGP Signed Message.
- Statement: List of (sha256, filename) pairs.
Show how the following are related:
- Cosign / SigStore
- Kritis
- Grafeas / Container Analysis
- Docker Content Trust
- Notary v1
- "attached" signatures. RPMs, Maven artifacts, Windows drivers, OSX app store
- Android APK signatures
- (Public) transparency ledger?
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment