Class: Dependabot::NpmAndYarn::UpdateChecker::VulnerabilityAuditor
- Inherits:
-
Object
- Object
- Dependabot::NpmAndYarn::UpdateChecker::VulnerabilityAuditor
- Extended by:
- T::Sig
- Defined in:
- lib/dependabot/npm_and_yarn/update_checker/vulnerability_auditor.rb
Instance Method Summary collapse
- #audit(dependency:, security_advisories:) ⇒ Object
-
#initialize(dependency_files:, credentials:) ⇒ VulnerabilityAuditor
constructor
A new instance of VulnerabilityAuditor.
Constructor Details
#initialize(dependency_files:, credentials:) ⇒ VulnerabilityAuditor
Returns a new instance of VulnerabilityAuditor.
30 31 32 33 |
# File 'lib/dependabot/npm_and_yarn/update_checker/vulnerability_auditor.rb', line 30 def initialize(dependency_files:, credentials:) @dependency_files = dependency_files @credentials = credentials end |
Instance Method Details
#audit(dependency:, security_advisories:) ⇒ Object
63 64 65 66 67 68 69 70 71 72 73 74 75 |
# File 'lib/dependabot/npm_and_yarn/update_checker/vulnerability_auditor.rb', line 63 def audit(dependency:, security_advisories:) Dependabot.logger.info("VulnerabilityAuditor: starting audit") fix_unavailable = fix_unavailable_response(dependency) run_audit( dependency: dependency, security_advisories: security_advisories, fix_unavailable: fix_unavailable ) rescue SharedHelpers::HelperSubprocessFailed => e log_helper_subprocess_failure(dependency, e) T.must(fix_unavailable) end |