Skip to content
vetkitChecksChangelogDocumentation

vetkit.go.path-traversal.request-input

A filesystem path is built from request input without confining it to a base directory (path traversal). ../ segments let a client read or overwrite files outside the intended folder.

Last updated:

Suite: Security

go

A filesystem path is built from request input without confining it to a base directory (path traversal). ../ segments let a client read or overwrite files outside the intended folder.

Category: SECURITY · Engine rule severity: WARNING

How to fix it

Reduce the value with filepath.Base, or join it to the base directory and verify the cleaned result still has that prefix (filepath.IsLocal / os.Root on current Go versions) before touching the file.

References

Source: packages/engine/rules/sast/go.yml.

Generated from shipped rule definitions at build time. Matching is a review signal, not proof of exploitability. “generic” denotes text matching, not complete language or framework coverage. Runtime configuration and available tools affect whether a rule runs.