@@ -16,7 +16,7 @@ import type { SocketYml } from '@socketsecurity/config'
1616import type { SocketSdkReturnType } from '@socketsecurity/sdk'
1717import type { GlobOptions } from 'tinyglobby'
1818
19- const { NPM , PNPM } = constants
19+ const { PNPM } = constants
2020
2121const PNPM_WORKSPACE = `${ PNPM } -workspace`
2222
@@ -166,18 +166,13 @@ export async function filterGlobResultToSupportedFiles(
166166 entries : string [ ] | readonly string [ ] ,
167167 supportedFiles : SocketSdkReturnType < 'getReportSupportedFiles' > [ 'data' ] ,
168168) : Promise < string [ ] > {
169- const patterns = [ 'golang' , NPM , 'maven' , 'pypi' , 'gem' , 'nuget' ] . reduce (
170- ( r : string [ ] , n : string ) => {
171- const supported = supportedFiles [ n ]
172- r . push (
173- ...( supported
174- ? Object . values ( supported ) . map ( p => `**/${ p . pattern } ` )
175- : [ ] ) ,
176- )
177- return r
178- } ,
179- [ ] ,
180- )
169+ const patterns : string [ ] = [ ]
170+ for ( const key of Object . keys ( supportedFiles ) ) {
171+ const supported = supportedFiles [ key ]
172+ if ( supported ) {
173+ patterns . push ( ...Object . values ( supported ) . map ( p => `**/${ p . pattern } ` ) )
174+ }
175+ }
181176 return entries . filter ( p => micromatch . some ( p , patterns ) )
182177}
183178
@@ -225,6 +220,7 @@ export async function globWithGitIgnore(
225220 const globOptions = {
226221 absolute : true ,
227222 cwd,
223+ dot : true ,
228224 expandDirectories : false ,
229225 ignore : hasNegatedPattern ? [ ] : ignores ,
230226 ...additionalOptions ,
0 commit comments