Files
git.stella-ops.org/docs/features/checked/binaryindex/golden-set-schema-and-management.md
2026-02-14 09:11:48 +02:00

34 lines
2.3 KiB
Markdown

# Golden Set Schema and Management
## Module
BinaryIndex
## Status
IMPLEMENTED
## Description
Full golden set management library with authoring, configuration, serialization, storage, validation, and migration support.
## Implementation Details
- **Modules**: `src/BinaryIndex/__Libraries/StellaOps.BinaryIndex.GoldenSet/`
- **Key Classes**:
- **Authoring**: `GoldenSetExtractor`, `GoldenSetEnrichmentService`, `GoldenSetReviewService`, `UpstreamCommitAnalyzer` (`src/BinaryIndex/__Libraries/StellaOps.BinaryIndex.GoldenSet/Authoring/`)
- **Source Extractors**: `NvdGoldenSetExtractor`, `FunctionHintExtractor`, `CweToSinkMapper` (`src/BinaryIndex/__Libraries/StellaOps.BinaryIndex.GoldenSet/Authoring/Extractors/`)
- **Configuration**: `GoldenSetOptions` (`src/BinaryIndex/__Libraries/StellaOps.BinaryIndex.GoldenSet/Configuration/`)
- **Models**: `GoldenSetDefinition` (`src/BinaryIndex/__Libraries/StellaOps.BinaryIndex.GoldenSet/Models/`)
- **Serialization**: `GoldenSetYamlSerializer` (`src/BinaryIndex/__Libraries/StellaOps.BinaryIndex.GoldenSet/Serialization/`)
- **Storage**: `PostgresGoldenSetStore` (`src/BinaryIndex/__Libraries/StellaOps.BinaryIndex.GoldenSet/Storage/`), `IGoldenSetStore`
- **Validation**: `GoldenSetValidator`, `ICveValidator` (`src/BinaryIndex/__Libraries/StellaOps.BinaryIndex.GoldenSet/Validation/`)
- **Services**: `SinkRegistry`, `ISinkRegistry` (`src/BinaryIndex/__Libraries/StellaOps.BinaryIndex.GoldenSet/Services/`)
- **Registration**: `GoldenSetServiceCollectionExtensions` (`src/BinaryIndex/__Libraries/StellaOps.BinaryIndex.GoldenSet/Extensions/`)
## E2E Test Plan
- [ ] Author a golden set from NVD data via `NvdGoldenSetExtractor` and verify extracted CVE entries
- [ ] Enrich golden set with function hints via `FunctionHintExtractor` and verify hint annotations
- [ ] Map CWEs to sink functions via `CweToSinkMapper` and verify correct mappings
- [ ] Serialize golden set to YAML via `GoldenSetYamlSerializer` and verify round-trip fidelity
- [ ] Store golden set in PostgreSQL via `PostgresGoldenSetStore` and verify retrieval
- [ ] Validate golden set definition via `GoldenSetValidator` and verify errors for invalid entries
- [ ] Verify `SinkRegistry` maintains the sink function catalog
- [ ] Verify review workflow via `GoldenSetReviewService` transitions (Draft -> Review -> Approved)