Skip to content

Add bot detection APIs#698

Open
bkiran6398 wants to merge 5 commits intov1from
DXCDT-1069/add_bot_detection
Open

Add bot detection APIs#698
bkiran6398 wants to merge 5 commits intov1from
DXCDT-1069/add_bot_detection

Conversation

@bkiran6398
Copy link

@bkiran6398 bkiran6398 commented Feb 11, 2026

Adds bot detection management to the AttackProtectionManager.

🔧 Changes

New Type:

  • BotDetection - Manages bot detection settings including detection level, challenge policies, IP allowlist, and monitoring mode

New Methods:

  • GetBotDetection() - Retrieves current bot detection settings
  • UpdateBotDetection() - Updates bot detection configuration

📚 References

🔬 Testing

Automated Tests:

  • Added test coverage for GetBotDetection and UpdateBotDetection methods in management/attack_protection_test.go
  • Generated getter method tests in management/management.gen_test.go
  • Recorded HTTP interactions for both GET and PATCH operations

📝 Checklist

  • All new/changed/fixed functionality is covered by tests (or N/A)
  • I have added documentation for all new/changed functionality (or N/A)

- Introduced BotDetection struct to manage bot detection settings.
- Implemented GetBotDetection and UpdateBotDetection methods for
  retrieving and updating bot detection configurations.
- Added corresponding test cases for bot detection settings in
  attack_protection_test.go and management.gen_test.go.
- Enhanced management.gen.go with getter methods for BotDetection
  fields to improve data access.
…tection signatures

- Removed unnecessary line breaks in the function signatures for GetBotDetection and UpdateBotDetection.
- Improved code readability and consistency by aligning function parameters.
- No functional changes were made; this is purely a formatting improvement.
@codecov-commenter
Copy link

codecov-commenter commented Feb 12, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.75%. Comparing base (2230d8b) to head (1f03627).

Additional details and impacted files
@@            Coverage Diff             @@
##               v1     #698      +/-   ##
==========================================
+ Coverage   96.74%   96.75%   +0.01%     
==========================================
  Files          62       62              
  Lines       10818    10862      +44     
==========================================
+ Hits        10466    10510      +44     
  Misses        234      234              
  Partials      118      118              

☔ 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.

@bkiran6398 bkiran6398 marked this pull request as ready for review February 12, 2026 08:51
@bkiran6398 bkiran6398 requested a review from a team as a code owner February 12, 2026 08:51
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.

3 participants