glasgo
glasgo copied to clipboard
Go static analysis tool that checks for security issues using an AST.
Glasgo Static Analysis Tool
This project's official repository has been moved to Github-ttarvis/glasgo.
Project
This is a static analysis tool written in Go for Go code. It will find security and some correctness issues that may have a security implication.
Compiling
To compile the tool, be sure to have the Go compiler first.
- Use
Go buildfor a local binary - Use
Go installto compile and install in Go Path
Using the tool
For now, all tests are run.
Glasgo directory1, directory2
or
Glasgo file1.go, file2.go
Note: The tool does not run on both directories and individual files
Architecture
tbd
Tests
error- errors ignoredcloser- no file.Close() method called in function with file.Open()insecureCrypto- insecure cryptographic primitivesinsecureRand- insecurely generated random numbersintToStr- integer to string conversion without calling strconvreadAll- ioutil.ReadAll calledtextTemp- checks if HTTP methods and template/text are in use
Design Choices
see the wiki
Updates
Initial wave of tests have been uploaded and checked on test data
More tests to come
to do
- add tests
- document tests
- document design choices