0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

【簡潔】Brakeman導入方法-Rails-

Posted at

###Brakeman導入方法
####Brakemanとは
Brakemanとはアプリケーションを開発した際にセキュリティ検査ができるgemの一つです。
Railsでは元からセキュリティについては比較的維持できるものですが、私が開発した際に補助的にこのようなツールを使ってみました。ちなみにBrakemanは静的なツールです。

####導入方法

作成中のプロジェクトのGemfile内のgroup :development doendの間にgem 'brakeman', require: falseを追記します。


group :development do
  gem 'brakeman', require: false
end

次にターミナルの作成中アプリのディレクトリでbrakemanと叩けばBrakemanでのセキュリティチェックが始まります。

 % brakeman

出力はこんな感じです。

== Brakeman Report ==

Application Path: /Users/UserName/FolderName/AppName
Rails Version: 5.2.4.2
Brakeman Version: 4.8.2
Scan Date: 0000-00-00 00:00:0 +0000
Duration: 0.290167 seconds
Checks Run: BasicAuth, BasicAuthTimingAttack, ContentTag, CookieSerialization, CreateWith, CrossSiteScripting, DefaultRoutes, Deserialize, DetailedExceptions, DigestDoS, DynamicFinders, EscapeFunction, Evaluation, Execute, FileAccess, FileDisclosure, FilterSkipping, ForgerySetting, HeaderDoS, I18nXSS, JRubyXML, JSONEncoding, JSONEntityEscape, JSONParsing, LinkTo, LinkToHref, MailTo, MassAssignment, MimeTypeDoS, ModelAttrAccessible, ModelAttributes, ModelSerialize, NestedAttributes, NestedAttributesBypass, NumberToCurrency, PageCachingCVE, PermitAttributes, QuoteTableName, Redirect, RegexDoS, Render, RenderDoS, RenderInline, ResponseSplitting, RouteDoS, SQL, SQLCVEs, SSLVerify, SafeBufferManipulation, SanitizeMethods, SelectTag, SelectVulnerability, Send, SendFile, SessionManipulation, SessionSettings, SimpleFormat, SingleQuotes, SkipBeforeFilter, SprocketsPathTraversal, StripTags, SymbolDoSCVE, TranslateBug, UnsafeReflection, ValidationRegex, WithoutProtection, XMLDoS, YAMLParsing

== Overview ==

Controllers: 2
Models: 3
Templates: 34
Errors: 0
Security Warnings: 0

== Warning Types ==


No warnings found


セキュリティチェック完了です。

この記事を読んでいただきありがとうございました。

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?