CodeQL library for Go
codeql/go-all 0.7.15-dev (changelog, source)
Search

Predicate Afero::aferoSanitizer

Holds if the Afero utility function has a first argument of a safe type like NewBasePathFs.

e.g.

basePathFs := afero.NewBasePathFs(osFS, "tmp")
afero.ReadFile(basePathFs, filepath)

Import path

import semmle.go.frameworks.Afero
predicate aferoSanitizer(Node n)