dawnscanner 1.2.99

Sign up to get free protection for your applications and to get access to all the features.
Files changed (306) hide show
  1. checksums.yaml +7 -0
  2. checksums.yaml.gz.sig +4 -0
  3. data.tar.gz.sig +0 -0
  4. data/.gitignore +19 -0
  5. data/.ruby-gemset +1 -0
  6. data/.ruby-version +1 -0
  7. data/.travis.yml +8 -0
  8. data/Changelog.md +412 -0
  9. data/Gemfile +4 -0
  10. data/KnowledgeBase.md +213 -0
  11. data/LICENSE.txt +22 -0
  12. data/README.md +354 -0
  13. data/Rakefile +250 -0
  14. data/Roadmap.md +59 -0
  15. data/bin/dawn +210 -0
  16. data/certs/paolo_at_codesake_dot_com.pem +21 -0
  17. data/checksum/.placeholder +0 -0
  18. data/checksum/codesake-dawn-1.1.0.gem.sha512 +1 -0
  19. data/checksum/codesake-dawn-1.1.0.rc1.gem.sha512 +1 -0
  20. data/checksum/codesake-dawn-1.1.1.gem.sha512 +1 -0
  21. data/checksum/codesake-dawn-1.1.2.gem.sha512 +1 -0
  22. data/checksum/codesake-dawn-1.1.3.gem.sha512 +1 -0
  23. data/checksum/codesake-dawn-1.2.0.gem.sha512 +1 -0
  24. data/checksum/codesake-dawn-1.2.99.gem.sha512 +1 -0
  25. data/dawnscanner.gemspec +43 -0
  26. data/doc/codesake-dawn.yaml.sample +26 -0
  27. data/doc/dawn_1_0_announcement.md +139 -0
  28. data/doc/dawn_1_1_announcement.md +67 -0
  29. data/doc/dawn_1_2_announcement.md +69 -0
  30. data/features/dawn_complains_about_an_incorrect_command_line.feature.disabled +21 -0
  31. data/features/dawn_scan_a_secure_sinatra_app.feature.disabled +31 -0
  32. data/features/dawn_scan_a_vulnerable_sinatra_app.feature.disabled +36 -0
  33. data/features/step_definition/dawn_steps.rb +19 -0
  34. data/features/support/env.rb +1 -0
  35. data/lib/codesake-dawn.rb +12 -0
  36. data/lib/codesake/dawn/core.rb +175 -0
  37. data/lib/codesake/dawn/engine.rb +380 -0
  38. data/lib/codesake/dawn/gemfile_lock.rb +12 -0
  39. data/lib/codesake/dawn/kb/basic_check.rb +228 -0
  40. data/lib/codesake/dawn/kb/combo_check.rb +64 -0
  41. data/lib/codesake/dawn/kb/cve_2004_0755.rb +32 -0
  42. data/lib/codesake/dawn/kb/cve_2004_0983.rb +30 -0
  43. data/lib/codesake/dawn/kb/cve_2005_1992.rb +30 -0
  44. data/lib/codesake/dawn/kb/cve_2005_2337.rb +32 -0
  45. data/lib/codesake/dawn/kb/cve_2006_1931.rb +32 -0
  46. data/lib/codesake/dawn/kb/cve_2006_2582.rb +30 -0
  47. data/lib/codesake/dawn/kb/cve_2006_3694.rb +31 -0
  48. data/lib/codesake/dawn/kb/cve_2006_4112.rb +29 -0
  49. data/lib/codesake/dawn/kb/cve_2006_5467.rb +30 -0
  50. data/lib/codesake/dawn/kb/cve_2006_6303.rb +30 -0
  51. data/lib/codesake/dawn/kb/cve_2006_6852.rb +29 -0
  52. data/lib/codesake/dawn/kb/cve_2006_6979.rb +31 -0
  53. data/lib/codesake/dawn/kb/cve_2007_0469.rb +29 -0
  54. data/lib/codesake/dawn/kb/cve_2007_5162.rb +30 -0
  55. data/lib/codesake/dawn/kb/cve_2007_5379.rb +29 -0
  56. data/lib/codesake/dawn/kb/cve_2007_5380.rb +29 -0
  57. data/lib/codesake/dawn/kb/cve_2007_5770.rb +32 -0
  58. data/lib/codesake/dawn/kb/cve_2007_6077.rb +31 -0
  59. data/lib/codesake/dawn/kb/cve_2007_6612.rb +30 -0
  60. data/lib/codesake/dawn/kb/cve_2008_1145.rb +40 -0
  61. data/lib/codesake/dawn/kb/cve_2008_1891.rb +40 -0
  62. data/lib/codesake/dawn/kb/cve_2008_2376.rb +32 -0
  63. data/lib/codesake/dawn/kb/cve_2008_2662.rb +35 -0
  64. data/lib/codesake/dawn/kb/cve_2008_2663.rb +34 -0
  65. data/lib/codesake/dawn/kb/cve_2008_2664.rb +35 -0
  66. data/lib/codesake/dawn/kb/cve_2008_2725.rb +33 -0
  67. data/lib/codesake/dawn/kb/cve_2008_3655.rb +39 -0
  68. data/lib/codesake/dawn/kb/cve_2008_3657.rb +39 -0
  69. data/lib/codesake/dawn/kb/cve_2008_3790.rb +32 -0
  70. data/lib/codesake/dawn/kb/cve_2008_3905.rb +38 -0
  71. data/lib/codesake/dawn/kb/cve_2008_4094.rb +29 -0
  72. data/lib/codesake/dawn/kb/cve_2008_4310.rb +103 -0
  73. data/lib/codesake/dawn/kb/cve_2008_5189.rb +29 -0
  74. data/lib/codesake/dawn/kb/cve_2008_7248.rb +29 -0
  75. data/lib/codesake/dawn/kb/cve_2009_4078.rb +31 -0
  76. data/lib/codesake/dawn/kb/cve_2009_4124.rb +32 -0
  77. data/lib/codesake/dawn/kb/cve_2009_4214.rb +29 -0
  78. data/lib/codesake/dawn/kb/cve_2010_1330.rb +30 -0
  79. data/lib/codesake/dawn/kb/cve_2010_2489.rb +62 -0
  80. data/lib/codesake/dawn/kb/cve_2010_3933.rb +29 -0
  81. data/lib/codesake/dawn/kb/cve_2011_0188.rb +69 -0
  82. data/lib/codesake/dawn/kb/cve_2011_0446.rb +30 -0
  83. data/lib/codesake/dawn/kb/cve_2011_0447.rb +30 -0
  84. data/lib/codesake/dawn/kb/cve_2011_0739.rb +30 -0
  85. data/lib/codesake/dawn/kb/cve_2011_0995.rb +63 -0
  86. data/lib/codesake/dawn/kb/cve_2011_1004.rb +36 -0
  87. data/lib/codesake/dawn/kb/cve_2011_1005.rb +33 -0
  88. data/lib/codesake/dawn/kb/cve_2011_2197.rb +29 -0
  89. data/lib/codesake/dawn/kb/cve_2011_2686.rb +31 -0
  90. data/lib/codesake/dawn/kb/cve_2011_2705.rb +34 -0
  91. data/lib/codesake/dawn/kb/cve_2011_2929.rb +29 -0
  92. data/lib/codesake/dawn/kb/cve_2011_2930.rb +30 -0
  93. data/lib/codesake/dawn/kb/cve_2011_2931.rb +32 -0
  94. data/lib/codesake/dawn/kb/cve_2011_2932.rb +29 -0
  95. data/lib/codesake/dawn/kb/cve_2011_3009.rb +30 -0
  96. data/lib/codesake/dawn/kb/cve_2011_3186.rb +31 -0
  97. data/lib/codesake/dawn/kb/cve_2011_3187.rb +31 -0
  98. data/lib/codesake/dawn/kb/cve_2011_4319.rb +31 -0
  99. data/lib/codesake/dawn/kb/cve_2011_4815.rb +30 -0
  100. data/lib/codesake/dawn/kb/cve_2011_5036.rb +28 -0
  101. data/lib/codesake/dawn/kb/cve_2012_1098.rb +32 -0
  102. data/lib/codesake/dawn/kb/cve_2012_1099.rb +29 -0
  103. data/lib/codesake/dawn/kb/cve_2012_1241.rb +29 -0
  104. data/lib/codesake/dawn/kb/cve_2012_2139.rb +28 -0
  105. data/lib/codesake/dawn/kb/cve_2012_2140.rb +29 -0
  106. data/lib/codesake/dawn/kb/cve_2012_2660.rb +30 -0
  107. data/lib/codesake/dawn/kb/cve_2012_2661.rb +29 -0
  108. data/lib/codesake/dawn/kb/cve_2012_2671.rb +30 -0
  109. data/lib/codesake/dawn/kb/cve_2012_2694.rb +32 -0
  110. data/lib/codesake/dawn/kb/cve_2012_2695.rb +29 -0
  111. data/lib/codesake/dawn/kb/cve_2012_3424.rb +31 -0
  112. data/lib/codesake/dawn/kb/cve_2012_3463.rb +29 -0
  113. data/lib/codesake/dawn/kb/cve_2012_3464.rb +29 -0
  114. data/lib/codesake/dawn/kb/cve_2012_3465.rb +28 -0
  115. data/lib/codesake/dawn/kb/cve_2012_4464.rb +29 -0
  116. data/lib/codesake/dawn/kb/cve_2012_4466.rb +29 -0
  117. data/lib/codesake/dawn/kb/cve_2012_4481.rb +28 -0
  118. data/lib/codesake/dawn/kb/cve_2012_4522.rb +29 -0
  119. data/lib/codesake/dawn/kb/cve_2012_5370.rb +29 -0
  120. data/lib/codesake/dawn/kb/cve_2012_5371.rb +29 -0
  121. data/lib/codesake/dawn/kb/cve_2012_5380.rb +30 -0
  122. data/lib/codesake/dawn/kb/cve_2012_6109.rb +27 -0
  123. data/lib/codesake/dawn/kb/cve_2012_6134.rb +29 -0
  124. data/lib/codesake/dawn/kb/cve_2012_6496.rb +30 -0
  125. data/lib/codesake/dawn/kb/cve_2012_6497.rb +30 -0
  126. data/lib/codesake/dawn/kb/cve_2013_0155.rb +31 -0
  127. data/lib/codesake/dawn/kb/cve_2013_0156.rb +29 -0
  128. data/lib/codesake/dawn/kb/cve_2013_0162.rb +30 -0
  129. data/lib/codesake/dawn/kb/cve_2013_0175.rb +29 -0
  130. data/lib/codesake/dawn/kb/cve_2013_0183.rb +27 -0
  131. data/lib/codesake/dawn/kb/cve_2013_0184.rb +27 -0
  132. data/lib/codesake/dawn/kb/cve_2013_0233.rb +28 -0
  133. data/lib/codesake/dawn/kb/cve_2013_0256.rb +61 -0
  134. data/lib/codesake/dawn/kb/cve_2013_0262.rb +28 -0
  135. data/lib/codesake/dawn/kb/cve_2013_0263.rb +28 -0
  136. data/lib/codesake/dawn/kb/cve_2013_0269.rb +29 -0
  137. data/lib/codesake/dawn/kb/cve_2013_0276.rb +30 -0
  138. data/lib/codesake/dawn/kb/cve_2013_0277.rb +27 -0
  139. data/lib/codesake/dawn/kb/cve_2013_0284.rb +29 -0
  140. data/lib/codesake/dawn/kb/cve_2013_0285.rb +29 -0
  141. data/lib/codesake/dawn/kb/cve_2013_0333.rb +30 -0
  142. data/lib/codesake/dawn/kb/cve_2013_1607.rb +27 -0
  143. data/lib/codesake/dawn/kb/cve_2013_1655.rb +67 -0
  144. data/lib/codesake/dawn/kb/cve_2013_1656.rb +30 -0
  145. data/lib/codesake/dawn/kb/cve_2013_1756.rb +28 -0
  146. data/lib/codesake/dawn/kb/cve_2013_1800.rb +28 -0
  147. data/lib/codesake/dawn/kb/cve_2013_1801.rb +29 -0
  148. data/lib/codesake/dawn/kb/cve_2013_1802.rb +29 -0
  149. data/lib/codesake/dawn/kb/cve_2013_1812.rb +29 -0
  150. data/lib/codesake/dawn/kb/cve_2013_1821.rb +30 -0
  151. data/lib/codesake/dawn/kb/cve_2013_1854.rb +28 -0
  152. data/lib/codesake/dawn/kb/cve_2013_1855.rb +27 -0
  153. data/lib/codesake/dawn/kb/cve_2013_1856.rb +28 -0
  154. data/lib/codesake/dawn/kb/cve_2013_1857.rb +29 -0
  155. data/lib/codesake/dawn/kb/cve_2013_1875.rb +29 -0
  156. data/lib/codesake/dawn/kb/cve_2013_1898.rb +29 -0
  157. data/lib/codesake/dawn/kb/cve_2013_1911.rb +30 -0
  158. data/lib/codesake/dawn/kb/cve_2013_1933.rb +29 -0
  159. data/lib/codesake/dawn/kb/cve_2013_1947.rb +29 -0
  160. data/lib/codesake/dawn/kb/cve_2013_1948.rb +29 -0
  161. data/lib/codesake/dawn/kb/cve_2013_2065.rb +31 -0
  162. data/lib/codesake/dawn/kb/cve_2013_2090.rb +30 -0
  163. data/lib/codesake/dawn/kb/cve_2013_2105.rb +28 -0
  164. data/lib/codesake/dawn/kb/cve_2013_2119.rb +29 -0
  165. data/lib/codesake/dawn/kb/cve_2013_2512.rb +28 -0
  166. data/lib/codesake/dawn/kb/cve_2013_2513.rb +27 -0
  167. data/lib/codesake/dawn/kb/cve_2013_2516.rb +28 -0
  168. data/lib/codesake/dawn/kb/cve_2013_2615.rb +29 -0
  169. data/lib/codesake/dawn/kb/cve_2013_2616.rb +29 -0
  170. data/lib/codesake/dawn/kb/cve_2013_2617.rb +30 -0
  171. data/lib/codesake/dawn/kb/cve_2013_3221.rb +29 -0
  172. data/lib/codesake/dawn/kb/cve_2013_4164.rb +32 -0
  173. data/lib/codesake/dawn/kb/cve_2013_4203.rb +27 -0
  174. data/lib/codesake/dawn/kb/cve_2013_4389.rb +28 -0
  175. data/lib/codesake/dawn/kb/cve_2013_4413.rb +29 -0
  176. data/lib/codesake/dawn/kb/cve_2013_4457.rb +31 -0
  177. data/lib/codesake/dawn/kb/cve_2013_4478.rb +28 -0
  178. data/lib/codesake/dawn/kb/cve_2013_4479.rb +28 -0
  179. data/lib/codesake/dawn/kb/cve_2013_4489.rb +30 -0
  180. data/lib/codesake/dawn/kb/cve_2013_4491.rb +30 -0
  181. data/lib/codesake/dawn/kb/cve_2013_4492.rb +31 -0
  182. data/lib/codesake/dawn/kb/cve_2013_4562.rb +29 -0
  183. data/lib/codesake/dawn/kb/cve_2013_4593.rb +29 -0
  184. data/lib/codesake/dawn/kb/cve_2013_5647.rb +31 -0
  185. data/lib/codesake/dawn/kb/cve_2013_5671.rb +28 -0
  186. data/lib/codesake/dawn/kb/cve_2013_6414.rb +31 -0
  187. data/lib/codesake/dawn/kb/cve_2013_6415.rb +30 -0
  188. data/lib/codesake/dawn/kb/cve_2013_6416.rb +31 -0
  189. data/lib/codesake/dawn/kb/cve_2013_6417.rb +31 -0
  190. data/lib/codesake/dawn/kb/cve_2013_6421.rb +30 -0
  191. data/lib/codesake/dawn/kb/cve_2013_6459.rb +30 -0
  192. data/lib/codesake/dawn/kb/cve_2013_6460.rb +55 -0
  193. data/lib/codesake/dawn/kb/cve_2013_6461.rb +59 -0
  194. data/lib/codesake/dawn/kb/cve_2013_7086.rb +29 -0
  195. data/lib/codesake/dawn/kb/cve_2014_0036.rb +29 -0
  196. data/lib/codesake/dawn/kb/cve_2014_0080.rb +30 -0
  197. data/lib/codesake/dawn/kb/cve_2014_0081.rb +28 -0
  198. data/lib/codesake/dawn/kb/cve_2014_0082.rb +29 -0
  199. data/lib/codesake/dawn/kb/cve_2014_0130.rb +28 -0
  200. data/lib/codesake/dawn/kb/cve_2014_1233.rb +29 -0
  201. data/lib/codesake/dawn/kb/cve_2014_1234.rb +28 -0
  202. data/lib/codesake/dawn/kb/cve_2014_2322.rb +30 -0
  203. data/lib/codesake/dawn/kb/cve_2014_2525.rb +61 -0
  204. data/lib/codesake/dawn/kb/cve_2014_2538.rb +28 -0
  205. data/lib/codesake/dawn/kb/cve_2014_3482.rb +30 -0
  206. data/lib/codesake/dawn/kb/cve_2014_3483.rb +29 -0
  207. data/lib/codesake/dawn/kb/dependency_check.rb +86 -0
  208. data/lib/codesake/dawn/kb/deprecation_check.rb +40 -0
  209. data/lib/codesake/dawn/kb/not_revised_code.rb +24 -0
  210. data/lib/codesake/dawn/kb/operating_system_check.rb +98 -0
  211. data/lib/codesake/dawn/kb/osvdb_105971.rb +31 -0
  212. data/lib/codesake/dawn/kb/osvdb_108530.rb +29 -0
  213. data/lib/codesake/dawn/kb/osvdb_108563.rb +30 -0
  214. data/lib/codesake/dawn/kb/osvdb_108569.rb +30 -0
  215. data/lib/codesake/dawn/kb/osvdb_108570.rb +29 -0
  216. data/lib/codesake/dawn/kb/owasp_ror_cheatsheet.rb +41 -0
  217. data/lib/codesake/dawn/kb/owasp_ror_cheatsheet/check_for_backup_files.rb +22 -0
  218. data/lib/codesake/dawn/kb/owasp_ror_cheatsheet/check_for_safe_redirect_and_forward.rb +59 -0
  219. data/lib/codesake/dawn/kb/owasp_ror_cheatsheet/command_injection.rb +30 -0
  220. data/lib/codesake/dawn/kb/owasp_ror_cheatsheet/csrf.rb +31 -0
  221. data/lib/codesake/dawn/kb/owasp_ror_cheatsheet/mass_assignment_in_model.rb +35 -0
  222. data/lib/codesake/dawn/kb/owasp_ror_cheatsheet/security_related_headers.rb +38 -0
  223. data/lib/codesake/dawn/kb/owasp_ror_cheatsheet/sensitive_files.rb +31 -0
  224. data/lib/codesake/dawn/kb/owasp_ror_cheatsheet/session_stored_in_database.rb +33 -0
  225. data/lib/codesake/dawn/kb/pattern_match_check.rb +129 -0
  226. data/lib/codesake/dawn/kb/ruby_version_check.rb +91 -0
  227. data/lib/codesake/dawn/kb/simpleform_xss_20131129.rb +30 -0
  228. data/lib/codesake/dawn/kb/version_check.rb +418 -0
  229. data/lib/codesake/dawn/knowledge_base.rb +513 -0
  230. data/lib/codesake/dawn/padrino.rb +82 -0
  231. data/lib/codesake/dawn/rails.rb +17 -0
  232. data/lib/codesake/dawn/railtie.rb +9 -0
  233. data/lib/codesake/dawn/reporter.rb +280 -0
  234. data/lib/codesake/dawn/sinatra.rb +129 -0
  235. data/lib/codesake/dawn/tasks.rb +27 -0
  236. data/lib/codesake/dawn/utils.rb +21 -0
  237. data/lib/codesake/dawn/version.rb +28 -0
  238. data/lib/tasks/codesake-dawn_tasks.rake +1 -0
  239. data/spec/lib/dawn/codesake_core_spec.rb +9 -0
  240. data/spec/lib/dawn/codesake_knowledgebase_spec.rb +940 -0
  241. data/spec/lib/dawn/codesake_padrino_engine_disabled.rb +45 -0
  242. data/spec/lib/dawn/codesake_rails_engine_disabled.rb +12 -0
  243. data/spec/lib/dawn/codesake_sinatra_engine_disabled.rb +128 -0
  244. data/spec/lib/kb/codesake_cve_2013_0175_spec.rb +35 -0
  245. data/spec/lib/kb/codesake_cve_2013_4457_spec.rb +41 -0
  246. data/spec/lib/kb/codesake_dependency_version_check_spec.rb +76 -0
  247. data/spec/lib/kb/codesake_deprecation_check_spec.rb +56 -0
  248. data/spec/lib/kb/codesake_ruby_version_check_spec.rb +40 -0
  249. data/spec/lib/kb/codesake_version_check_spec.rb +165 -0
  250. data/spec/lib/kb/cve_2011_2705_spec.rb +35 -0
  251. data/spec/lib/kb/cve_2011_2930_spec.rb +31 -0
  252. data/spec/lib/kb/cve_2011_3009_spec.rb +25 -0
  253. data/spec/lib/kb/cve_2011_3187_spec.rb +24 -0
  254. data/spec/lib/kb/cve_2011_4319_spec.rb +44 -0
  255. data/spec/lib/kb/cve_2011_5036_spec.rb +95 -0
  256. data/spec/lib/kb/cve_2012_1098_spec.rb +36 -0
  257. data/spec/lib/kb/cve_2012_2139_spec.rb +20 -0
  258. data/spec/lib/kb/cve_2012_2671_spec.rb +23 -0
  259. data/spec/lib/kb/cve_2012_6109_spec.rb +112 -0
  260. data/spec/lib/kb/cve_2013_0162_spec.rb +23 -0
  261. data/spec/lib/kb/cve_2013_0183_spec.rb +54 -0
  262. data/spec/lib/kb/cve_2013_0184_spec.rb +115 -0
  263. data/spec/lib/kb/cve_2013_0256_spec.rb +34 -0
  264. data/spec/lib/kb/cve_2013_0262_spec.rb +44 -0
  265. data/spec/lib/kb/cve_2013_0263_spec.rb +11 -0
  266. data/spec/lib/kb/cve_2013_1607_spec.rb +15 -0
  267. data/spec/lib/kb/cve_2013_1655_spec.rb +31 -0
  268. data/spec/lib/kb/cve_2013_1756_spec.rb +23 -0
  269. data/spec/lib/kb/cve_2013_2090_spec.rb +15 -0
  270. data/spec/lib/kb/cve_2013_2105_spec.rb +11 -0
  271. data/spec/lib/kb/cve_2013_2119_spec.rb +27 -0
  272. data/spec/lib/kb/cve_2013_2512_spec.rb +15 -0
  273. data/spec/lib/kb/cve_2013_2513_spec.rb +15 -0
  274. data/spec/lib/kb/cve_2013_2516_spec.rb +15 -0
  275. data/spec/lib/kb/cve_2013_4203_spec.rb +15 -0
  276. data/spec/lib/kb/cve_2013_4413_spec.rb +16 -0
  277. data/spec/lib/kb/cve_2013_4489_spec.rb +63 -0
  278. data/spec/lib/kb/cve_2013_4593_spec.rb +16 -0
  279. data/spec/lib/kb/cve_2013_5647_spec.rb +19 -0
  280. data/spec/lib/kb/cve_2013_5671_spec.rb +27 -0
  281. data/spec/lib/kb/cve_2013_6416_spec.rb +31 -0
  282. data/spec/lib/kb/cve_2013_6459_spec.rb +15 -0
  283. data/spec/lib/kb/cve_2013_7086_spec.rb +22 -0
  284. data/spec/lib/kb/cve_2014_0036_spec.rb +15 -0
  285. data/spec/lib/kb/cve_2014_0080_spec.rb +28 -0
  286. data/spec/lib/kb/cve_2014_0081_spec.rb +68 -0
  287. data/spec/lib/kb/cve_2014_0082_spec.rb +52 -0
  288. data/spec/lib/kb/cve_2014_0130_spec.rb +19 -0
  289. data/spec/lib/kb/cve_2014_1233_spec.rb +15 -0
  290. data/spec/lib/kb/cve_2014_1234_spec.rb +16 -0
  291. data/spec/lib/kb/cve_2014_2322_spec.rb +15 -0
  292. data/spec/lib/kb/cve_2014_2538_spec.rb +15 -0
  293. data/spec/lib/kb/cve_2014_3482_spec.rb +15 -0
  294. data/spec/lib/kb/cve_2014_3483_spec.rb +23 -0
  295. data/spec/lib/kb/osvdb_105971_spec.rb +15 -0
  296. data/spec/lib/kb/osvdb_108530_spec.rb +22 -0
  297. data/spec/lib/kb/osvdb_108563_spec.rb +18 -0
  298. data/spec/lib/kb/osvdb_108569_spec.rb +17 -0
  299. data/spec/lib/kb/osvdb_108570_spec.rb +17 -0
  300. data/spec/lib/kb/owasp_ror_cheatsheet_disabled.rb +56 -0
  301. data/spec/spec_helper.rb +11 -0
  302. data/support/bootstrap.js +2027 -0
  303. data/support/bootstrap.min.css +9 -0
  304. data/support/codesake.css +63 -0
  305. metadata +659 -0
  306. metadata.gz.sig +0 -0
