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

feat: Add schema for project BPB files #2260

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

eddie-knight
Copy link

Background

While working on the upcoming release for Security Insights v2, I began considering the suggestions from @david-a-wheeler in ossf/security-insights-spec#94.

Problem

While I was able to quickly add some of the suggested values to SIv2, there are a great deal more that didn't get included either due to incompatibility or simply oversight. The gap is massive between SI and BPB, where both provide unique but related value to users.

Solution

There is potential to create more value by allowing project contributors to specify their best practices status in security insights, but maintain their BPB answers in a static version controlled location that can be linked from the SI file.

In a future PR, we can add a feature to BPB that will inspect the project's answers file to issue a badge.

In this Pull Request

This PR includes a Cue schema which will allow for validation of YAML, JSON flavors, and TOML files containing answers to the best practices badge criteria. A corresponding YAML file is included.

The schema matches the pattern and layout of the web form, always requires Passing to be complete, and additionally requires Silver to be completed before moving on to Gold.

Note

Cue was selected for simplicity of maintenance and use.

To validate a YAML or JSON file, install Cue and then run this command format: cue vet schema.cue example-full.yml

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant