in ci/internal/cve/record.go [21:37]
func RecordFromReader(r io.Reader) (*Record, error) {
var record Record
if err := json.NewDecoder(r).Decode(&record); err != nil {
return nil, ErrNotCVERecord
}
if record.DataType != expectedDataTypeValue {
return nil, ErrNotCVERecord
}
if !strings.HasPrefix(record.DataVersion, "5.") {
return nil, ErrNotCVERecord
}
return &record, nil
}