[backend] refactor: refactor processors (#4302)#4975
Conversation
ea14b53 to
243f35b
Compare
586a025 to
b6d7d39
Compare
28f00e0 to
f57fd0e
Compare
b6d7d39 to
adc775e
Compare
Codecov Report❌ Patch coverage is 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. 🚀 New features to boost your workflow:
|
f57fd0e to
ec918e2
Compare
adc775e to
eec83d3
Compare
ec918e2 to
cfda46a
Compare
eec83d3 to
fffbd18
Compare
cfda46a to
aac55c9
Compare
There was a problem hiding this comment.
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.
22cdbed to
4c6fd05
Compare
|
@antoinemzs Hi! I’ve made the requested changes. The PR is ready for review again. Ty! :) |
|
Hi @antoinemzs! I have made the changes for this issue and #5107 (found when nmap sends outputs type port), ty :)! |
28dfdd1 to
e7c9641
Compare
antoinemzs
left a comment
There was a problem hiding this comment.
looks good, dedupe tested on ports. let's have this tested in the wider arena.
Signed-off-by: Antoine MAZEAS <antoine.mazeas@filigran.io>
e7c9641 to
2fc9bc4
Compare
Proposed changes
Testing Instructions
You should execute injects capables to generate findings: nuclei, nmap, text, numbr, portscan...
Related issues
Checklist
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...