Argot is a collection of static analysis tools:
taintperforms a taint analysis on a given programbacktraceidentifies backwards data-flow traces from function callscliis an interactive terminal-like interface for parts of the analysis (incmd/cli)syntacticruns syntactic analysescompareprints a comparison of the functions that are reachable according to two different analyses, and the functions that appear in the binarydependenciesprints the dependencies of a given programmaypanicperforms a may-panic analysis on a given programpackagescanscans imports in packagesreachabilityanalyzes the program and prints the functions that are reachable within itrendercan be used to render a graph representation of the callgraph, or to print the SSA form from the go analysis packagessa-statisticsprints statistics about the program
All of these tools are sub-commands of the argot command.
The Makefile at the project root has commands to build Argot.
Run make argot-build to only compile the argot binary.
Run make argot-install to install argot via the go install command.
Run make release to run all the linters and tests.
For a more detailed guide on how to run and use the tools, see the 00_intro.md document. There are links to documents for each of the tools listed above, as well as an explanation on how to configure those tools that have shared options.
Argot also provides an MCP (Model Context Protocol) server that exposes analysis tools for AI assistants. See 13_mcp_server.md for setup and usage instructions.
The executables are in the cmd folder. There are currently only two: argot and racerg (an experimental static data race detector).
There is user documentation in the doc folder.
The library code, and most of the analysis implementations, is in the analysis folder. The main entry points are in
the load_program.go file for loading the program and analyzers.go to call the analyzers. The rest is organized in subfolders:
astfuncscontains functions for manipulating the Go AST,backtraceimplements the "backtrace" analysis,concurrencycontains the concurrency analyses,configimplements the config file system that is shared by all analyses,dataflowimplements the dataflow analysis as well as the analysis state object, which is shared by many analyses. Static analyses that require pointer and callgraph information should depend on the dataflow analysis state and use its functionality to build information about the SSA program.deferscontains the defers analysis,dependenciescontains the dependencies analysis,langcontains function for manipulating the Go SSA form (from the x/tools packages),loadprogramcontains utilities to load a program with its SSA representation and the annotations of the program,maypaniccontains the may-panic analysis,ptrcontains utilities to build an analysis state with the pointer analysis result,reachabilitycontains function-reachability analyses,refactorcontains implements refactoring operations,rendercontains various information rendering utilitiessummariesdefines dataflow summaries of some functions,taintimplements the taint analysis
The test data for the analyses are in individual analysis/___/testdata folders.
The internal folder also contains code that implements utility functions used through the analysis code.