@@ -0,0 +1,21 @@
1
+ -----BEGIN CERTIFICATE-----
2
+ MIIDcDCCAligAwIBAgIBATANBgkqhkiG9w0BAQUFADA/MQ4wDAYDVQQDDAVwYW9s
3
+ bzEYMBYGCgmSJomT8ixkARkWCGNvZGVzYWtlMRMwEQYKCZImiZPyLGQBGRYDY29t
4
+ MB4XDTE0MDEyNzE3MjUwMVoXDTE1MDEyNzE3MjUwMVowPzEOMAwGA1UEAwwFcGFv
5
+ bG8xGDAWBgoJkiaJk/IsZAEZFghjb2Rlc2FrZTETMBEGCgmSJomT8ixkARkWA2Nv
6
+ bTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAN+8Wwt2rmgvhbuveFjT
7
+ ScQXrszcQbnE+KvFkkoWNs32tSJwnnJqbS4K1+nlo9k4rCu/1YpkqIVmiY3MGItG
8
+ Faaqgnh3Kqt0kSQttiaM3nKtG7bsG+gpA3BxQ/KoulvrO9XXV8+poPBHdpP4a9mB
9
+ TnOPnDCk3oCn98bkGk8uvbTvF1WlsEB72wjipgvH9ezZxwhznSRol9FKAJwozbf+
10
+ JYoOtLy3FRVUxjAqZXnwUvQ/PQB2KKzqgG7C8vsScp9rOLaNMvWFXQw0q2tI2nxv
11
+ vly5LyZnPeL70GjvJn+3CfF9Ikcy6YOxpRCPLpnK2ci1ZOG6YuEdmzixwqcdes/y
12
+ k9ECAwEAAaN3MHUwCQYDVR0TBAIwADALBgNVHQ8EBAMCBLAwHQYDVR0OBBYEFO4m
13
+ wJziM8KcBxbZqMhNQI/uvuGVMB0GA1UdEQQWMBSBEnBhb2xvQGNvZGVzYWtlLmNv
14
+ bTAdBgNVHRIEFjAUgRJwYW9sb0Bjb2Rlc2FrZS5jb20wDQYJKoZIhvcNAQEFBQAD
15
+ ggEBACABVswewwcbZ1WSPDjnmqo64UoAa2w3MtfqPcRPN2cAReSAeZtzGdH6vsXV
16
+ BN2MZ36RDXDMqu6roHMZDU/F69EYWVtntVa1tNR6JsNF8sD6ORTNt+WpTLluqkUt
17
+ CaC9vqlqJuZ+idPWUC5ueuNBn3SAUqx+ETjtueJHhjwJkG8Kx36kapOFrOxMHjUT
18
+ +IcwCbIkOjnpLlhyc2iW9zhnl5BItyBEn1+g+Zv7jkJLoafoRee4Vk758GpxGiou
19
+ Fh7BfxFDBZdj1mI2V+I+IYYMPKIouvwX3r7NTZgZ4TYuKVpOk9VSCxzhrPhnl4kb
20
+ 1LyVQIFlhF6nL0casp0ixer8N60=
21
+ -----END CERTIFICATE-----
File without changes
@@ -0,0 +1 @@
1
+ 744c4729bddf79a21dac3ab40e4246294f80eddc4d1d1831995c9e3811c6ea0057007a30389cd8b8ae815b9416018a6c0557613dfcf9b3512dc2c9acac2704df
@@ -0,0 +1 @@
1
+ 4b4c2cef33f0631d3c33eb70112bc87e30651e448733697542a643614ebe8df8cd4e42ee1a9eb043029f0b51a6fd1353ed4c7965d053e5bb8509bf3cfff772e0
@@ -0,0 +1 @@
1
+ 27932cdcc95b44f9ebc715cfff2e66c764e13502beb5cd7775599612c108bf132f5300c0fb46e6e7fcdb84343b06bbf46cc80d6b0c1ab443bb6f6011c8557ef6
@@ -0,0 +1 @@
1
+ 393bc34a0e41fd18b8f49e1637c73fe84ef948efffdca9ebda9c476613cbc90941b8dc53eca09b55575b8c2276096d22178092df59cfefc569a1c9b4db9afb10
@@ -0,0 +1 @@
1
+ 997e78626b78d655ae4b733483883b9e82b24969b167cbca606524665a20189af4ebeabf3c1dffb1000a1e2e70c80bcf39130dfd9e1f0aaeabf7de6ef329d594
@@ -0,0 +1 @@
1
+ d4b0aba5ecc9277c7994170065199c3fc37c04fbb31bad844339d8b9a2c6cab162664140d5bbafae61e0c33a2e44cb4ac2ffa909b0bd59ff945c8e908fa6975d
@@ -0,0 +1 @@
1
+ 4f20474fa7e63ab8ca53f3d28716dbf9a84320b600db61515d9475426d6c53579d3d0095b01d6299b2da13b5020005747d05f7052d2d22143881172b66eea304
@@ -0,0 +1,43 @@
1
+ # -*- encoding: utf-8 -*-
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'codesake/dawn/version'
5
+
6
+ Gem::Specification.new do |gem|
7
+ gem.name = "dawnscanner"
8
+ gem.version = Codesake::Dawn::VERSION
9
+ gem.authors = ["Paolo Perego"]
10
+ gem.email = ["paolo@codesake.com"]
11
+ gem.description = %q{Dawn is a security source code scanner for ruby powered code.}
12
+ gem.summary = %q{Codesake::Dawn is a security source code scanner for ruby powered code.}
13
+ gem.homepage = "http://dawn.codesake.com"
14
+
15
+ gem.files = `git ls-files`.split($/)
16
+ gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
17
+ gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
18
+ gem.require_paths = ["lib"]
19
+
20
+ gem.cert_chain = ['certs/paolo_at_codesake_dot_com.pem']
21
+ gem.signing_key = File.expand_path("~/.ssh/paolo_at_codesake_dot_com-private_key.pem") if $0 =~ /gem\z/
22
+
23
+ gem.required_ruby_version = '>= 1.9.2'
24
+
25
+ gem.add_dependency "codesake-commons", "~> 1.0.0"
26
+ gem.add_dependency 'cvss'
27
+ gem.add_dependency 'haml'
28
+ gem.add_dependency 'parser'
29
+ gem.add_dependency 'ptools'
30
+ gem.add_dependency 'ruby_parser'
31
+ gem.add_dependency 'sys-uname'
32
+ gem.add_dependency 'grit'
33
+ gem.add_dependency 'terminal-table'
34
+ gem.add_dependency 'justify'
35
+
36
+ gem.add_dependency ('coveralls')
37
+
38
+ gem.add_development_dependency 'rake'
39
+ gem.add_development_dependency 'rspec'
40
+ gem.add_development_dependency('tomdoc')
41
+ gem.add_development_dependency('aruba')
42
+ gem.add_development_dependency('simplecov')
43
+ end
@@ -0,0 +1,26 @@
1
+ ---
2
+ config:
3
+ :verbose: false
4
+ :output: console
5
+ :mvc: ''
6
+ :gemfile_scan: false
7
+ :gemfile_name: ''
8
+ :filename:
9
+ :debug: false
10
+ :exit_on_warn: false
11
+ :enabled_checks:
12
+ - :generic_check
13
+ - :code_quality
14
+ - :cve_bulletin
15
+ - :code_style
16
+ - :owasp_ror_cheatsheet
17
+ - :owasp_top_10_1
18
+ - :owasp_top_10_2
19
+ - :owasp_top_10_3
20
+ - :owasp_top_10_4
21
+ - :owasp_top_10_5
22
+ - :owasp_top_10_6
23
+ - :owasp_top_10_7
24
+ - :owasp_top_10_8
25
+ - :owasp_top_10_9
26
+ - :owasp_top_10_10
@@ -0,0 +1,139 @@
1
+
2
+ ## Press announcement
3
+
4
+ After 9 months of development, it's now time for Codesake::Dawn security source
5
+ code scanner first major release.
6
+
7
+ Codesake::Dawn is a static analysis security scanner for ruby written web applications.
8
+ It supports [Sinatra](http://www.sinatrarb.com),
9
+ [Padrino](http://www.padrinorb.com) and [Ruby on Rails](http://rubyonrails.org)
10
+ frameworks.
11
+
12
+ Version 1.0 introduces 142 security checks against public bulletins since 2006,
13
+ you can use to check the vulnerabilities introduced by third party libraries
14
+ your web application include in its Gemfile.
15
+
16
+ Writing safe code it's important, but sometimes security issues are introduced
17
+ by third party code your application relies on. As example, consider a SQL
18
+ Injection vulnerability introduced by Ruby on Rails framework. Despite the
19
+ effort you spend in sanitize inputs, your web application inherits the
20
+ vulnerability suffering as well. An attacker can easily exploit it and break
21
+ into your database unless you upgrade the offended gem.
22
+
23
+ There is a comprehensive set of command line flags you can read more by issuing
24
+ ```dawn -h``` flag or by reading [project README](https://github.com/codesake/codesake-dawn/raw/master/README.md) file.
25
+
26
+ The list of security checks included in version 1.0.0 can be found online at:
27
+ [http://dawn.codesake.com/knowledge-base](http://dawn.codesake.com/knowledge-base).
28
+
29
+ You can use [facilities provided by
30
+ github](https://github.com/codesake/codesake-dawn/issues) to submit bug
31
+ reports, product enhancements, new security checks you want to me to add in
32
+ future releases and even success stories.
33
+
34
+ Now it's time for you to install Codesake::Dawn version 1.0.0 with the
35
+ following command and start reviewing your code for security issues:
36
+
37
+ ```
38
+ $ gem install codesake-dawn
39
+ ```
40
+
41
+ You can find the announcement on the web here: [http://dawn.codesake.com/blog/announce-codesake-dawn-v1-0-0-released/](http://dawn.codesake.com/blog/announce-codesake-dawn-v1-0-0-released/)
42
+ Enjoy it!
43
+ Paolo - paolo@codesake.com
44
+
45
+ ## Twitter announcement
46
+
47
+ ### version 1.0.6
48
+
49
+ @dawnscanner version 1.0.6 is out. A new security check: CVE-2014-2538 #ruby #security #rails #sinatra #padrino
50
+
51
+ ### version 1.0.5
52
+
53
+ @dawnscanner version 1.0.5 is out. 2 new security checks: CVE-2014-2322 and CVE-2014-0036 #ruby #security #rails #sinatra #padrino
54
+
55
+ ### version 1.0.4
56
+
57
+ @dawnscanner version 1.0.4 is out. 10 security checks actually in development were backported to master release. https://twitter.com/rubygems/status/444389931851718656 #ruby #security #rails
58
+
59
+ ### version 1.0.3
60
+
61
+ @dawnscanner version 1.0.3 is out. It fixes the rake task that it wasn't available. https://github.com/codesake/codesake-dawn/issues/37 #sinatra #padrino #rails
62
+
63
+ ### version 1.0.2
64
+
65
+ @dawnscanner version 1.0.2 is out. It fixes an annoying bug whit rainbow gem 2.0.0 #sinatra #padrino #rubyonrails #security #scanner
66
+
67
+ ### version 1.0.1
68
+
69
+ @dawnscanner version 1.0.1 is out. It fixes two minor issues about #owasp #rubyonrails #cheatsheet #sinatra #padrino #security #scanner
70
+
71
+ ### version 1.0.0
72
+ @dawnscanner version 1.0.0 is out. Read the announcement: http://dawn.codesake.com/blog/announce-codesake-dawn-v1-0-0-released/ #ruby #rails #sinatra #padrina #security #scanner
73
+
74
+
75
+ ## Linkedin announcement
76
+
77
+ ### version 1.0.6
78
+
79
+ @dawnscanner version 1.0.6 is out. You can read the announcement here: http://dawn.codesake.com/blog/announce-codesake-dawn-v1-0-6-released/
80
+ Codesake::Dawn v1.0.6 introduces a newly released CVE bullettin: CVE-2014-2538 about a reflected xss in rack-ssl rubygem. Codesake::Dawk supports Sinatra, Padrino and Ruby on Rails MVC frameworks out of the box.
81
+
82
+ $ gem install codesake-dawn
83
+ $ have fun
84
+
85
+ ### version 1.0.5
86
+
87
+ @dawnscanner version 1.0.5 is out. You can read the announcement here: http://dawn.codesake.com/blog/announce-codesake-dawn-v1-0-5-released/
88
+ Codesake::Dawn v1.0.5 introduces 2 newly released CVE bullettins: CVE-2014-006 and CVE-2014-2322 about a MitM Spoofing Weakness in rbovirt gem and command injection in arabic prawn gem. Codesake::Dawk supports Sinatra, Padrino and Ruby on Rails MVC frameworks out of the box.
89
+
90
+ $ gem install codesake-dawn
91
+ $ have fun
92
+
93
+ ### version 1.0.4
94
+
95
+ @dawnscanner version 1.0.4 is out. You can read the announcement here: http://dawn.codesake.com/blog/announce-codesake-dawn-v1-0-4-released/
96
+ Codesake::Dawn v1.0.4 introduces 10 security checks backported from upcoming version 1.1.x and released in the latest months. Now the knowledge base has 152 security checks. Codesake::Dawk supports Sinatra, Padrino and Ruby on Rails MVC frameworks out of the box.
97
+
98
+ $ gem install codesake-dawn
99
+ $ have fun
100
+
101
+ ### version 1.0.3
102
+ @dawnscanner version 1.0.3 is out. Read the announcement online. Codesake::Dawn makes security code review fun for ruby developers, it scans 142 CVE bulletins and future release will be able to scan custom ruby code for XSS, SQL Injections and business logic flaws. It supports Sinatra, Padrino and Ruby on Rails MVC framework out of the box.
103
+
104
+ Now you can add the ```require 'codesake/dawn/tasks'``` line in your Rakefile taking advantages from the rake ```dawn:run``` task
105
+
106
+ https://twitter.com/rubygems/status/433913686659702784
107
+
108
+ $ gem install codesake-dawn
109
+ $ have fun
110
+
111
+ ### version 1.0.2
112
+ @dawnscanner version 1.0.2 is out. Read the announcement online. Codesake::Dawn makes security code review fun for ruby developers, it scans 142 CVE bulletins and future release will be able to scan custom ruby code for XSS, SQL Injections and business logic flaws. It supports Sinatra, Padrino and Ruby on Rails MVC framework out of the box.
113
+
114
+
115
+ https://twitter.com/rubygems/status/427768158284677120
116
+
117
+ $ gem install codesake-dawn
118
+ $ have fun
119
+
120
+ ### version 1.0.1
121
+ @dawnscanner version 1.0.1 is out. Read the announcement online. Codesake::Dawn makes security code review fun for ruby developers, it scans 142 CVE bulletins and future release will be able to scan custom ruby code for XSS, SQL Injections and business logic flaws. It supports Sinatra, Padrino and Ruby on Rails MVC framework out of the box.
122
+
123
+ https://twitter.com/rubygems/status/427066100367777792
124
+
125
+ $ gem install codesake-dawn
126
+ $ have fun
127
+
128
+ ### version 1.0.0
129
+ @dawnscanner version 1.0.0 is out. Read the announcement online. Codesake::Dawn makes security code review fun for ruby developers, it scans 142 CVE bulletins and future release will be able to scan custom ruby code for XSS, SQL Injections and business logic flaws. It supports Sinatra, Padrino and Ruby on Rails MVC framework out of the box.
130
+
131
+ $ gem install codesake-dawn
132
+ $ have fun
133
+
134
+ ## HN Link
135
+ https://news.ycombinator.com/item?id=7094470
136
+ ## Reddit
137
+ http://www.reddit.com/r/security/comments/1vr4ur/ann_codesakedawn_v100_released/
138
+ http://www.reddit.com/r/ruby/comments/1vr4u0/ann_codesakedawn_v100_released/
139
+
@@ -0,0 +1,67 @@
1
+ ## Press announcement
2
+
3
+ The April 4th 2013, the first Codesake::Dawn import in Github happened. After
4
+ 1 year and three months later than the first major released, I'm happy to
5
+ annonunce Codesake::Dawn 1.1.0, codename Lightning McQueen
6
+
7
+ Codesake::Dawn is a source code scanner designed to review your code for
8
+ security issues.
9
+
10
+ Codesake::Dawn is able to scan your ruby standalone programs but its main usage
11
+ is to deal with web applications. It supports applications written using majors
12
+ MVC (Model View Controller) frameworks, like:
13
+
14
+ * [Ruby on Rails](http://rubyonrails.org)
15
+ * [Sinatra](http://www.sinatrarb.com)
16
+ * [Padrino](http://www.padrinorb.com)
17
+
18
+ Codesake::Dawn version 1.1 has 171 security checks loaded in its knowledge
19
+ base. Most of them are CVE bulletins applying to gems or the ruby interpreter
20
+ itself. There are also some check coming from Owasp Ruby on Rails cheatsheet.
21
+
22
+ Writing safe code it's important, but sometimes security issues are introduced
23
+ by third party code your application relies on. As example, consider a SQL
24
+ Injection vulnerability introduced by Ruby on Rails framework.
25
+
26
+ Despite the effort you spend in sanitizing inputs, your web application
27
+ inherits the vulnerability suffering as well. An attacker can easily exploit it
28
+ and break into your database unless you upgrade the offended gem.
29
+
30
+ There is a comprehensive set of command line flags you can read more by issuing
31
+ ```dawn --list-knowledge-base``` flag or by reading [project
32
+ README](https://github.com/codesake/codesake-dawn/raw/master/README.md) file.
33
+
34
+ The list of security checks included in version 1.1.0 can be found online at:
35
+ [http://dawn.codesake.com/knowledge-base](http://dawn.codesake.com/knowledge-base).
36
+
37
+ You can use [facilities provided by
38
+ github](https://github.com/codesake/codesake-dawn/issues) to submit bug
39
+ reports, product enhancements, new security checks you want to me to add in
40
+ future releases and even success stories.
41
+
42
+ Now it's time for you to install Codesake::Dawn version 1.1.0 with the
43
+ following command and start reviewing your code for security issues:
44
+
45
+ ```
46
+ $ gem install codesake-dawn
47
+ ```
48
+
49
+ You can find the announcement on the web here: [http://dawn.codesake.com/blog/announce-codesake-dawn-v1-1-0-released/](http://dawn.codesake.com/blog/announce-codesake-dawn-v1-1-0-released/)
50
+ Enjoy it!
51
+ Paolo - paolo@codesake.com
52
+
53
+ ## Twitter announcement
54
+
55
+ ### version 1.1.0
56
+ @dawnscanner version 1.1.0 is out. 171 security checks. Improved output and more. Read the announcement: http://dawn.codesake.com/blog/announce-codesake-dawn-v1-1-0-released/ #ruby #rails #sinatra #padrina #security #scanner
57
+
58
+ ## Linkedin announcement
59
+
60
+ ### version 1.0.0
61
+ @dawnscanner version 1.1.0 is out. Read the announcement online. Codesake::Dawn makes security code review fun for ruby developers, it scans 171 CVE bulletins and future release will be able to scan custom ruby code for XSS, SQL Injections and business logic flaws. It supports Sinatra, Padrino and Ruby on Rails MVC frameworks out of the box.
62
+
63
+ $ gem install codesake-dawn
64
+ $ have fun
65
+
66
+ ## HN Link
67
+ ## Reddit
@@ -0,0 +1,69 @@
1
+ ## Press announcement
2
+
3
+ Today, the XXX ?nd 2014, the second minor Codesake::Dawn rubygem version it has
4
+ been released.
5
+ This will be the last release of the codesake-dawn gem with this name. Starting
6
+ form November, 7th we will rename the gem to just dawn.
7
+
8
+ Codesake::Dawn is a source code scanner designed to review your code for
9
+ security issues.
10
+
11
+ Codesake::Dawn is able to scan your ruby standalone programs but its main usage
12
+ is to deal with web applications. It supports applications written using majors
13
+ MVC (Model View Controller) frameworks, like:
14
+
15
+ * [Ruby on Rails](http://rubyonrails.org)
16
+ * [Sinatra](http://www.sinatrarb.com)
17
+ * [Padrino](http://www.padrinorb.com)
18
+
19
+ Codesake::Dawn version 1.2 has 180 security checks loaded in its knowledge
20
+ base. Most of them are CVE or OSVDB bulletins applying to gems or the ruby
21
+ interpreter itself. There are also some check coming from Owasp Ruby on Rails
22
+ cheatsheet.
23
+
24
+ Writing safe code it's important, but sometimes security issues are introduced
25
+ by third party code your application relies on. As example, consider a SQL
26
+ Injection vulnerability introduced by Ruby on Rails framework.
27
+
28
+ Despite the effort you spend in sanitizing inputs, your web application
29
+ inherits the vulnerability suffering as well. An attacker can easily exploit it
30
+ and break into your database unless you upgrade the offended gem.
31
+
32
+ There is a comprehensive set of command line flags you can read more by issuing
33
+ ```dawn --list-knowledge-base``` flag or by reading [project
34
+ README](https://github.com/codesake/codesake-dawn/raw/master/README.md) file.
35
+
36
+ The list of security checks included in version 1.2.0 can be found online at:
37
+ [http://dawn.codesake.com/knowledge-base](http://dawn.codesake.com/knowledge-base).
38
+
39
+ You can use [facilities provided by
40
+ github](https://github.com/codesake/codesake-dawn/issues) to submit bug
41
+ reports, product enhancements, new security checks you want to me to add in
42
+ future releases and even success stories.
43
+
44
+ Now it's time for you to install Codesake::Dawn version 1.2.0 with the
45
+ following command and start reviewing your code for security issues:
46
+
47
+ ```
48
+ $ gem install -P MediumSecurity codesake-dawn
49
+ ```
50
+
51
+ You can find the announcement on the web here: [http://dawn.codesake.com/blog/announce-codesake-dawn-v1-2-0-released/](http://dawn.codesake.com/blog/announce-codesake-dawn-v1-2-0-released/)
52
+ Enjoy it!
53
+ Paolo - paolo@codesake.com
54
+
55
+ ## Twitter announcement
56
+
57
+ ### version 1.2.0
58
+ @dawnscanner version 1.2.0 is out. 180 security checks and some bug fixes. Read the announcement: http://dawn.codesake.com/blog/announce-codesake-dawn-v1-2-0-released/ #ruby #rails #sinatra #padrina #security #scanner
59
+
60
+ ## Linkedin announcement
61
+
62
+ ### version 1.2.0
63
+ @dawnscanner version 1.2.0 is out. Read the announcement online. Codesake::Dawn makes security code review fun for ruby developers, it scans 180 CVE and OSVDB bulletins and future release will be able to scan custom ruby code for XSS, SQL Injections and business logic flaws. It supports Sinatra, Padrino and Ruby on Rails MVC frameworks out of the box.
64
+
65
+ $ gem install codesake-dawn
66
+ $ have fun
67
+
68
+ ## HN Link
69
+ ## Reddit
@@ -0,0 +1,21 @@
1
+ Feature: dawn complains on its command line when incomplete
2
+ When executed dawn needs a target to analyse
3
+
4
+ Scenario: dawn complains if you don't specify the target framework
5
+ When I run `bundle exec dawn`
6
+ Then the stderr should contain "missing target"
7
+
8
+ Scenario: dawn complains if you don't specify the target
9
+ When I run `bundle exec dawn -s`
10
+ Then the stderr should contain "missing target"
11
+
12
+ Scenario: dawn complains if the target doesn't exist
13
+ Given the generic project "/tmp/this_is_foo" doesn't exist
14
+ When I run `bundle exec dawn -s /tmp/this_is_foo`
15
+ Then the stderr should contain "invalid directory (/tmp/this_is_foo)"
16
+
17
+ Scenario: dawn complains if the target uses a different framework than the one specified
18
+ Given the hello world rails project does exist
19
+ When I run `bundle exec dawn -s /tmp/hello_world_3.2.13`
20
+ Then the stderr should contain "nothing to do on /tmp/hello_world_3.2.13"
21
+
@@ -0,0 +1,31 @@
1
+ Feature: dawn reports no security issues
2
+ When it scans a sinatra application that it is updated and it has no XSS
3
+
4
+ Scenario: dawn detects the sinatra version
5
+ Given a safe sinatra application exists
6
+ When I run `bundle exec dawn /tmp/sinatra-safe`
7
+ Then the stdout should contain "1.4.2"
8
+
9
+ Scenario: dawn tells there are no vulnerabilities
10
+ Given a safe sinatra application exists
11
+ When I run `bundle exec dawn /tmp/sinatra-safe`
12
+ Then the stdout should contain "no vulnerabilities found"
13
+
14
+ # Test for --output json
15
+ Scenario: dawn can give a brief json output as well
16
+ Given a safe sinatra application exists
17
+ When I run `bundle exec dawn -s /tmp/sinatra-safe --output json`
18
+ Then the stdout should contain "{\"status\":"OK",\"target\":"/tmp/sinatra-safe",\"mvc\":"sinatra",\"mvc_version\":"1.4.2",\"vulnerabilities_count\":0,\"vulnerabilities\":[],\"mitigated_vuln_count\":0,\"mitigated_vuln\":[],\"reflected_xss\":[]}"
19
+
20
+
21
+ # Tests for --count-only option
22
+ Scenario: dawn can give just the number of issues found as output
23
+ Given a safe sinatra application exists
24
+ When I run `bundle exec dawn --count-only -s /tmp/sinatra-safe`
25
+ Then the stdout should contain "0"
26
+
27
+ Scenario: dawn can give just the number of issues found as output
28
+ Given a safe sinatra application exists
29
+ When I run `bundle exec dawn --count-only -s /tmp/sinatra-safe --output json`
30
+ Then the stdout should contain "{\"status\":"OK",\"vulnerabilities_count\":0}"
31
+