Skip to content

Commit ccfe87e

Browse files
authored
docs: improve docs on header.project-si-source (#133)
These changes are being made after finding examples in the wild that provide values like `https://github.com/ossf/security-insights-spec/blob/main/.github/security-insights.yml` that are unable to be easily consumed by the code in `ossf/si-tooling` This change relates to the changes in: - [fix: specific project-si-source URL that provides raw access to the parent SI file](ossf/si-tooling#27) - ["example" test demonstrating the issue](https://github.com/ossf/si-tooling/pull/26/files#diff-2c7a40d9b54300b2087ef12ec04ebd8ae5be37e4eb341e57cea2e7f9f1bfe5caR8) Signed-off-by: Travis Truman <trumant@gmail.com>
1 parent 8820b75 commit ccfe87e

File tree

4 files changed

+5
-6
lines changed

4 files changed

+5
-6
lines changed

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ We hope your project appreciates the value the specification provides and makes
1414

1515
Projects adopting the specification in a single project repository should be able to get started and produce a useful `security-insights.yml` in about 30 minutes by consulting the [`template-minimum.yml`](template-minimum.yml).
1616

17-
If your project has multiple repositories, you can apply the specification across all of them quickly by reusing the `project` definition from a single source. Consult [`template-multi-repository-project.yml`](template-multi-repository-project.yml) and [`template-multi-repository-project-reuse.yml`](template-multi-repository-project-reuse.yml) that are relevant to this use case.
17+
If your project has multiple repositories, you can define a detailed and centralized insights file in one repository and then reuse the `project` definition from that across other files. The consuming insights files must provide a URL in `header.project-si-source` that points to the parent insights file. The URL provided must respond to an unauthenticated GET request and return a valid security insights file using a content-type of "text/plain" or "application/yaml". See [`template-multi-repository-project.yml`](template-multi-repository-project.yml) and [`template-multi-repository-project-reuse.yml`](template-multi-repository-project-reuse.yml) that demonstrate how this use case can be implemented.
1818

1919
Projects should include a `security-insights.yml` file in the root of their repository, or in the appropriate source forge directory such as `.github/` or `.gitlab/`.
2020

@@ -64,4 +64,3 @@ Examples are also available to provide further context to the specification deta
6464
- `template-multi-repository-project-reuse.yml`: Contains a template for a secondary repository of a multi-repository project
6565

6666
Discussion and feedback should take place in [GitHub Issues](https://github.com/ossf/security-insights-spec/issues). We ask that you follow the [Security Insights Enhancement Proposal](./docs/GOVERNANCE.md#security-insights-enhancement-proposals) process to explore potential changes to the specification.
67-

schema.cue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ import (
104104
// The date when the document or data was last updated.
105105
"last-updated": #Date @go(LastUpdated)
106106

107-
// The version of the schema being used.
107+
// The version of the Security Insights schema being used.
108108
"schema-version": #SchemaVersion @go(SchemaVersion)
109109

110110
// The primary reference URL for this schema’s origin or repository.
@@ -113,7 +113,7 @@ import (
113113
// Additional information about the schema.
114114
comment?: string
115115

116-
// A URL to the security insights file that contains project information for this file to inherit.
116+
// A URL to the security insights file that contains project information for this file to inherit. The URL provided here should respond to an unauthenticated GET request and return a valid security insights file using a content-type of "text/plain" or "application/yaml". This is useful for projects that are part of a larger organization or ecosystem, where much of the security insights data is shared across multiple projects.
117117
"project-si-source"?: #URL @go(ProjectSISource)
118118
}
119119

specification/header.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ The `header` object captures high-level metadata about the schema.
4242
## `header.project-si-source` (optional)
4343

4444
- **Type**: [URL]
45-
- **Description**: A URL to the security insights file that contains project information for this file to inherit.
45+
- **Description**: A URL to the security insights file that contains project information for this file to inherit. The URL provided here should respond to an unauthenticated GET request and return a valid security insights file using a content-type of "text/plain" or "application/yaml". This is useful for projects that are part of a larger organization or ecosystem, where much of the security insights data is shared across multiple projects.
4646

4747
---
4848

template-multi-repository-project-reuse.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ header:
55
last-updated: '2025-03-01'
66
last-reviewed: '2025-04-01'
77
url: https://example.com/kubernetes/kubernetes
8-
project-si-source: https://vcs.example.com/foobar/foo/security-insights.yml
8+
project-si-source: https://raw.githubusercontent.com/example/repo/refs/heads/main/security-insights.yml
99

1010
repository:
1111
url: https://vcs.example.com/foobar/bar

0 commit comments

Comments
 (0)