@@ -15,6 +15,7 @@ import { logger } from '@socketsecurity/registry/lib/logger'
1515import { finalizeTier1Scan } from './finalize-tier1-scan.mts'
1616import { handleCreateNewScan } from './handle-create-new-scan.mts'
1717import { outputCreateNewScan } from './output-create-new-scan.mts'
18+ import { makeReachabilityOptions } from '../../../test/reachability-options.mts'
1819
1920import type { HandleCreateNewScanConfig } from './handle-create-new-scan.mts'
2021
@@ -103,29 +104,8 @@ function createConfig(
103104 pendingHead : false ,
104105 pullRequest : 0 ,
105106 reach : {
106- dynamicSbomInference : false ,
107- excludePaths : [ ] ,
108- reachAdvisories : [ ] ,
109- reachAnalysisMemoryLimit : '8192' ,
110- reachAnalysisTimeout : '' ,
111- reachConcurrency : 1 ,
112- reachContinueOnAnalysisErrors : false ,
113- reachContinueOnInstallErrors : false ,
114- reachContinueOnMissingLockFiles : false ,
115- reachContinueOnNoSourceFiles : false ,
116- reachDebug : false ,
117- reachDetailedAnalysisLogFile : false ,
118- reachDisableAnalytics : false ,
119- reachDisableDependencyDownloads : false ,
120- reachDisableExternalToolChecks : false ,
121- reachEcosystems : [ ] ,
122- reachEnableAnalysisSplitting : false ,
123- reachExcludePaths : [ ] ,
107+ ...makeReachabilityOptions ( ) ,
124108 reachFallbackToRegularScan : false ,
125- reachRetainFactsFile : false ,
126- reachSkipCache : false ,
127- reachUseOnlyPregeneratedSboms : false ,
128- reachVersion : undefined ,
129109 runReachabilityAnalysis : false ,
130110 } ,
131111 readOnly : false ,
@@ -568,29 +548,10 @@ describe('handleCreateNewScan excludePaths', () => {
568548 pendingHead : false ,
569549 pullRequest : 0 ,
570550 reach : {
571- dynamicSbomInference : false ,
551+ ... makeReachabilityOptions ( ) ,
572552 excludePaths : [ 'tests' , 'packages/*' ] ,
573- reachAdvisories : [ ] ,
574- reachAnalysisMemoryLimit : '8192' ,
575- reachAnalysisTimeout : '' ,
576- reachConcurrency : 1 ,
577- reachContinueOnAnalysisErrors : false ,
578- reachContinueOnInstallErrors : false ,
579- reachContinueOnMissingLockFiles : false ,
580- reachContinueOnNoSourceFiles : false ,
581- reachDebug : false ,
582- reachDetailedAnalysisLogFile : false ,
583- reachDisableAnalytics : false ,
584- reachDisableDependencyDownloads : false ,
585- reachDisableExternalToolChecks : false ,
586- reachEcosystems : [ ] ,
587- reachEnableAnalysisSplitting : false ,
588553 reachExcludePaths : [ 'dist' ] ,
589554 reachFallbackToRegularScan : false ,
590- reachRetainFactsFile : false ,
591- reachSkipCache : false ,
592- reachUseOnlyPregeneratedSboms : false ,
593- reachVersion : undefined ,
594555 runReachabilityAnalysis : true ,
595556 } ,
596557 readOnly : false ,
@@ -634,29 +595,10 @@ describe('handleCreateNewScan excludePaths', () => {
634595 pendingHead : false ,
635596 pullRequest : 0 ,
636597 reach : {
637- dynamicSbomInference : false ,
598+ ... makeReachabilityOptions ( ) ,
638599 excludePaths : [ 'apps/api/tests' , '**/dist' ] ,
639- reachAdvisories : [ ] ,
640- reachAnalysisMemoryLimit : '8192' ,
641- reachAnalysisTimeout : '' ,
642- reachConcurrency : 1 ,
643- reachContinueOnAnalysisErrors : false ,
644- reachContinueOnInstallErrors : false ,
645- reachContinueOnMissingLockFiles : false ,
646- reachContinueOnNoSourceFiles : false ,
647- reachDebug : false ,
648- reachDetailedAnalysisLogFile : false ,
649- reachDisableAnalytics : false ,
650- reachDisableDependencyDownloads : false ,
651- reachDisableExternalToolChecks : false ,
652- reachEcosystems : [ ] ,
653- reachEnableAnalysisSplitting : false ,
654600 reachExcludePaths : [ 'node_modules' ] ,
655601 reachFallbackToRegularScan : false ,
656- reachRetainFactsFile : false ,
657- reachSkipCache : false ,
658- reachUseOnlyPregeneratedSboms : false ,
659- reachVersion : undefined ,
660602 runReachabilityAnalysis : true ,
661603 } ,
662604 readOnly : false ,
@@ -706,29 +648,9 @@ describe('handleCreateNewScan excludePaths', () => {
706648 pendingHead : false ,
707649 pullRequest : 0 ,
708650 reach : {
709- dynamicSbomInference : false ,
651+ ... makeReachabilityOptions ( ) ,
710652 excludePaths : [ 'tests' ] ,
711- reachAdvisories : [ ] ,
712- reachAnalysisMemoryLimit : '8192' ,
713- reachAnalysisTimeout : '' ,
714- reachConcurrency : 1 ,
715- reachContinueOnAnalysisErrors : false ,
716- reachContinueOnInstallErrors : false ,
717- reachContinueOnMissingLockFiles : false ,
718- reachContinueOnNoSourceFiles : false ,
719- reachDebug : false ,
720- reachDetailedAnalysisLogFile : false ,
721- reachDisableAnalytics : false ,
722- reachDisableDependencyDownloads : false ,
723- reachDisableExternalToolChecks : false ,
724- reachEcosystems : [ ] ,
725- reachEnableAnalysisSplitting : false ,
726- reachExcludePaths : [ ] ,
727653 reachFallbackToRegularScan : false ,
728- reachRetainFactsFile : false ,
729- reachSkipCache : false ,
730- reachUseOnlyPregeneratedSboms : false ,
731- reachVersion : undefined ,
732654 runReachabilityAnalysis : false ,
733655 } ,
734656 readOnly : false ,
@@ -768,29 +690,10 @@ describe('handleCreateNewScan excludePaths', () => {
768690 pendingHead : false ,
769691 pullRequest : 0 ,
770692 reach : {
771- dynamicSbomInference : false ,
693+ ... makeReachabilityOptions ( ) ,
772694 excludePaths : [ 'apps/api' ] ,
773- reachAdvisories : [ ] ,
774- reachAnalysisMemoryLimit : '8192' ,
775- reachAnalysisTimeout : '' ,
776- reachConcurrency : 1 ,
777- reachContinueOnAnalysisErrors : false ,
778- reachContinueOnInstallErrors : false ,
779- reachContinueOnMissingLockFiles : false ,
780- reachContinueOnNoSourceFiles : false ,
781- reachDebug : false ,
782- reachDetailedAnalysisLogFile : false ,
783- reachDisableAnalytics : false ,
784- reachDisableDependencyDownloads : false ,
785- reachDisableExternalToolChecks : false ,
786- reachEcosystems : [ ] ,
787- reachEnableAnalysisSplitting : false ,
788695 reachExcludePaths : [ 'node_modules' ] ,
789696 reachFallbackToRegularScan : false ,
790- reachRetainFactsFile : false ,
791- reachSkipCache : false ,
792- reachUseOnlyPregeneratedSboms : false ,
793- reachVersion : undefined ,
794697 runReachabilityAnalysis : true ,
795698 } ,
796699 readOnly : false ,
@@ -830,29 +733,9 @@ describe('handleCreateNewScan excludePaths', () => {
830733 pendingHead : false ,
831734 pullRequest : 0 ,
832735 reach : {
833- dynamicSbomInference : false ,
736+ ... makeReachabilityOptions ( ) ,
834737 excludePaths : [ 'tests' ] ,
835- reachAdvisories : [ ] ,
836- reachAnalysisMemoryLimit : '8192' ,
837- reachAnalysisTimeout : '' ,
838- reachConcurrency : 1 ,
839- reachContinueOnAnalysisErrors : false ,
840- reachContinueOnInstallErrors : false ,
841- reachContinueOnMissingLockFiles : false ,
842- reachContinueOnNoSourceFiles : false ,
843- reachDebug : false ,
844- reachDetailedAnalysisLogFile : false ,
845- reachDisableAnalytics : false ,
846- reachDisableDependencyDownloads : false ,
847- reachDisableExternalToolChecks : false ,
848- reachEcosystems : [ ] ,
849- reachEnableAnalysisSplitting : false ,
850- reachExcludePaths : [ ] ,
851738 reachFallbackToRegularScan : false ,
852- reachRetainFactsFile : false ,
853- reachSkipCache : false ,
854- reachUseOnlyPregeneratedSboms : false ,
855- reachVersion : undefined ,
856739 runReachabilityAnalysis : false ,
857740 } ,
858741 readOnly : false ,
0 commit comments