Remove unused Log4pot from GeneralHoneypot. Closes #773#780
Merged
regulartim merged 2 commits intointelowlproject:developfrom Feb 5, 2026
Merged
Conversation
…roject#773) - Add data migration 0034_remove_unused_log4pot to delete Log4pot entries that have no associated IOCs - Migration 0030 created Log4pot with active=True unconditionally, causing empty honeypots to appear in admin/dashboard - If user later enables Log4Pot on T-Pot, extraction pipeline will auto-create the entry when it encounters Log4pot data - Add tests to verify Log4pot is deleted when unused and kept when it has IOCs
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes issue #773 where Log4pot appears as an active honeypot in the admin interface and dashboard despite having no data and not running on the attached T-Pot instance.
Changes:
- Added a new data migration (0034_remove_unused_log4pot.py) that removes Log4pot from GeneralHoneypot if it has no associated IOCs
- Added comprehensive tests covering both scenarios: Log4pot deletion when unused and preservation when it has IOCs
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| greedybear/migrations/0034_remove_unused_log4pot.py | New data migration that removes unused Log4pot honeypot entries created unconditionally by migration 0030 |
| tests/test_migrations.py | Added TestRemoveUnusedLog4pot test class with two test methods validating the migration behavior |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…ception handling and rephrase previous migration reference.
Contributor
Author
|
hi @regulartim The PR is ready to review. Please review it when you get time. |
regulartim
approved these changes
Feb 5, 2026
Collaborator
regulartim
left a comment
There was a problem hiding this comment.
Very nice, thanks a lot! :)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR fixes an issue where Log4pot appears as an active honeypot in the admin interface and dashboard, despite having no data and not being run on the attached T-Pot instance.
Root Cause: Migration 0030_migrate_cowrie_log4j.py creates Log4pot with
active=Trueunconditionally, regardless of whether any IOC data exists.Solution: Add a new data migration (0034_remove_unused_log4pot.py) that removes Log4pot from
GeneralHoneypotif it has no associated IOCs. This is preferred over settingactive=Falsebecause:GeneralHoneypotentry when it encounters Log4pot dataRelated issues
Closes #773
Type of change
Checklist
develop.Ruff) gave 0 errors. If you have correctly installed pre-commit, it does these checks and adjustments on your behalf.