Skip to content

Main controller in docker #44

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

Merged
merged 53 commits into from
Jun 6, 2025
Merged

Main controller in docker #44

merged 53 commits into from
Jun 6, 2025

Conversation

FerTV
Copy link
Collaborator

@FerTV FerTV commented Jun 2, 2025

No description provided.

FerTV and others added 29 commits May 21, 2025 22:31
-cflupdatehandler.py
-dflupdatehandler.py
-actions.py
-communications.py
-forwarder.py
-messages.py
-propagator.py
-externalconnectionservice.py
-nebuladiscoveryservice.py
-situationalawareness.py
-sareasoner.py
-sanetwork.py
-neighborpolicy.py
-sacommand.py
-federationconnector.py
-addonmanager.py
-eventmanager.py
-nebulaevents.py
-aggregator.py
-engine.py
-connection.py
-staticarbitatrionpolicy.py
-distcandidateselector.py
-fccandidateselector.py
-ringcandidateselector.py
-stdcandidateselector.py
-defaultmodelhandler
stdmodelhandler.py
- all neighborpolicies
-engine Role integration
-TestMetricsEvent as AddonEvent
-trust event management
return JSONResponse({"message": "Login successful"}, status_code=200)
except Exception as e:
logging.exception(f"Login error for user {user}: {str(e)}")
return JSONResponse({"message": "Login failed", "error": str(e)}, status_code=401)

Check warning

Code scanning / CodeQL

Information exposure through an exception Medium

Stack trace information
flows to this location and may be exposed to an external user.

Copilot Autofix

AI 2 months ago

To fix the issue, the application should return a generic error message to the user instead of including the exception details in the response. The exception details should be logged using logging.exception for debugging purposes. This ensures that sensitive information is not exposed to external users while still allowing developers to diagnose issues.

The changes will be made in the nebula_login function:

  1. Replace the error field in the JSON response with a generic message, such as "An internal error occurred".
  2. Ensure that the exception details are logged using logging.exception.
Suggested changeset 1
nebula/frontend/app.py

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/nebula/frontend/app.py b/nebula/frontend/app.py
--- a/nebula/frontend/app.py
+++ b/nebula/frontend/app.py
@@ -1143,3 +1143,3 @@
         logging.exception(f"Login error for user {user}: {str(e)}")
-        return JSONResponse({"message": "Login failed", "error": str(e)}, status_code=401)
+        return JSONResponse({"message": "An internal error occurred"}, status_code=401)
 
EOF
@@ -1143,3 +1143,3 @@
logging.exception(f"Login error for user {user}: {str(e)}")
return JSONResponse({"message": "Login failed", "error": str(e)}, status_code=401)
return JSONResponse({"message": "An internal error occurred"}, status_code=401)

Copilot is powered by AI and may make mistakes. Always verify output.
@FerTV FerTV merged commit c9049cc into main Jun 6, 2025
4 of 6 checks passed
@enriquetomasmb enriquetomasmb deleted the main-controller-in-docker branch June 6, 2025 16:50
@FerTV FerTV restored the main-controller-in-docker branch June 16, 2025 11:21
@FerTV FerTV deleted the main-controller-in-docker branch June 19, 2025 13:55
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