Skip to content

Commit 4701f2f

Browse files
author
Vinaya Damle
committed
feat: support multiple control catalog versions
Implements the proposal from #257 to handle multiple control catalogs and versions of each. Changes: - Rename OSPS evaluation plan to OSPS_2025_10 with version-specific catalog ID (osps-baseline-2025-10) - Add OSPS_2026_02 evaluation plan (initially mirrors 2025_10, to be updated as the new baseline evolves) - Register both evaluation suites in main.go - Add OSPS_Baseline_2026_02.yaml catalog with version-specific metadata - Update CI scripts and example config to use the new catalog naming Closes #257
1 parent 8276c0b commit 4701f2f

File tree

7 files changed

+3242
-10
lines changed

7 files changed

+3242
-10
lines changed

.github/scripts/ci.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ services:
9494
plugin: github-repo
9595
policy:
9696
catalogs:
97-
- osps-baseline
97+
- osps-baseline-2026-02
9898
applicability:
9999
- Maturity Level 1
100100
vars:

.github/workflows/ci.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,4 @@ jobs:
3333
./.github/scripts/ci.sh 2>&1 | tee integration_output.txt
3434
- name: Verify test output
3535
run: |
36-
grep -E 'privateer_osps-baseline.*Passed.*Warnings.*Failed.*Possible' integration_output.txt
36+
grep -E 'privateer_osps-baseline-2026-02.*Passed.*Warnings.*Failed.*Possible' integration_output.txt

data/catalogs/OSPS_Baseline_2025_10.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
metadata:
2-
id: osps-baseline
2+
id: osps-baseline-2025-10
33
title: Open Source Project Security Baseline
4-
version: ""
4+
version: "2025.10"
55
description: |
66
The Open Source Project Security (OSPS) Baseline is a set of security criteria
77
that projects should meet to demonstrate a strong security posture.

data/catalogs/OSPS_Baseline_2026_02.yaml

Lines changed: 3222 additions & 0 deletions
Large diffs are not rendered by default.

evaluation_plans/evaluation-plans.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,11 @@ import (
1515
)
1616

1717
var (
18-
// Open Source Project Security Baseline
18+
// OSPS contains assessment step implementations for all known assessment IDs
19+
// across all OSPS Baseline versions. Each catalog YAML defines which IDs are
20+
// active for that version, so the SDK only runs the relevant subset.
21+
// When a new baseline version introduces new assessment IDs, add their step
22+
// implementations here.
1923
OSPS = map[string][]gemara.AssessmentStep{
2024
"OSPS-AC-01.01": {
2125
access_control.OrgRequiresMFA,

example-config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ services:
1313
# The policy section may be set at the top level if assessing multiple services via privateer
1414
policy:
1515
catalogs:
16-
- osps-baseline # currently this is the only available catalog to assess against
16+
- osps-baseline-2026-02 # use osps-baseline-2025-10 for the previous version
1717
applicability:
1818
- Maturity Level 1
1919
# - Maturity Level 2

main.go

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,16 @@ func main() {
5454
}
5555

5656
orchestrator.AddRequiredVars(RequiredVars)
57-
err = orchestrator.AddEvaluationSuite("osps-baseline", nil, evaluation_plans.OSPS)
58-
if err != nil {
59-
fmt.Printf("Error adding evaluation suite: %v\n", err)
60-
os.Exit(1)
57+
58+
// Register the same step implementations for each catalog version.
59+
// The catalog YAML defines which assessment IDs are active for that version,
60+
// so the SDK only runs the relevant subset of steps.
61+
for _, catalogID := range []string{"osps-baseline-2025-10", "osps-baseline-2026-02"} {
62+
err = orchestrator.AddEvaluationSuite(catalogID, nil, evaluation_plans.OSPS)
63+
if err != nil {
64+
fmt.Printf("Error adding evaluation suite %s: %v\n", catalogID, err)
65+
os.Exit(1)
66+
}
6167
}
6268

6369
runCmd := command.NewPluginCommands(

0 commit comments

Comments
 (0)