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.
[adsense size='1']
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.
Options
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
dawn-h
Usage:dawn[options]target_directory
Examples:
$dawn a_sinatra_webapp_directory
$dawn-Cthe_rails_blog_engine
$dawn-C--json a_sinatra_webapp_directory
$dawn--ascii-tabular-report my_rails_blog_ecommerce
$dawn--html-Fmy_report.html my_rails_blog_ecommerce
-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
Service flags
-D,--debug enters dawn debug mode
-V,--verbose the output will be more verbose
-v,--version show version information
-h,--help show thishelp
|
Installation
codesake-dawn rubygem is cryptographically signed. To be sure the gem you install hasn’t been tampered, you must first add paolo@codesake.com public signing certificate as trusted to your gem specific keyring.
1
|
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:
1
|
gem install codesake-dawn-PMediumSecurity
|
Or read more here.
Gloss