replace AnalysePackage with QueryPackageAnalysis API & use community API (#15)

This commit is contained in:
Sahil Bansal
2025-05-11 22:41:34 +05:30
committed by GitHub
parent 6a28fb16a1
commit 86f8bd42b7
5 changed files with 15 additions and 48 deletions
+2 -1
View File
@@ -5,6 +5,7 @@ import (
"fmt"
"time"
packagev1 "buf.build/gen/go/safedep/api/protocolbuffers/go/safedep/messages/package/v1"
"github.com/fatih/color"
"github.com/safedep/dry/log"
"github.com/safedep/pmg/internal/ui"
@@ -100,7 +101,7 @@ func (pmw *PackageManagerWrapper) analyzeDependencies(ctx context.Context, deps
return fmt.Errorf("error while creating a malware analysis client: %w", err)
}
pkgAnalyser := analyser.New(client, ctx)
pkgAnalyser := analyser.New(client, ctx, packagev1.Ecosystem_ECOSYSTEM_NPM)
pkgAnalyser.ProgressTracker = progressTracker
handler := pkgAnalyser.Handler()