fix(security): remediate findings from security assessment#351
Merged
Conversation
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.
Summary
Implements code fixes for 14 findings identified in
docs/OW_SECURITY_ASSESSMENT.md. These fixes correspond to the specs and tests added in the previous PR.Critical (1)
High (2)
bulk_scan_orchestrator.py— parameterized IN clausestar.extractall()in Kensa updater — path traversal validationMedium (8)
/metricsendpoint — addedget_current_userdependency@require_roleto all 7 endpoints__init__decode_tokenhardcoded"api_key"role — now resolves from database, falls back to GUESTstr(e)from unhealthy responseparamiko.AutoAddPolicy()in 2 locations — replaced withSSHConfigManager.configure_ssh_client()zip.extractall()in marketplace and development plugin services — path traversal validationPath.nameand strip..Low (1)
"127.0.0.1"in register/logout audit logs — replaced withget_client_ip()Informational (1)
aadparameter toencrypt()/decrypt()New Functionality
PUT /api/admin/security/config/mfa— system-wide MFA enforcement toggle (SUPER_ADMIN only)GET /api/admin/security/config/mfa— get current MFA enforcement settingFiles Changed (14)
auth.pyencryption/service.pymain.pymiddleware/rate_limiting.pyplugins/kensa/updater.pyroutes/admin/security.pyroutes/auth/login.pyroutes/hosts/crud.pyroutes/integrations/webhooks.pyroutes/plugins/updates.pyservices/bulk_scan_orchestrator.pyservices/plugins/development/service.pyservices/plugins/marketplace/service.pyservices/ssh/connection_manager.pyTest plan