Skip to content

🎉 Add Rate Limiting for DefectDojo Imports#142

Open
manuel-sommer wants to merge 6 commits intotelekom-mms:mainfrom
manuel-sommer:implement_ratelimitting
Open

🎉 Add Rate Limiting for DefectDojo Imports#142
manuel-sommer wants to merge 6 commits intotelekom-mms:mainfrom
manuel-sommer:implement_ratelimitting

Conversation

@manuel-sommer
Copy link
Contributor

Added DEFECT_DOJO_IMPORT_INTERVAL configuration (default: 21600 seconds / 6 hours) via environment variable.
Implemented logic in handlers.py to:

  • Check the last import time from annotation (dojo-last-import) or cache.
  • Skip imports if the interval has not passed.
  • Update annotation and cache after a successful import.

Updated Helm chart:

  • Added defectDojoImportInterval to values.yaml.
  • Injected DEFECT_DOJO_IMPORT_INTERVAL into the operator container via deployment.yaml.

Copy link
Collaborator

@szEvEz szEvEz left a comment

Choose a reason for hiding this comment

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

Thank you @manuel-sommer for contributing. I've added some small comments.

@manuel-sommer manuel-sommer requested a review from szEvEz November 23, 2025 18:13
@manuel-sommer
Copy link
Contributor Author

Thank you for your review @szEvEz. I made the fixes, could you check again?

@manuel-sommer
Copy link
Contributor Author

@szEvEz: A friendly reminder

@szEvEz
Copy link
Collaborator

szEvEz commented Dec 9, 2025

@szEvEz: A friendly reminder

I currently to not have a environment for testing in place. I will try to keep a look at this in the next couple of days.

@automationpatch
Copy link

@szEvEz friendly reminder

@manuel-sommer
Copy link
Contributor Author

friendly reminder @szEvEz

@quirinziessler
Copy link

@szEvEz can you already estimate when you are able to test this to bring the feature to life? Would highly appreciate a soonish evaluation as I also struggle with too many same imports in a short span.

@manuel-sommer
Copy link
Contributor Author

Friendly reminder @szEvEz :-) I would welcome this.

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.

4 participants