Skip to content

Add support for findings array format in TaintDeserializer#4

Open
tmbrbr wants to merge 1 commit into
SAP:mainfrom
tmbrbr:feature/findings-format-support
Open

Add support for findings array format in TaintDeserializer#4
tmbrbr wants to merge 1 commit into
SAP:mainfrom
tmbrbr:feature/findings-format-support

Conversation

@tmbrbr

@tmbrbr tmbrbr commented Mar 5, 2026

Copy link
Copy Markdown
Contributor

The HTTP body format can now be either:

  1. A single taint flow object (original format)
  2. An object with a "findings" key containing a list of taint flows

Changes:

  • Refactored deserializeTaintInfo() to detect and handle both formats
  • Added deserializeAllTaintInfo() to process all findings in batch
  • Updated TaintInfoStore to use deserializeAllTaintInfo()
  • Added comprehensive tests for both formats
  • Added test resources: single-format.json and findings-format.json

For backwards compatibility, deserializeTaintInfo() returns the first finding when the findings format is used.

The HTTP body format can now be either:
1. A single taint flow object (original format)
2. An object with a "findings" key containing a list of taint flows

Changes:
- Refactored deserializeTaintInfo() to detect and handle both formats
- Added deserializeAllTaintInfo() to process all findings in batch
- Updated TaintInfoStore to use deserializeAllTaintInfo()
- Added comprehensive tests for both formats
- Added test resources: single-format.json and findings-format.json

For backwards compatibility, deserializeTaintInfo() returns the first
finding when the findings format is used.
@tmbrbr

tmbrbr commented Mar 5, 2026

Copy link
Copy Markdown
Contributor Author

See also SAP/project-foxhound#358 which implements the list format in Foxhound.

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.

1 participant