@@ -205,9 +205,9 @@ func (r *RekorVSARetriever) classifyEntryKind(entry models.LogEntryAnon) string
205205 }
206206 }
207207
208- // Check for IntotoObj structure (in-toto 0.0.2 entries)
209- if intotoObj , ok := body ["IntotoObj " ].(map [string ]any ); ok {
210- if content , ok := intotoObj ["content" ].(map [string ]any ); ok {
208+ // Check for spec structure (in-toto 0.0.2 entries)
209+ if spec , ok := body ["spec " ].(map [string ]any ); ok {
210+ if content , ok := spec ["content" ].(map [string ]any ); ok {
211211 if envelope , ok := content ["envelope" ].(map [string ]any ); ok {
212212 // Check if this has both payloadType and signatures (0.0.2)
213213 if _ , hasPayloadType := envelope ["payloadType" ]; hasPayloadType {
@@ -310,14 +310,14 @@ func (r *RekorVSARetriever) buildDSSEEnvelopeFromIntotoV002(entry models.LogEntr
310310 }
311311
312312 // Navigate to the in-toto 0.0.2 structure
313- intotoObj , ok := body ["IntotoObj " ].(map [string ]interface {})
313+ spec , ok := body ["spec " ].(map [string ]interface {})
314314 if ! ok {
315- return nil , fmt .Errorf ("entry does not contain IntotoObj " )
315+ return nil , fmt .Errorf ("entry does not contain spec " )
316316 }
317317
318- content , ok := intotoObj ["content" ].(map [string ]interface {})
318+ content , ok := spec ["content" ].(map [string ]interface {})
319319 if ! ok {
320- return nil , fmt .Errorf ("IntotoObj does not contain content" )
320+ return nil , fmt .Errorf ("spec does not contain content" )
321321 }
322322
323323 envelopeData , ok := content ["envelope" ].(map [string ]interface {})
@@ -338,8 +338,8 @@ func (r *RekorVSARetriever) buildDSSEEnvelopeFromIntotoV002(entry models.LogEntr
338338 if payload , ok := envelopeData ["payload" ].(string ); ok && payload != "" {
339339 payloadB64 = payload
340340 } else if entry .Attestation != nil && entry .Attestation .Data != nil {
341- // Fallback to Attestation.Data
342- payloadB64 = base64 . StdEncoding . EncodeToString (entry .Attestation .Data )
341+ // Fallback to Attestation.Data (already base64-encoded)
342+ payloadB64 = string (entry .Attestation .Data )
343343 } else {
344344 return nil , fmt .Errorf ("no payload found in envelope or attestation data" )
345345 }
@@ -454,7 +454,7 @@ func (rc *rekorClient) fetchLogEntriesParallel(ctx context.Context, uuids []stri
454454 wg .Add (1 )
455455 go func (workerID int ) {
456456 defer wg .Done ()
457- rc .worker (ctx , uuidChan , resultChan , errorChan , workerID )
457+ rc .worker (ctx , uuidChan , resultChan , workerID )
458458 }(i )
459459 }
460460
@@ -517,7 +517,7 @@ type fetchResult struct {
517517}
518518
519519// worker processes UUIDs from the input channel and sends results to the output channel
520- func (rc * rekorClient ) worker (ctx context.Context , uuidChan <- chan string , resultChan chan <- fetchResult , errorChan chan <- error , workerID int ) {
520+ func (rc * rekorClient ) worker (ctx context.Context , uuidChan <- chan string , resultChan chan <- fetchResult , workerID int ) {
521521
522522 for uuid := range uuidChan {
523523 select {
0 commit comments