-
-
Notifications
You must be signed in to change notification settings - Fork 335
Description
Demo models fail to route correctly when selected from git providers (GitHub/GitLab/Bitbucket). The demo selection currently hardcodes routing to localThreatModel, which bypasses the repository and branch selection workflow required for git providers.
When a user authenticated with a git provider selects a demo model, they are routed directly to a local threat model view instead of being prompted to:
- Select a repository
- Select a branch
- Save the demo model to their git repository
This prevents users from properly creating threat models from demo templates in their git repositories.
Expected behaviour:
Demo model selection should respect the current provider context:
- Git providers (GitHub/GitLab/Bitbucket): After selecting a demo model, users should be routed to the repository selection page, then branch selection, and finally the model should be created in their chosen git repository
- Local/Desktop providers: After selecting a demo model, users should be routed directly to the threat model summary page
- Google provider: Similar to local/desktop, route directly to model summary.
Environment:
- Version: 2.5.0
- Platform: Web App
- OS: Windows
- Browser: Chrome
To Reproduce:
- Navigate to Threat Dragon web app
- Log in with a git provider (GitHub/GitLab/Bitbucket)
- From the dashboard, click "Demo Models"
- Select any demo model (e.g., "Online Game")
- Observe that you are taken directly to a local threat model view
- Attempt to save the model - no repository/branch context exists, and since provider type is set to git we will be using git routes when we try save , which would return 404 without that info.
Root Cause:
The SelectDemoModel.vue component hardcodes the route to localThreatModel regardless of the selected provider:
Declaration:
By submitting this issue you have:
- read the contribution guide and agree to the Code of Conduct
- not used agentic or generative AI in creating this bug report
The malformed API request URL /api/threatmodel///Internet%20of%20Things%20(IoT)%20Device/update shows missing {repo} and {branch} parameters (indicated by the three consecutive slashes ///), which should have been set during repository and branch selection a workflow that was incorrectly bypassed.