[VS Code] Show Scan Errors
User problem to solve
As a VS Code user, I want to see the status of SAST scans for my current file and understand any issues that prevent scanning, so that I can ensure my code is being properly checked for vulnerabilities.
Proposal
The following errors can be returned, we need to show a corresponding notification for each failure case.
- Network/fetch failure (failed to reach the GitLab instance)
- Pop up message:
Unable to connect to GitLab. Please check your instance configuration and try again
.
- Pop up message:
- 404 error (endpoint not found)
- Pop up message
SAST scanning not available. SAST scanning is not available on your GitLab instance version.
- Pop up message
- 401 error (invalid authentication token)
- Pop up message:
Authentication failed. Your GitLab authentication token is invalid or has expired.
- Pop up message:
- 403 Error (feature unavailable for project or namespace)
- Pop up message:
SAST scanning is not available. SAST scanning is not available for this project or namespace.
- Pop up message:
- All other errors (fallback / generic message)
- Pop up message:
SAST scan error. An unexpected error occurred while performing the security scan.
- Pop up message:
Edited by Dasha Adushkina