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

fix: Improved clarity around required values #98

Merged
merged 2 commits into from
Dec 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
30 changes: 15 additions & 15 deletions schema.cue
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,10 @@ header: {
}

project?: {
name: string
homepage: #URL
funding: #URL
roadmap: #URL
name: string
homepage?: #URL
roadmap?: #URL
funding?: #URL

administrators: [...#Contact]

Expand All @@ -66,8 +66,8 @@ project?: {
}]

"vulnerability-reporting": {
"reports-accepted": bool
"bug-bounty-available": bool
"reports-accepted": bool
"bug-bounty-available": bool
"bug-bounty-program"?: #URL
contact?: #Contact
comment?: string
Expand All @@ -79,22 +79,22 @@ project?: {
}

documentation?: {
"detailed-guide"?: #URL
"code-of-conduct"?: #URL
"detailed-guide"?: #URL
"code-of-conduct"?: #URL
"quickstart-guide"?: #URL
"release-process"?: #URL
"release-process"?: #URL
"signature-verification"?: #URL
}
}

repository?: {
status: "active" | "abandoned" | "concept" | "inactive" | "moved" | "suspended" | "unsupported" | "WIP"

"accepts-change-request": bool
"accepts-automated-change-request": bool
"bug-fixes-only": bool
"no-third-party-packages": bool
url: #URL
url: #URL
"accepts-change-request": bool
"accepts-automated-change-request": bool
"bug-fixes-only"?: bool
"no-third-party-packages"?: bool

"core-team": [...#Contact]

Expand Down
2 changes: 1 addition & 1 deletion specification-details/aliases.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Aliases

The following aliases are used throughout the schema.
The following aliases are used throughout the schema for consistency.

## `assessment`

Expand Down
60 changes: 42 additions & 18 deletions specification-details/project.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,33 +2,30 @@

The `project` object describes the overall project, including basic info, documentation links, repositories, vulnerability reporting, and security details.

---

## `project.name`

- **Type**: `string`
- **Description**: The name of the project.

---
This field is not required if `header.project-si-source` is supplied.

## `project.homepage`
## Required vs Optional Fields

- **Type**: [URL]
- **Description**: A path to the project’s landing page. This may be a project website, a version control system repository, or a project/organization page in the VCS.
Required if `project` is present:

---
- `name`
- `administrators`
- `repositories`
- `vulnerability-reporting`

## `project.funding`
Optional:

- **Type**: [URL]
- **Description**: A URL to information about sponsorships, donations, or other funding topics.
- `homepage`
- `funding`
- `roadmap`
- `documentation`

---

## `project.roadmap`
## `project.name`

- **Type**: [URL]
- **Description**: A URL pointing to a roadmap or schedule for planned features and releases.
- **Type**: `string`
- **Description**: The name of the project.

---

Expand Down Expand Up @@ -134,3 +131,30 @@ An object containing references to key documentation URLs.

- **Type**: [URL]
- **Description**: URL to documentation explaining how to verify digital signatures on assets.

---

## `project.homepage` (optional)

- **Type**: [URL]
- **Description**: A path to the project’s landing page. This may be a project website, a version control system repository, or a project/organization page in the VCS.

---

## `project.funding` (optional)

- **Type**: [URL]
- **Description**: A URL to information about sponsorships, donations, or other funding topics.

---

## `project.roadmap` (optional)

- **Type**: [URL]
- **Description**: A URL pointing to a roadmap or schedule for planned features and releases.

---

[URL]: ./aliases.md#url
[Contact]: ./aliases.md#contact
[contacts]: ./aliases.md#contact
21 changes: 20 additions & 1 deletion specification-details/repository.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,26 @@

The `repository` object specifies repository-related configurations, including status, policies, team members, documentation, license, releases, and security posture.

This section is not required if the file is intended for use as a parent security insights file with project information to be inherited by multiple repositories.
This section is not required if the file is intended for use as a parent security insights file with project information to be inherited by multiple repositories via their respective `header.project-si-source`.

## Required vs Optional Fields

Required if `repository` is present:

- `status`
- `url`
- `accepts-change-request`
- `accepts-automated-change-request`
- `core-team`
- `license`
- `security`

Optional top-level fields:

- `documentation`
- `release`
- `bug-fixes-only` (assume false if not present)
- `no-third-party-packages` (assume false if not present)

---

Expand Down
7 changes: 1 addition & 6 deletions template-minimum.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@ header:

project:
name: FooBar
homepage: https://foo.bar
funding: https://foo.bar/FUNDING.yml
roadmap: https://foo.bar/roadmap.html
administrators:
- name: Joe Dohn
affiliation: Foo
Expand All @@ -29,12 +26,10 @@ project:
bug-bounty-available: true

repository:
url: https://github.com/kubernetes/kubernetes
url: https://my.vcs/foobar/foo
status: active
bug-fixes-only: false
accepts-change-request: true
accepts-automated-change-request: true
no-third-party-packages: false
core-team:
- name: Alice White
affiliation: Foo Bar
Expand Down
Loading