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

break: Revamped schema based on ecosystem feedback #96

Merged
merged 16 commits into from
Dec 28, 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
26 changes: 26 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
name: CI Checks

on:
pull_request:

permissions:
contents: read

jobs:
main:
name: Validate Template with Schema
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]

- name: Setup Cue
uses: cue-lang/[email protected]
with:
cue-version: 0.11.0

- name: Validate template-full.yml
run: cue vet template-full.yml schema.cue

- name: Validate template-minimum.yml
run: cue vet template-minimum.yml schema.cue
20 changes: 0 additions & 20 deletions examples/security-insights-minimal-sample.yml

This file was deleted.

172 changes: 0 additions & 172 deletions examples/security-insights-sample.yml

This file was deleted.

152 changes: 152 additions & 0 deletions schema.cue
Original file line number Diff line number Diff line change
@@ -0,0 +1,152 @@
//// Definitions ////

import (
"time"
)

#URL: =~"^https?://[^\\s]+$"
#Email: =~"^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,}$"
#Date: time.Format("2006-01-02")

#Assessment: {
comment: string
name?: string
evidence?: #URL
date?: #Date
}

#Attestation: {
name: string
location: #URL
"predicate-uri": string
comment?: string
}

#Contact: {
name: string
primary: bool
affiliation?: string
email?: #Email
social?: string
}

#License: {
url: #URL
expression: string
}

#Link: {
uri: string
comment: string
}

//// Schema ////

header: {
"last-reviewed": #Date
"last-updated": #Date
"schema-version": string
url: #URL
comment?: string
"project-si-source"?: #URL
}

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

administrators: [...#Contact]

repositories: [...{
name: string
comment: string
url: #URL
}]

"vulnerability-reporting": {
"reports-accepted": bool
"bug-bounty-available": bool
"bug-bounty-program"?: #URL
contact?: #Contact
comment?: string
"security-policy"?: #URL
"pgp-key"?: string

"in-scope"?: [...string]
"out-of-scope"?: [...string]
}

documentation?: {
"detailed-guide"?: #URL
"code-of-conduct"?: #URL
"quickstart-guide"?: #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

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

license: #License

security: {
assessments: {
self: #Assessment
"third-party"?: [...#Assessment]
}

champions?: [...#Contact]

tools?: [...{
name: string
type: "fuzzing" | "container" | "secret" | "SCA" | "SAST" | "other"
version?: string
comment?: string

rulesets: [...string]

integration: {
adhoc: bool
ci: bool
release: bool
}

results: {
adhoc?: #Attestation
ci?: #Attestation
release?: #Attestation
}

}]
}

documentation?: {
"contributing-guide"?: #URL
"dependency-management-policy"?: #URL
governance?: #URL
"review-policy"?: #URL
"security-policy"?: #URL
}

release?: {
"automated-pipeline": bool

"distribution-points": [...#Link]

changelog?: #URL
license?: #License

attestations?: [...#Attestation]
}
}
Loading
Loading