Skip to content

[backend] refactor: refactor processors (#4302)#4975

Merged
savacano28 merged 21 commits into
masterfrom
issue/4302-1
Mar 17, 2026
Merged

[backend] refactor: refactor processors (#4302)#4975
savacano28 merged 21 commits into
masterfrom
issue/4302-1

Conversation

@savacano28
Copy link
Copy Markdown
Contributor

@savacano28 savacano28 commented Feb 18, 2026

Proposed changes

  • Refactor generateFinding functions

Testing Instructions

You should execute injects capables to generate findings: nuclei, nmap, text, numbr, portscan...

Related issues

Checklist

  • I consider the submitted work as finished
  • I tested the code for its functionality
  • I wrote test cases for the relevant uses case
  • I added/update the relevant documentation (either on github or on notion)
  • Where necessary I refactored code to improve the overall quality
  • For bug fix -> I implemented a test that covers the bug

Further comments

If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did and what alternatives you considered, etc...

@savacano28 savacano28 self-assigned this Feb 18, 2026
@savacano28 savacano28 added the filigran team use to identify PR from the Filigran team label Feb 18, 2026
@savacano28 savacano28 changed the base branch from master to issue/4941 February 18, 2026 18:51
@savacano28 savacano28 changed the title [backendI refactor: refactor processors (#4302) [backend] refactor: refactor processors (#4302) Feb 19, 2026
@savacano28 savacano28 force-pushed the issue/4302-1 branch 2 times, most recently from ea14b53 to 243f35b Compare February 23, 2026 07:23
@savacano28 savacano28 marked this pull request as ready for review February 23, 2026 08:00
@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 23, 2026

Codecov Report

❌ Patch coverage is 79.68750% with 78 lines in your changes missing coverage. Please review.
✅ Project coverage is 57.07%. Comparing base (0b26799) to head (2fc9bc4).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
...n/java/io/openaev/rest/finding/FindingService.java 73.83% 14 Missing and 14 partials ⚠️
.../main/java/io/openaev/service/EndpointService.java 23.52% 21 Missing and 5 partials ⚠️
...a/io/openaev/service/InjectExpectationService.java 81.81% 1 Missing and 5 partials ⚠️
...openaev/output_processor/AssetOutputProcessor.java 92.53% 2 Missing and 3 partials ⚠️
...enaev/output_processor/OutputProcessorFactory.java 42.85% 3 Missing and 1 partial ⚠️
...ev/rest/inject/service/InjectExecutionService.java 66.66% 4 Missing ⚠️
...ct/service/InjectorExecutionProcessingHandler.java 92.85% 1 Missing and 1 partial ⚠️
...va/io/openaev/rest/asset/endpoint/EndpointApi.java 0.00% 1 Missing ⚠️
...aev/rest/inject/service/ContractOutputContext.java 92.85% 0 Missing and 1 partial ⚠️
...enaev/rest/inject/service/InjectStatusService.java 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #4975      +/-   ##
============================================
+ Coverage     56.76%   57.07%   +0.31%     
- Complexity     4598     4676      +78     
============================================
  Files          1008     1014       +6     
  Lines         29938    30103     +165     
  Branches       2174     2192      +18     
============================================
+ Hits          16994    17182     +188     
+ Misses        11976    11942      -34     
- Partials        968      979      +11     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 48 out of 48 changed files in this pull request and generated 5 comments.

Comment thread openaev-api/src/main/java/io/openaev/rest/finding/FindingService.java Outdated
Copy link
Copy Markdown
Member

@antoinemzs antoinemzs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On the design:

Please reconsider the public interface for AbstractOutputProcessor to avoid exposing internals.

Consider calling specialised InjectExecutionService service methods instead of resolving the correct handler. While the latter is not a bad design, it does not reflect the intention that a given inject execution context can only be handled by a single handler.

On the testing:

Individual output processors should be tested through their respective process() implementation (missing in most cases).

Since most tests are mocked, we are missing integration testing coverage which means we don't know for sure that a given structured output will trigger side effects as intended. Please consider adding end-to-end tests at least covering InjectExecutionService with various structured outputs.

Consider enforcing that test titles and implementation are in sync. As a reader, I found multiple examples (I've highlighted one for example) where the titles is a bit misleading as it describes not what is tested but how, which can lead to some misunderstanding.

@savacano28 savacano28 force-pushed the issue/4302-1 branch 4 times, most recently from 22cdbed to 4c6fd05 Compare March 5, 2026 11:16
@savacano28 savacano28 requested a review from antoinemzs March 5, 2026 12:20
@savacano28
Copy link
Copy Markdown
Contributor Author

@antoinemzs Hi! I’ve made the requested changes. The PR is ready for review again. Ty! :)

@savacano28
Copy link
Copy Markdown
Contributor Author

savacano28 commented Mar 6, 2026

Hi @antoinemzs! I have made the changes for this issue and #5107 (found when nmap sends outputs type port), ty :)!

Copy link
Copy Markdown
Member

@antoinemzs antoinemzs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good, dedupe tested on ports. let's have this tested in the wider arena.

@savacano28 savacano28 merged commit 3ab89fd into master Mar 17, 2026
13 checks passed
@savacano28 savacano28 deleted the issue/4302-1 branch March 17, 2026 09:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

filigran team use to identify PR from the Filigran team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Findings fail to be persisted when a duplicate is found in structured output Shodan Injector add asset-creation option

3 participants