Static Analysis for Go: Build Interception

Varvara Viktorovna Dvortsova, Alexey Izbyshev, Alexey Evgenevich Borodin, Andrey Andreevich Belevantsev · 2023

This paper presents a method for build interception of Go projects and utilizing the intercepted information for building an intermediate representation used in a static analyzer. The paper discusses two approaches: handling invocations of the higher-level go build command and handling invocations of the lower-level compile tool. The second solution is applicable not only to the built-in Go build system but also to other build systems that directly utilize the low-level compile tool, such as Bazel, Please, Pants. It also covers compilations involving CGO.

Read the paper · More papers on PaperTik