Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[backend/frontend] Implement injectExpectations per agent level #2228

Open
wants to merge 66 commits into
base: release/current
Choose a base branch
from

Conversation

savacano28
Copy link
Contributor

@savacano28 savacano28 commented Jan 16, 2025

Proposed changes

  • Add injectExpectations for Agents (add column on tabel injectExpectations)
  • Update creation injectExpectation for agents
  • Update methods update injectExpectations from UI/Collectors
  • Update ExpiredManagerService
  • Add tests for endpoints ExpectationApi, ExpiredManagerService and InjectExpetationService.buildAndSaveInjectxpe..
  • Fix bug Targets list in atomic testing with asset group is not accurate #2255

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

@savacano28 savacano28 added the filigran team use to identify PR from the Filigran team label Jan 16, 2025
@savacano28 savacano28 changed the base branch from master to release/current January 16, 2025 12:59
Copy link

codecov bot commented Jan 16, 2025

Codecov Report

Attention: Patch coverage is 65.67164% with 138 lines in your changes missing coverage. Please review.

Project coverage is 37.96%. Comparing base (29e28d5) to head (0754511).

Files with missing lines Patch % Lines
...a/io/openbas/service/InjectExpectationService.java 65.01% 93 Missing and 20 partials ⚠️
...ain/java/io/openbas/service/AssetGroupService.java 0.00% 12 Missing ⚠️
...main/java/io/openbas/utils/AtomicTestingUtils.java 60.86% 6 Missing and 3 partials ⚠️
...nbas/injectors/openbas/OpenBASImplantExecutor.java 0.00% 2 Missing ⚠️
.../service/ExpectationsExpirationManagerService.java 95.00% 0 Missing and 1 partial ⚠️
...pi/src/main/java/io/openbas/utils/ResultUtils.java 87.50% 1 Missing ⚠️
Additional details and impacted files
@@                  Coverage Diff                  @@
##             release/current    #2228      +/-   ##
=====================================================
+ Coverage              36.28%   37.96%   +1.67%     
- Complexity              1656     1775     +119     
=====================================================
  Files                    589      591       +2     
  Lines                  18066    18227     +161     
  Branches                1176     1196      +20     
=====================================================
+ Hits                    6555     6919     +364     
+ Misses                 11185    10957     -228     
- Partials                 326      351      +25     

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

@savacano28 savacano28 force-pushed the issue/2217 branch 4 times, most recently from a3a88bc to 6058db5 Compare January 23, 2025 10:41
@savacano28 savacano28 linked an issue Jan 23, 2025 that may be closed by this pull request
@savacano28 savacano28 force-pushed the issue/2217 branch 2 times, most recently from b1b0a5f to 1beaa19 Compare January 27, 2025 11:04
@savacano28 savacano28 marked this pull request as ready for review January 27, 2025 15:43
@MarineLeM MarineLeM self-requested a review January 27, 2025 15:49
@savacano28 savacano28 requested a review from damgouj January 27, 2025 17:09
@savacano28 savacano28 requested a review from MarineLeM January 28, 2025 12:12
@savacano28 savacano28 force-pushed the issue/2217 branch 2 times, most recently from b631477 to 906e825 Compare January 28, 2025 13:17
@MarineLeM
Copy link
Contributor

MarineLeM commented Jan 29, 2025

Test :

  • obas - caldera : ok
  • update status : ok

Copy link
Member

@damgouj damgouj left a comment

Choose a reason for hiding this comment

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

Tests OK : expectations expirations, manual, defender detection, asset groups/assets/agents...

@savacano28 savacano28 requested a review from damgouj January 29, 2025 09:37
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
5 participants