Checks for vulnerable versions of gems in Gemfile.lock.
Checks for insecure gem sources (http://).
Allows ignoring certain advisories that have been manually worked around.
Prints advisory information.
Does not require a network connection.
Installation
You can install it as a gem:
1
$ gem install bundler-audit
or add it into a Gemfile (Bundler):
1 2 3 4 5 6 7 8
# Gemfile
# Put gems used only for development or testing in the appropriate group in the Gemfile group :developmentdo # rubysec/bundler-audit: Patch-level verification for Bundler # https://github.com/rubysec/bundler-audit gem 'bundler-audit', '0.8.0' end
$ bundle-audit Name: actionpack Version: 3.2.10 Advisory: OSVDB-91452 Criticality: Medium URL: http://www.osvdb.org/show/osvdb/91452 Title: XSS vulnerability in sanitize_css in Action Pack Solution: upgrade to ~> 2.3.18, ~> 3.1.12, >= 3.2.13
Name: actionpack Version: 3.2.10 Advisory: OSVDB-91454 Criticality: Medium URL: http://osvdb.org/show/osvdb/91454 Title: XSS Vulnerability in the `sanitize` helper of Ruby on Rails Solution: upgrade to ~> 2.3.18, ~> 3.1.12, >= 3.2.13
Name: actionpack Version: 3.2.10 Advisory: OSVDB-89026 Criticality: High URL: http://osvdb.org/show/osvdb/89026 Title: Ruby on Rails params_parser.rb Action Pack Type Casting Parameter Parsing Remote Code Execution Solution: upgrade to ~> 2.3.15, ~> 3.0.19, ~> 3.1.10, >= 3.2.11
Name: activerecord Version: 3.2.10 Advisory: OSVDB-91453 Criticality: High URL: http://osvdb.org/show/osvdb/91453 Title: Symbol DoS vulnerability in Active Record Solution: upgrade to ~> 2.3.18, ~> 3.1.12, >= 3.2.13
Name: activerecord Version: 3.2.10 Advisory: OSVDB-90072 Criticality: Medium URL: http://direct.osvdb.org/show/osvdb/90072 Title: Ruby on Rails Active Record attr_protected Method Bypass Solution: upgrade to ~> 2.3.17, ~> 3.1.11, >= 3.2.12
Name: activerecord Version: 3.2.10 Advisory: OSVDB-89025 Criticality: High URL: http://osvdb.org/show/osvdb/89025 Title: Ruby on Rails Active Record JSON Parameter Parsing Query Bypass Solution: upgrade to ~> 2.3.16, ~> 3.0.19, ~> 3.1.10, >= 3.2.11
Name: activesupport Version: 3.2.10 Advisory: OSVDB-91451 Criticality: High URL: http://www.osvdb.org/show/osvdb/91451 Title: XML Parsing Vulnerability affecting JRuby users Solution: upgrade to ~> 3.1.12, >= 3.2.13
Unpatched versions found!
Update the ruby-advisory-db that bundle audit uses:
Bundler-audit provides Rake tasks for checking the code and for updating its vulnerability database:
1 2
rake bundle:audit rake bundle:audit:update
Configuration File
bundler-audit also supports a per-project configuration file:
1 2 3 4 5 6 7 8 9 10
.bundler-audit.yml:
--- ignore: - CVE-YYYY-XXXX - ... ignore: [Array<String>] - A list of advisory IDs to ignore. You can provide a path to a config file using the --config flag: $ bundle-audit check --config bundler-audit.custom.yaml