You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now the RubyBundleAuditAnalyzer does not support rbenv during initialization and it would be awesome if it could support it so that way version specific Ruby installs can be taken into account.
The following demonstrates that just executing the bundler-audit command can differ based on your rbenv config as documented here:
someuser@somepc:~$ cd ~
someuser@somepc:~$ rbenv global
2.6.3
someuser@somepc:~$ rbenv version
2.6.3 (set by /Users/someuser/.rbenv/version)
someuser@somepc:~$ bundler-audit
rbenv: bundler-audit: command not found
The `bundler-audit' command exists in these Ruby versions:
2.5.0
someuser@somepc:~$ cd ~/path/to/some/project/repo
someuser@somepc:~/path/to/some/project/repo$ cat .ruby-version
2.5.0
someuser@somepc:~/path/to/some/project/repo$ rbenv global
2.6.3
someuser@somepc:~/path/to/some/project/repo$ rbenv version
2.5.0 (set by /Users/someuser/path/to/some/project/repo/.ruby-version)
someuser@somepc:~/path/to/some/project/repo$ bundler-audit
Name: actionview
Version: 5.2.0
Advisory: CVE-2019-5419
Criticality: Unknown
URL: https://groups.google.com/forum/#!topic/rubyonrails-security/GN7w9fFAQeI
Title: Denial of Service Vulnerability in Action View
Solution: upgrade to >= 6.0.0.beta3, >= 5.2.2.1, ~> 5.2.2, >= 5.1.6.2, ~> 5.1.6, >= 5.0.7.2, ~> 5.0.7, >= 4.2.11.1, ~> 4.2.11
...
...
The above demonstrates that...
The global Ruby version is 2.6.3 as set by /Users/someuser/.rbenv/version
Running bundler-audit does not work because the gem is only installed (shimmed) for Ruby 2.5.0
Once we change our working directory to a directory that contains a .ruby-version file which specifies Ruby 2.5.0 we are able to successfully execute the bundler-audit command.
The main issue at hand here is that during the initialization phase the directory for the sub-process executed is set to a temporary directory. If bundler-audit is globally available the initialization works just fine and then during the analysis phase the rbenv specific version of bundler-audit because the working directory will be set to the directory of the Gemfile.lock file which is also the directory that the .ruby-version file lives.
The text was updated successfully, but these errors were encountered:
Right now the RubyBundleAuditAnalyzer does not support rbenv during initialization and it would be awesome if it could support it so that way version specific Ruby installs can be taken into account.
The following demonstrates that just executing the
bundler-audit
command can differ based on your rbenv config as documented here:The above demonstrates that...
/Users/someuser/.rbenv/version
bundler-audit
does not work because the gem is only installed (shimmed) for Ruby 2.5.0.ruby-version
file which specifies Ruby 2.5.0 we are able to successfully execute thebundler-audit
command.The main issue at hand here is that during the initialization phase the directory for the sub-process executed is set to a temporary directory. If
bundler-audit
is globally available the initialization works just fine and then during the analysis phase the rbenv specific version ofbundler-audit
because the working directory will be set to the directory of theGemfile.lock
file which is also the directory that the.ruby-version
file lives.The text was updated successfully, but these errors were encountered: