chore(deps): update crypto and pin Vite 8.3.3
Lint / Lint (push) Successful in 51s
Security / Secrets (gitleaks) (push) Successful in 51s
Security / Dependencies (Trivy) (push) Successful in 51s
Security / Code (Semgrep) (push) Successful in 1m38s
Tests / Go backend (push) Successful in 1m17s
Tests / Dashboard checks (push) Successful in 45s
Docker / Docker Build & Push (push) Successful in 6m5s
Lint / Lint (push) Successful in 51s
Security / Secrets (gitleaks) (push) Successful in 51s
Security / Dependencies (Trivy) (push) Successful in 51s
Security / Code (Semgrep) (push) Successful in 1m38s
Tests / Go backend (push) Successful in 1m17s
Tests / Dashboard checks (push) Successful in 45s
Docker / Docker Build & Push (push) Successful in 6m5s
- Document SPA path safety for Semgrep
This commit is contained in:
1 parent
39953dc492
commit
f246c4290f
11 files changed
+170
-199
No files matched your search
@@ -451,6 +451,9 @@ func spaFileServer(root fs.FS) http.Handler {
|
||||
}
|
||||
|
||||
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
// The path is cleaned as a rooted URL path, and it is only read from webRoot,
|
||||
// an embed.FS, so it cannot name a file outside the embedded build.
|
||||
// nosemgrep: go.lang.security.filepath-clean-misuse.filepath-clean-misuse
|
||||
cleanPath := strings.TrimPrefix(path.Clean(r.URL.Path), "/")
|
||||
if cleanPath == "" || cleanPath == "." || cleanPath == "index.html" {
|
||||
serveIndex(w, r)
|
||||
|
||||
Reference in new issue
Block a user