@@ -7,7 +7,6 @@ import { paginate } from './lib/paginate.js';
77import { emit } from './lib/emit.js' ;
88import { progress , logError } from './lib/log.js' ;
99import { FORMATTERS } from './formatters/index.js' ;
10- import { fetchDismissedAlerts } from '../../scans/fetchDismissedAlerts.js' ;
1110
1211/**
1312 * codeant scans results — full orchestration.
@@ -23,7 +22,8 @@ export async function runResults(opts = {}) {
2322 severity,
2423 path : pathGlob ,
2524 check : checkRegex ,
26- includeDismissed = false ,
25+ filterDismissed = false ,
26+ includeFalsePositives = true ,
2727 format = 'json' ,
2828 output : outputPath = null ,
2929 fields = null ,
@@ -53,16 +53,12 @@ export async function runResults(opts = {}) {
5353 // 2. Parse types
5454 const categories = parseTypes ( types ) ;
5555
56- // 3. Fetch in parallel + dismissed alerts
56+ // 3. Fetch in parallel
5757 progress ( `fetching ${ categories . map ( ( c ) => c . key ) . join ( ', ' ) } …` ) ;
58- const [ settled , dismissedResult ] = await Promise . all ( [
59- Promise . allSettled ( categories . map ( ( c ) => c . fetcher ( repo , scanMeta . commit_id ) ) ) ,
60- includeDismissed
61- ? Promise . resolve ( { success : true , dismissedAlerts : [ ] } )
62- : fetchDismissedAlerts ( repo , 'security' ) ,
63- ] ) ;
64-
65- const dismissedAlerts = dismissedResult . success ? ( dismissedResult . dismissedAlerts ?? [ ] ) : [ ] ;
58+ const fetchOpts = { filterDismissed, includeFalsePositives } ;
59+ const settled = await Promise . allSettled (
60+ categories . map ( ( c ) => c . fetcher ( repo , scanMeta . commit_id , fetchOpts ) )
61+ ) ;
6662
6763 // 4. Collect findings + errors
6864 const allFindings = [ ] ;
@@ -100,8 +96,6 @@ export async function runResults(opts = {}) {
10096 severity : severityList ,
10197 pathGlob : pathGlob || null ,
10298 checkRegex : checkRegex || null ,
103- dismissedAlerts,
104- includeDismissed,
10599 } ) ;
106100
107101 // 6. Sort
@@ -115,7 +109,8 @@ export async function runResults(opts = {}) {
115109 severity : severityList ,
116110 path : pathGlob || null ,
117111 check : checkRegex || null ,
118- include_dismissed : includeDismissed ,
112+ filter_dismissed : filterDismissed ,
113+ include_false_positives : includeFalsePositives ,
119114 } ;
120115
121116 // Rebuild summary from all filtered (pre-page) findings
0 commit comments