Skip to content

Commit eb07c75

Browse files
committed
Patch Bundler::Audit::Scanner to prevent network access
`Bundler::Audit::Scanner` uses `Resolv` in Ruby's standard library to determine whether a source's host is internal. This is problematic during engine runs because we currently block network access in containers. This patches the scanner to always return `false` for `#internal_host?`.
1 parent d720dc0 commit eb07c75

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

lib/cc/engine/bundler_audit.rb

+9
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,12 @@ module BundlerAudit
1313
end
1414
end
1515
end
16+
17+
# Patch Bundler::Audit::Scanner to prevent network access during insecure
18+
# source checks
19+
20+
Bundler::Audit::Scanner.module_eval do
21+
def internal_host?(_uri)
22+
false
23+
end
24+
end

0 commit comments

Comments
 (0)