Skip to content

Commit d5a184b

Browse files
committed
non-content changes
1 parent 88b4b1a commit d5a184b

File tree

2 files changed

+64
-37
lines changed

2 files changed

+64
-37
lines changed

.vscode/settings.json

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
11
{
2-
"editor.rulers": [80]
3-
}
2+
"editor.rulers": [
3+
80
4+
],
5+
"cSpell.words": [
6+
"gittuf",
7+
"MERGESAME",
8+
"SCAI",
9+
"SLSA",
10+
"unreviewed"
11+
]
12+
}

docs/spec/draft/source-requirements.md

Lines changed: 53 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: "Source: Requirements for producing source"
3-
description: "This page covers the detailed technical requirements for producing producing source revisions at each SLSA level. The intended audience is source control system implementers and security engineers."
3+
description: "This page covers the detailed technical requirements for producing source revisions at each SLSA level. The intended audience is source control system implementers and security engineers."
44
---
55

66
## Objective
@@ -23,7 +23,7 @@ The following terms apply to Version Control Systems:
2323
| Term | Description
2424
| --- | ---
2525
| Source Repository (Repo) | A self-contained unit that holds the content and revision history for a set of files, along with related metadata like Branches and Tags.
26-
| Source Revision | A specific, logically immutable snapshot of the repository's tracked files. It is uniquely identified by a revision identifier, such as a cryptographic hash like a Git commit SHA or a path-qualified sequential number like `25@trunk/` in SVN. A Source Revision includes both the content (the files) and its associated version control metadata, such as the author, timestamp, and parent revision(s). Note: Path qualification is needed for version control systems that use represent Branches and Tags using paths, such as Subversion and Perforce.
26+
| Source Revision | A specific, logically immutable snapshot of the repository's tracked files. It is uniquely identified by a revision identifier, such as a cryptographic hash like a Git commit SHA or a path-qualified sequential number like `25@trunk/` in SVN. A Source Revision includes both the content (the files) and its associated version control metadata, such as the author, timestamp, and parent revision(s). Note: Path qualification is needed for version control systems that represent Branches and Tags using paths, such as Subversion and Perforce.
2727
| Named Reference | A user-friendly name for a specific source revision, such as `main` or `v1.2.3`.
2828
| Change | A modification to the state of the Source Repository, such as creation of a new Source Revision based on a previous Source Revision, or creation, deletion, or modification of a Named Reference.
2929
| Change History | A record of the history of Source Revisions that preceded a specific revision.
@@ -60,7 +60,7 @@ The following terms apply to Source Control Systems:
6060
| --- | ---
6161
| Administrator | A human who can perform privileged operations on one or more projects. Privileged actions include, but are not limited to, modifying the change history and modifying project- or organization-wide security policies.
6262
| Trusted person | A human who is authorized by the organization to propose and approve changes to the source.
63-
| Trusted robot | Automation authorized by the organization to act in explicitly defined contexts. The Robot’s identity and codebase cannot be unilaterally influenced.
63+
| Trusted robot | Automation authorized by the organization to act in explicitly defined contexts. The robot’s identity and codebase cannot be unilaterally influenced.
6464
| Untrusted person | A human who has limited access to the project. They MAY be able to read the source. They MAY be able to propose or review changes to the source. They MAY NOT approve changes to the source or perform any privileged actions on the project.
6565

