File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -62,15 +62,15 @@ export const scanner: Bun.Security.Scanner = {
6262 for ( const alert of artifact . alerts ) {
6363 const description = [ '' ]
6464
65- if ( alert . type === 'didYouMean' ) {
65+ if ( alert . type === 'didYouMean' && alert . props ?. alternatePackage ) {
6666 description . push ( `This package could be a typo-squatting attempt of another package (${ alert . props . alternatePackage } ).` )
6767 }
6868
69- if ( alert . props . description ) {
69+ if ( alert . props ? .description ) {
7070 description . push ( alert . props . description )
7171 }
7272
73- if ( alert . props . note ) {
73+ if ( alert . props ? .note ) {
7474 description . push ( alert . props . note )
7575 }
7676
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ export type SocketArtifact = {
55 alerts : {
66 action : 'error' | 'warn'
77 type : string ,
8- props : {
8+ props ? : {
99 note ?: string ,
1010 didYouMean ?: string ,
1111 } & Record < string , any >
You can’t perform that action at this time.
0 commit comments