@@ -13,7 +13,7 @@ import { confirm } from '@socketsecurity/registry/lib/prompts'
1313import { Spinner } from '@socketsecurity/registry/lib/spinner'
1414
1515import { getPackagesToQueryFromDiff } from './diff'
16- import { kCtorArgs , kRiskyReify } from './index'
16+ import { kRiskyReify } from './index'
1717import constants from '../../../../constants'
1818import {
1919 batchScan ,
@@ -24,7 +24,6 @@ import { uxLookup } from '../../../../utils/alert/rules'
2424import { ColorOrMarkdown } from '../../../../utils/color-or-markdown'
2525import { debugLog } from '../../../../utils/debug'
2626import { getSocketDevPackageOverviewUrl } from '../../../../utils/socket-url'
27- import { pacotePath } from '../../../npm-paths'
2827import { Edge , SafeEdge } from '../edge'
2928
3029import type { PackageDetail } from './diff'
@@ -43,8 +42,6 @@ type SocketPackageAlert = {
4342 raw ?: any
4443}
4544
46- const pacote : typeof import ( 'pacote' ) = require ( pacotePath )
47-
4845const {
4946 LOOP_SENTINEL ,
5047 NPM ,
@@ -107,7 +104,7 @@ type GetPackageAlertsOptions = {
107104}
108105
109106async function getPackagesAlerts (
110- safeArb : SafeArborist ,
107+ _safeArb : SafeArborist ,
111108 details : PackageDetail [ ] ,
112109 options ?: GetPackageAlertsOptions
113110) : Promise < SocketPackageAlert [ ] > {
@@ -138,7 +135,6 @@ async function getPackagesAlerts(
138135 const name = resolvePackageName ( < any > artifact )
139136 const id = `${ name } @${ artifact . version } `
140137
141- let blocked = false
142138 let displayWarning = false
143139 let alerts : SocketPackageAlert [ ] = [ ]
144140 for ( const alert of artifact . alerts ) {
@@ -147,9 +143,6 @@ async function getPackagesAlerts(
147143 package : { name, version } ,
148144 alert : { type : alert . type }
149145 } )
150- if ( ux . block ) {
151- blocked = true
152- }
153146 if ( ux . display && output ) {
154147 displayWarning = true
155148 }
@@ -189,18 +182,6 @@ async function getPackagesAlerts(
189182 }
190183 }
191184 }
192- if ( ! blocked ) {
193- if ( details . find ( d => d . pkgid === id ) ) {
194- await pacote . tarball . stream (
195- id ,
196- stream => {
197- stream . resume ( )
198- return ( stream as any ) . promise ( )
199- } ,
200- { ...( safeArb as any ) [ kCtorArgs ] [ 0 ] }
201- )
202- }
203- }
204185 if ( displayWarning && spinner ) {
205186 spinner . stop (
206187 `(socket) ${ formatter . hyperlink ( id , getSocketDevPackageOverviewUrl ( NPM , name , version ) ) } contains risks:`
0 commit comments