6666
## Onboarding
@@ -182,13 +182,13 @@ Many examples in this document use the [git version control system](https://git-
182182
<table>
183183
<tr><th>Requirement<th>Description<th>L1<th>L2<th>L3<th>L4
184184

185-
<tr id="choose-scs"><td>Choose an appropriate source control system <a href="#choose-scs">🔗</a><td>
185+
<tr id="choose-scs"><td>Choose an appropriate Source Control System <a href="#choose-scs">🔗</a><td>
186186

187-
An organization producing source revisions MUST select a SCS capable of reaching
187+
An organization producing Source Revisions MUST select an SCS capable of reaching
188188
their desired SLSA Source Level.
189189

190190
> For example, if an organization wishes to produce revisions at Source Level 3,
191-
they MUST choose a source control system capable of producing Source Level 3
191+
they MUST choose a Source Control System capable of producing Source Level 3
192192
attestations.
193193

194194
<td>✓<td>✓<td>✓<td>✓
@@ -236,30 +236,49 @@ determine if that expectation has been met by looking for the
236236

237237
<tr id="safe-expunging-process"><td>Safe Expunging Process <a href="#safe-expunging-process">🔗</a><td>
238238

239-
SCSs MAY allow the organization to expunge (remove) content from a repository and its change history without leaving a public record of the removed content,
240-
but the organization MUST only allow these changes in order to meet legal or privacy compliance requirements.
241-
Content changed under this process includes changing files, history, references, or any other metadata stored by the SCS.
239+
SCSs MAY allow the organization to expunge (remove) content from a repository
240+
and its change history without leaving a public record of the removed content,
241+
but the organization MUST only allow these changes in order to meet legal or
242+
privacy compliance requirements. Content changed under this process includes
243+
changing files, history, references, or any other metadata stored by the SCS.
242244

243245
#### Warning
244246

245-
Removing a revision from a repository is similar to deleting a package version from a registry: it's almost impossible to estimate the amount of downstream supply chain impact.
246-
> For example, in Git, each revision ID is based on the ones before it. When you remove a revision, you must generate new revisions (and new revision IDs) for any revisions that were built on top of it. Consumers who took a dependency on the old revisions may now be unable to refer to the revision they've already integrated into their products.
247+
Removing a revision from a repository is similar to deleting a package version
248+
from a registry: it's almost impossible to estimate the amount of downstream
249+
supply chain impact.
247250

248-
It may be the case that the specific set of changes targeted by a legal takedown can be expunged in ways that do not impact consumed revisions, which can mitigate these problems.
251+
> For example, in Git, each revision ID is based on the ones before it.
252+
When you remove a revision, you must generate new revisions (and new revision IDs)
253+
for any revisions that were built on top of it. Consumers who took a dependency
254+
on the old revisions may now be unable to refer to the revision they've already
255+
integrated into their products.
249256

250-
It is also the case that removing content from a repository won't necessarily remove it everywhere.
251-
The content may still exist in other copies of the repository, either in backups or on developer machines.
257+
It may be the case that the specific set of changes targeted by a legal takedown
258+
can be expunged in ways that do not impact consumed revisions, which can mitigate
259+
these problems.
260+
261+
It is also the case that removing content from a repository won't necessarily
262+
remove it everywhere.
263+
The content may still exist in other copies of the repository, either in backups
264+
or on developer machines.
252265

253266
#### Process
254267

255-
An organization MUST document the Safe Expunging Process and describe how requests and actions are tracked and SHOULD log the fact that content was removed.
256-
Different organizations and tech stacks may have different approaches to the problem.
268+
An organization MUST document the Safe Expunging Process and describe how
269+
requests and actions are tracked and SHOULD log the fact that content was
270+
removed. Different organizations and tech stacks may have different approaches
271+
to the problem.
257272

258-
SCSs SHOULD have technical mechanisms in place which require an Administrator plus, at least, one additional 'trusted person' to trigger any expunging (removals) made under this process.
273+
SCSs SHOULD have technical mechanisms in place which require an Administrator
274+
plus at least one additional 'trusted person' to trigger any expunging
275+
(removals) made under this process.
259276

260-
The application of the safe expunging process and the resulting logs MAY be private to both prevent calling attention to potentially sensitive data (e.g. PII) or to comply with local laws
261-
and regulations which may require the change to be kept private to the extent possible.
262-
Organizations SHOULD prefer to make logs public if possible.
277+
The application of the safe expunging process and the resulting logs MAY be
278+
private to both prevent calling attention to potentially sensitive data (e.g.
279+
PII) or to comply with local laws and regulations which may require the change
280+
to be kept private to the extent possible. Organizations SHOULD prefer to make
281+
logs public if possible.
263282

264283
<td><td>✓<td>✓<td>✓
265284

@@ -309,7 +328,7 @@ If the SCS DOES NOT generate a VSA for a revision, the revision has Source Level
309328
At Source Levels 1 and 2 the SCS MAY issue these attestations based on its
310329
understanding of the underlying system (e.g. based on design docs, security
311330
reviews, etc...), but at Level 3+ the SCS MUST use
312-
the SCS issued [source provenance](#source-provenance) when making the issuing
331+
the SCS-issued [source provenance](#source-provenance) when issuing
313332
the VSAs.
314333

315334
<td>✓<td>✓<td>✓<td>✓
@@ -442,7 +461,7 @@ It is possible that an SCS can make no claims about a particular revision.
442461
or if the revision was not the result of an accepted change management process.
443462

444463
<td><td><td>✓<td>✓
445-
<tr id="two-party-review"><td>Two party review <a href="#two-party-review">🔗</a><td>
464+
<tr id="two-party-review"><td>Two-party review <a href="#two-party-review">🔗</a><td>
446465

447466
Changes in protected branches MUST be agreed to by two or more trusted persons prior to submission.
448467
The following combinations are acceptable:
@@ -462,7 +481,6 @@ still requires review. The exact definition of “context” depends on the proj
462481
and this does not preclude well-understood automatic merges, such as cutting a release branch.
463482

464483
**[Informed Review]** The SCS MUST present reviewers with a clear representation of the result of accepting the proposed change. See [Human Readable Changes](#human-readable-diff).
465-
the old and new revisions. E.g. by using [the diff tool](#human-readable-diff).
466484

467485
**[Trusted Robot Contributions]** An organization MAY choose to grant a Trusted
468486
Robot a perpetual exception to a policy (e.g. a bot may be able to merge a change
@@ -487,7 +505,7 @@ There are two broad categories of source attestations within the source track:
487505
2. Source provenance attestations: Provide trustworthy, tamper-proof, metadata with the necessary information to determine what high level security properties a given source revision has.
488506

489507
To provide interoperability and ensure ease of use, it's essential that the Source VSAs are applicable across all Source Control Systems.
490-
However, due to the significant differences in how SCSs operate and how they may chose to meet the Source Track requirements, it is preferable to
508+
However, due to the significant differences in how SCSs operate and how they may choose to meet the Source Track requirements, it is preferable to
491509
allow for flexibility with the full source provenance attestations. To that end, SLSA leaves source provenance attestations undefined and up to the SCSs to determine
492510
what works best in their environment.
493511

@@ -507,7 +525,7 @@ The source track issues Source VSAs using the [Verification Summary Attestations
507525
SCSs that do not use cryptographic digests MUST define a canonical type that is used to identify immutable revisions and MUST include the repository within the type[^1].
508526
- For example: `svn_revision_id: svn+https://svn.myproject.org/svn/MyProject/trunk@2019`
509527
3. `subject.annotations.sourceRefs` SHOULD be set to a list of references that pointed to this revision when the attestation was created. The list MAY be non-exhaustive.
510-
- git references MUST be fully qualified (e.g. `refs/head/main` or `refs/tags/v1.0`) to reduce the likelihood of confusing downstream tooling.
528+
- git references MUST be fully qualified (e.g. `refs/heads/main` or `refs/tags/v1.0`) to reduce the likelihood of confusing downstream tooling.
511529
4. `resourceUri` MUST be set to the URI of the repository, preferably using [SPDX Download Location](https://spdx.github.io/spdx-spec/v2.3/package-information/#77-package-download-location-field).
512530
E.g. `git+https://github.com/foo/hello-world`.
513531
5. `verifiedLevels` MUST include the SLSA source track level the SCS asserts the revision meets. One of `SLSA_SOURCE_LEVEL_0`, `SLSA_SOURCE_LEVEL_1`, `SLSA_SOURCE_LEVEL_2`, `SLSA_SOURCE_LEVEL_3`.
@@ -523,7 +541,7 @@ was code reviewed).
523541
The SCS MAY embed organization-provided properties within `verifiedLevels`
524542
corresponding to technical controls enforced by the SCS. If such properties are
525543
provided they MUST be prefixed with `ORG_SOURCE_` to distinguish them from other
526-
properties the SCS may wish use.
544+
properties the SCS may wish to use.
527545

528546
- `ORG_SOURCE_` to indicate a property that is meant for consumption by
529547
external consumers.
@@ -580,8 +598,8 @@ Example implementations:
580598

581599
### Source provenance attestations
582600

583-
Source provenance attestations provide tamper-proof evidence ([attestation model](attestation-model)))
584-
that can be used to determine what SLSA Source Level or other high level properties a given revision meets.
601+
Source provenance attestations provide tamper-proof evidence ([attestation model](attestation-model))
602+
that can be used to determine what SLSA Source Level or other high-level properties a given revision meets.
585603
This evidence can be used by:
586604

587605
- an authority as the basis for issuing a [Source VSA](#source-verification-summary-attestation)
@@ -595,7 +613,7 @@ operate over Subversion repositories.
595613
These differences also mean that, depending on the configuration, the issuers of provenance attestations may vary from implementation to implementation, often because entities with the knowledge to issue them may vary.
596614
The authority that issues [Source VSAs](#source-verification-summary-attestation) MUST understand which entity should issue each provenance attestation type, and ensure all source provenance attestations come from their expected issuers.
597615

598-
'Source provenance attestations' is a generic term used to refer to any type of attestation that provides evidence the process used to create a revision.
616+
'Source provenance attestations' is a generic term used to refer to any type of attestation that provides evidence of the process used to create a revision.
599617

600618
Example source provenance attestations:
601619

@@ -623,7 +641,7 @@ revision's properties recorded in the summary attestation.
623641
In addition to the requirements for SLSA Source L4, most organizations will
624642
require multiple of these controls as part of their required protections.
625643

626-
If an organization has indicated that use of these these controls are part of
644+
If an organization has indicated that use of these controls is part of
627645
their repository's expectations, consumers SHOULD be able to verify that the
628646
process was followed for the revision they are consuming by examining the
629647
[summary](#source-verification-summary-attestation) or [source
@@ -702,15 +720,15 @@ Requirements:
702720

703721
#### Context
704722

705-
In many organizations it is normal to review only the "net difference" between the tip of the topic branch and the "best merge base", the closest shared commit between the topic and target branches computed at the time of review.
723+
In many organizations, it is normal to review only the "net difference" between the tip of the topic branch and the "best merge base", the closest shared commit between the topic and target branches computed at the time of review.
706724

707725
The topic branch may contain many commits of which not all were intended to represent a shippable state of the repository.
708726

709727
If a repository merges branches with a standard merge commit, all those unreviewed commits on the topic branch will become "reachable" from the protected branch by virtue of the multi-parent merge commit.
710728

711729
When a repo is cloned, all commits _reachable_ from the main branch are fetched and become accessible from the local checkout.
712730

713-
This combination of factors allows attacks where the victim performs a `git clone` operation followed by a `git reset --hard <unreviewed revision id>`.
731+
This combination of factors allows attacks where the victim performs a `git clone` operation followed by a `git reset --hard <unreviewed revision ID>`.
714732

715733
#### Mitigations
716734

@@ -738,7 +756,7 @@ Summary:
738756
The discussion around a change may often be as important as the change itself.
739757

740758
Intended for:
741-
Large organizations, or any where discussion is an important part of the change management process.
759+
Large organizations, or anywhere discussion is an important part of the change management process.
742760

743761
Benefits:
744762
From any revision, it's possible for future developers to read through the discussion that ultimately produced it.
@@ -766,7 +784,7 @@ If there are problems detected with the contents on the train branch, it's norma
766784
Approved changes will be re-applied to a new train in this scenario.
767785

768786
The key benefit to this approach is that the protected branch remains stable for longer, allowing more time for human and automatic code review.
769-
A key downside to this approach is that organizations will not know the final revision id that represents a change until the entire train process completes.
787+
A key downside to this approach is that organizations will not know the final revision ID that represents a change until the entire train process completes.
770788

771789
A change review process will now be associated with multiple distinct revisions.
772790

@@ -776,7 +794,7 @@ A change review process will now be associated with multiple distinct revisions.
776794
It is important to note that no human or automatic review will have the chance to pre-approve ID2. This will appear to violate any organization policies that require pre-approval of changes before submission.
777795
The SCS and the organization MUST protect this process in the same way they protect other artifact build pipelines.
778796

779-
At a minimum the SCS MUST issue an attestation that the revision id generated by a merged train is identical ("MERGESAME" in git terminology) to the state of the protected branch after applying each approved changeset in sequence.
797+
At a minimum the SCS MUST issue an attestation that the revision ID generated by a merged train is identical ("MERGESAME" in git terminology) to the state of the protected branch after applying each approved changeset in sequence.
780798
No other content may be added or removed during this process.
781799

782800
## Future Considerations

0 commit comments

Comments
 (0)