For gems I use `bundler-audit`, see:
https://github.com/rubysec/bundler-audit
It checks for vulnerable versions of gems in `Gemfile.lock`, checks for insecure gem sources, allows ignoring certain advisories that have been manually worked around, prints advisory information and does not require a network connection.