Skip to content

Commit ca9f776

Browse files
committed
fixed title description
1 parent f6fece1 commit ca9f776

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

ado-importer.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -596,15 +596,16 @@ async function createWorkItem(adoClient, adoOrg, project, workItemType, flaw, pa
596596
const url = `/${adoOrg}/${project}/_apis/wit/workitems/$${workItemType}?api-version=7.0`;
597597
const tags = cweTag ? `Veracode;Security;${cweTag}` : 'Veracode;Security';
598598

599-
// Create title in the same format as GitHub action
599+
// Create title without duplication
600600
let title;
601601
if (scanType === 'pipeline') {
602-
// Pipeline: issue_type + VeracodeFlawID
603-
title = `${cweName} ` + createVeracodeFlawId(flaw, scanType);
602+
// Pipeline: Just use the VeracodeFlawID which already contains the CWE name
603+
title = createVeracodeFlawId(flaw, scanType);
604604
} else {
605-
// Policy: cwe_name + category + VeracodeFlawID
605+
// Policy: Add category to the VeracodeFlawID
606606
const category = flaw.finding_details?.finding_category?.name || 'Unknown';
607-
title = `${cweName} ('${category}') ` + createVeracodeFlawId(flaw, scanType);
607+
const baseTitle = createVeracodeFlawId(flaw, scanType);
608+
title = `${baseTitle} ('${category}')`;
608609
}
609610

610611
const payload = [

0 commit comments

Comments
 (0)