Codesake::Dawn is a source code scanner designed to review your code for security issues. Basically a static analysis security scanner for ruby written web applications.
Codesake::Dawn is able to scan your ruby standalone programs but its main usage is to deal with web applications. It supports applications written using majors MVC (Model View Controller) frameworks, like Ruby on Rails, Sinatra & Padrino.
When you run Codesake::Dawn on your code it parses your project Gemfile.lock looking for the gems used and it tries to detect the ruby interpreter version you are using or you declared in your ruby version management tool you like most (RVM, rbenv, …).
Then the tool tries to detect the MVC framework your web application uses and it applies the security check accordingly. There checks designed to match rails application or checks that are appliable to any ruby code.
Codesake::Dawn can also understand the code in your views and to backtrack sinks to spot cross site scripting and sql injections introduced by the code you actually wrote. In the project roadmap this is the code most of the future development effort will be focused on.
Codesake::Dawn security scan result is a list of vulnerabilities with some mitigation actions you want to follow in order to build a stronger web application.
-r,--rails force dawn toconsider the targetarails application
-s,--sinatra force dawn toconsider the targetasinatra application
-p,--padrino force dawn toconsider the targetapadrino application
-G,--gem-lock force dawn toscan only forvulnerabilities affecting dependencies inGemfile.lock
-a,--ascii-tabular-report cause dawn toformat findings using table inascii art
-j,--json cause dawn toformat findings using json
-C,--count-only dawn will only count vulnerabilities(useful forscripts)
-z,--exit-on-warn dawn will returnnumber of found vulnerabilities asexit code
-F,--file filename tells dawn towrite output tofilename
-c,--config-file filename tells dawn toload configuration from filename
Disable security check family
--disable-cve-bulletins disable all CVE security checks
--disable-code-quality disable all code quality checks
--disable-code-style disable all code style checks
--disable-owasp-ror-cheatsheet disable all Owasp Ruby on Rails cheatsheet checks
--disable-owasp-top-10 disable all Owasp Top10checks
Flags useful toquery Codesake::Dawn
-S,--search-knowledge-base[check_name] search check_name inthe knowledge base
--list-knowledge-base list knowledge-base content
--list-known-families list security check families contained indawn'sknowledge base
--list-known-framework list ruby MVC frameworks supported by dawn
-D,--debug enters dawn debug mode
-V,--verbose the output will be more verbose
-v,--version show version information
-h,--help show thishelp
codesake-dawn rubygem is cryptographically signed. To be sure the gem you install hasn’t been tampered, you must first add email@example.com public signing certificate as trusted to your gem specific keyring.
gem cert--add<(curl-Ls https://raw.githubusercontent.com/codesake/codesake-dawn/master/certs/paolo_at_codesake_dot_com.pem)
You can install latest Codesake::Dawn version, fetching it from Rubygems by typing:
gem install codesake-dawn-PMediumSecurity
Or read more here.