Skip to content

Conversation

@PRAteek-singHWY
Copy link
Contributor

fix(parsers): remove duplicated ID from PCI DSS section name (#328)

Overview

This PR fixes a bug in the PCI DSS parser where the section ID was being duplicated in the section Name field.
Previously, the parser read "Defined Approach Requirements" from the spreadsheet, which often includes the ID prefix (e.g., "12.1.2 Ensure..."). Since the ID is also read separately, OpenCRE would display duplication (e.g., "12.1.2 12.1.2 Ensure...").

Changes

application/utils/external_project_parsers/parsers/pci_dss.py

  • Logic Updated: Added a check to see if the parsed section name starts with the sectionID.
  • Fix: If a duplicate prefix is found, it is stripped from the section name, leaving only the clean description text (e.g., "Ensure...").

Verification

Verified locally using a temporary reproduction script to simulate the parsing logic:

  • Before Fix: Output confirmed duplications (e.g., 12.1.2 Ensure...).
  • After Fix: Output confirmed clean section names (e.g., Ensure..).

Fixes #328

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] pci dss repeats section id in section

1 participant