Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

content: source-track: rename SCP to SCS, replace open issues section with links to project and label queries #1166

Closed
wants to merge 14 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 21 additions & 32 deletions docs/spec/draft/source-requirements.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,7 @@
## Outstanding TODOs

Open issues are tracked with the [source-track](https://github.com/slsa-framework/slsa/issues?q=is%3Aissue+is%3Aopen+label%3Asource-track) label in the [slsa-framework/slsa](https://github.com/slsa-framework/slsa) repository.

- [] [Structure & formatting don't match the build track](https://github.com/slsa-framework/slsa/issues/1069)
- [] [Either identify the unique value of L1 or merge it with L2](https://github.com/slsa-framework/slsa/issues/1070)
- [] [How to communicate SLSA source track metadata?](https://github.com/slsa-framework/slsa/issues/1071)
- [] [Clarify source track objective](https://github.com/slsa-framework/slsa/issues/1072)
- [] [Clarify the 'merger' identity in source track](https://github.com/slsa-framework/slsa/issues/1074)
- [] [Flesh out the definition and bounds of 'identity', and why they're required](https://github.com/slsa-framework/slsa/issues/1075)
- [] [VCS and SCP concerns are mixed or too prescriptive](https://github.com/slsa-framework/slsa/issues/1076)
- [] [Clarify that self-hosted SCPs are allowed](https://github.com/slsa-framework/slsa/issues/1077)
- [] [Create guidance for consumers on how to evaluate the source platform](https://github.com/slsa-framework/slsa/issues/1078)
- [] [Clarify what must be retained during source migrations](https://github.com/slsa-framework/slsa/issues/1079)
- [] [Refine requirements/guidance for trusted robots](https://github.com/slsa-framework/slsa/issues/1080)
Source Track issues are triaged on the [SLSA Source Track](https://github.com/orgs/slsa-framework/projects/5) project board.

## Objective

Expand All @@ -31,17 +20,17 @@ Consumers can examine the various source provenance attestations to determine if
| Term | Description
| --- | ---
| Source | An identifiable set of text and binary files and associated metadata. Source is regularly used as input to a build system (see [SLSA Build Track](requirements.md)).
| Organization | A collection of people who collectively create the Source. Examples of organizations include open-source projects, a company, or a team within a company. The organization defines the goals and methods of the source.
| Version Control System (VCS)| Software for tracking and managing changes to source. Git and Subversion are examples of version control systems.
| Revision | A specific state of the source with an identifier provided by the version control system. As an example, you can identify a git revision by its tree hash.
| Source Control Platform (SCP) | A service or suite of services (self-hosted or SaaS) for hosting version-controlled software. GitHub and GitLab are examples of source control platforms, as are combinations of tools like Gerrit code reviews with GitHub source control.
| Source Provenance | Information about which Source Control Platform (SCP) produced a revision, when it was generated, what process was used, who the contributors were, and what parent revisions it was based on.
| Organization | A collection of people who collectively create the Source. Examples of organizations include open-source projects, a company, or a team within a company. The organization defines the goals and methods of the repository.
| Repository / Repo | A uniquely identifiable instance of a VCS hosted on an SCP. The repository controls access to the Source in the version control system. The objective of a repository is to reflect the intent of the organization that controls it.
| Branch | A named pointer to a revision. Branches may be modified by authorized actors. In git, cloning a repo will download all revisions in the history of the "default" branch to the local machine. Branches may have different security requirements.
| Change | A set of modifications to the source in a specific context. Can be proposed and reviewed before being accepted.
| Source Control System (SCS) | A service or suite of services (self-hosted or SaaS) relied upon by the organization to produce new revisions of the source. GitHub and GitLab are examples, as are combinations of tools like Gerrit code reviews with GitHub Repositories.
| Source Provenance | Information about how a revision came to exist, where it was hosted, when it was generated, what process was used, who the contributors were, and what parent revisions it was based on.
| Repository / Repo | A uniquely identifiable instance of a VCS. The repository controls access to the Source in the VCS. The objective of a repository is to reflect the intent of the organization that controls it.
| Branch | A named pointer to a revision. Branches may be modified by authorized actors. Branches may have different security requirements.
| Change | A set of modifications to the source in a specific context. A change can be proposed and reviewed before being accepted.
| Change History | A record of the history of revisions that preceded a specific revision.
| Push / upload / publish | When an actor authenticates to an SCP to add or modify content. Typically makes a new revision reachable from a branch.
| Review / approve / vote | When an actor authenticates to a change review tool to leave comments or endorse / reject the source change proposal they were presented.
| Push / upload / publish | When an actor authenticates to a Repository to add or modify content. Typically makes a new revision reachable from a branch.
| Review / approve / vote | When an actor authenticates to a change review tool to comment upon, endorse, or reject a source change proposal.

## Source Roles

Expand Down Expand Up @@ -121,18 +110,18 @@ The source MUST have a location where the "official" revisions are stored and ma
#### Revisions are immutable and uniquely identifiable

This requirement ensures that a consumer can determine that the source revision they have is the same as a canonical revision.
The combination of SCP and VCS MUST provide a deterministic way to identify a particular revision.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@marcelamelara I definitely like having a single term for "the combination of". I'm not sure it really helps bring clarity to what we mean by it, but "the system must provide X" is at least less clunky to read.

The SCS MUST provide a deterministic way to identify a particular revision.

Virtually all modern tools provide this guarantee via a combination of the repository ID and revision ID.

##### Repository IDs

The repository ID is generated by the SCP and MUST be unique in the context of that instance of the SCP.
The repository ID is defined by the SCS and MUST be unique in the context of that instance of the SCS.

##### Revision IDs

When the revision ID is a digest of the content of the revision (as in git) nothing more is needed.
When the revision ID is a number or otherwise not a digest, then the SCP and VCS MUST document how the immutability of the revision is established.
When the revision ID is a number or otherwise not a digest, then the SCS MUST document how the immutability of the revision is established.
The same revision ID MAY be present in multiple repositories.
See also [Use cases for non-cryptographic, immutable, digests](https://github.com/in-toto/attestation/blob/main/spec/v1/digest_set.md#use-cases-for-non-cryptographic-immutable-digests).

Expand All @@ -151,7 +140,7 @@ Requirements:

#### Branches

If the SCP and VCS combination supports multiple branches, the organization MUST indicate which branches are intended for consumption.
If the SCS supports multiple branches, the organization MUST indicate which branches are intended for consumption.
This may be implied or explicit.

For example, an organization may declare that the `default` branch of a repo contains revisions intended for consumption my protected it.
Expand All @@ -176,14 +165,14 @@ Exceptions are allowed via the [safe expunging process](#safe-expunging-process)

There exists an identity management system or some other means of identifying actors.
This system may be a federated authentication system (AAD, Google, Okta, GitHub, etc) or custom implementation (gittuf, gpg-signatures on commits, etc).
The SCP MUST document how actors are identified for the purposes of attribution.
The SCS MUST document how actors are identified for the purposes of attribution.

Activities conducted on the SCP SHOULD be attributed to authenticated identities.
Activities conducted on the SCS SHOULD be attributed to authenticated identities.

### Level 3: Source Provenance Attestations

Summary:
A consumer can ask the SCP for everything it knows about a specific revision of a repository.
A consumer can ask the SCS for everything it knows about a specific revision of a repository.
The information is provided in a documented and tamper-resistant format.

Intended for:
Expand All @@ -197,12 +186,12 @@ Requirements:
#### Source attestations

A source attestation contains information about how a specific revision was created and how it came to exist in its present context.
They are associated with the revision identifier delivered to consumers and are a statement of fact from the perspective of the SCP.
They are associated with the revision identifier delivered to consumers and are a statement of fact from the perspective of the SCS.

If a consumer is authorized to access source on a particular branch, they MUST be able to fetch the source attestation documents for revisions in the history of that branch.

It is possible that an SCP can make no claims about a particular revision.
For example, this would happen if the revision was created on another SCP, or if the revision was not the result of an accepted change management process.
It is possible that an SCS can make no claims about a particular revision.
For example, this would happen if the revision was created on another SCS, or if the revision was not the result of an accepted change management process.

#### Change management process

Expand All @@ -221,8 +210,8 @@ The change management tool MUST provide at a minimum:

User accounts that can modify the source or the project's configuration must use multi-factor authentication or its equivalent.
This strongly authenticated identity MUST be used for the generation of source provenance attestations.
The SCP MUST declare which forms of identity it considers to be trustworthy for this purpose.
For cloud-based SCPs, this will typically be the identity used to push to a git server.
The SCS MUST declare which forms of identity it considers to be trustworthy for this purpose.
For cloud-based SCSs, this will typically be the identity used to push to a repository.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also removed the casual use of the word "git" here


Other forms of identity MAY be included as informational.
Examples include a git commit's "author" and "committer" fields and a gpg signature's "user id."
Expand Down
4 changes: 2 additions & 2 deletions docs/spec/draft/verifying-source.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ The intended audience is platform implementers, security engineers, and software
SLSA uses attestations to indicate security claims associated with a repository revision, but attestations don't do anything unless somebody inspects them.
SLSA calls that inspection **verification**, and this page describes how to verify properties of source revisions using their SLSA source provenance attestations.

Source Control Platforms (SCPs) may issue attestations of the process that was used to create specific revisions of a repository.
Source Control Systems (SCSs) may issue attestations of the process that was used to create specific revisions of a repository.

A Verification Summary Attestation (VSA) can make verification more efficient by recording the result of prior verifications.
VSA may be issued by a VSA provider to make a SLSA source level determination based on the content of those attestations.
Expand Down Expand Up @@ -168,7 +168,7 @@ It is not sufficient to indicate that a file changed without showing the content

Require a squash merge strategy for the protected branch.

To guarantee that only commits representing reviewed diffs are cloned, the SCP MUST rebase (or "squash") the reviewed diff into a single new commit (the "squashed" commit) that has only a single parent (the revision previously pointed-to by the protected branch).
To guarantee that only commits representing reviewed diffs are cloned, the SCS MUST rebase (or "squash") the reviewed diff into a single new commit (the "squashed" commit) that has only a single parent (the revision previously pointed-to by the protected branch).
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

edited this use case for completeness, but this one is "the tool that generates commits on behalf of the code review tool".
For github (and probably other all-in-one systems, these are the same tool.

This is different than a standard merge commit strategy which would cause all the user-contributed commits to become reachable from the protected branch via the second parent.

It is not acceptable to replay the sequence of commits from the topic branch onto the protected branch.
Expand Down
Loading