@@ -30,7 +30,6 @@ import (
3030 "github.com/l3montree-dev/devguard/shared"
3131 "github.com/sigstore/sigstore/pkg/signature"
3232 "github.com/sigstore/sigstore/pkg/signature/options"
33- "go.opentelemetry.io/otel/codes"
3433 "golang.org/x/sync/errgroup"
3534 "oras.land/oras-go/v2"
3635 "oras.land/oras-go/v2/content/file"
@@ -308,23 +307,24 @@ func (s *VulnDBService) ExportRC(ctx context.Context) error {
308307// If the integrity check fails after an incremental import, it alerts and retries
309308// as a full import (ignoring the last-import watermark).
310309func (s * VulnDBService ) ImportRC (ctx context.Context ) (err error ) {
311- ctx , span := vulndbTracer .Start (ctx , "VulnDBService.ImportRC" )
312- defer func () {
313- if err != nil {
314- span .RecordError (err )
315- span .SetStatus (codes .Error , err .Error ())
316- }
317- span .End ()
318- }()
319-
320- slog .Info ("start vulndb import" )
321- start := time .Now ()
322-
323- workingDir , err := pullVulnDBFromPackageRegistry (ctx )
324- if err != nil {
325- return fmt .Errorf ("could not pull from remote repository: %w" , err )
326- }
327- defer os .RemoveAll (workingDir )
310+ // ctx, span := vulndbTracer.Start(ctx, "VulnDBService.ImportRC")
311+ // defer func() {
312+ // if err != nil {
313+ // span.RecordError(err)
314+ // span.SetStatus(codes.Error, err.Error())
315+ // }
316+ // span.End()
317+ // }()
318+
319+ // slog.Info("start vulndb import")
320+ // start := time.Now()
321+
322+ // workingDir, err := pullVulnDBFromPackageRegistry(ctx)
323+ // if err != nil {
324+ // return fmt.Errorf("could not pull from remote repository: %w", err)
325+ // }
326+ // defer os.RemoveAll(workingDir)
327+ workingDir := "."
328328
329329 var lastImportTime time.Time
330330 var lastImportStr string
@@ -414,9 +414,6 @@ func (s *VulnDBService) populateDBFromGobs(ctx context.Context, workingDir strin
414414 // Convert gob types to models.
415415 exploits := gobExploitsToModels (gobExploit , lastImportTime )
416416 pkgs , comps := gobMalPackagesExportToModels (malExport , lastImportTime )
417- fakePkgs , fakeComps := buildFakePackages ()
418- pkgs = append (pkgs , fakePkgs ... )
419- comps = append (comps , fakeComps ... )
420417
421418 // Open a single pgx connection and transaction for all DB writes.
422419 conn , err := s .pool .Acquire (ctx )
0 commit comments