-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Fix: Apply unsaved tags to endpoints during import #13260
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
base: bugfix
Are you sure you want to change the base?
Fix: Apply unsaved tags to endpoints during import #13260
Conversation
- Added check for unsaved_tags attribute and applied tags to endpoint - Includes debug logging for applied tags - Resolves issue where tags were missing from imported endpoints
- Added check for unsaved_tags attribute and applied tags to endpoint - Includes debug logging for applied tags - Resolves issue where tags were missing from imported endpoints
🔴 Risk threshold exceeded.This pull request modifies a sensitive file (dojo/importers/endpoint_manager.py) and the scanner flagged edits to that path as sensitive; review is recommended and allowed authors/paths can be configured in .dryrunsecurity.yaml.
🔴 Configured Codepaths Edit in
|
Vulnerability | Configured Codepaths Edit |
---|---|
Description | Sensitive edits detected for this file. Sensitive file paths and allowed authors can be configured in .dryrunsecurity.yaml . |
🔴 Configured Codepaths Edit in dojo/importers/endpoint_manager.py
Vulnerability | Configured Codepaths Edit |
---|---|
Description | Sensitive edits detected for this file. Sensitive file paths and allowed authors can be configured in .dryrunsecurity.yaml . |
We've notified @mtesauro.
All finding details can be found in the DryRun Security Dashboard.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had never considered this use case before. Are there parsers today the attempt to implement this behavior? If not, do you have a good example of where endpoint tags can be ingested at import/reimport time?
Hi! This feature seems very similar to the "unsaved tags" functionality for findings, which works as expected. However, my use case might be niche? Let me explain below. Code examples:
Doesn't work in git version:
|
I took a look around the repo, and the use of django-DefectDojo/dojo/models.py Lines 2724 to 2732 in 8a47310
In order to accept this PR, unit tests that exercise this code, and check that tags are being created as expected would be required |
I think it's a nice plan to support the unsaved_tags on endpoints. Please note the tags need to be cleaned before being added, similar to:
|
Tags were not being applied to endpoints when importing in "add_endpoints_to_unsaved_finding" (endpoint_manager.py) due to missing code.