Class: FiberAudit::Static::Rules::BlockingSubprocess
- Defined in:
- lib/fiber_audit/static/rules/blocking_subprocess.rb
Constant Summary collapse
- TARGETS =
{ 'Kernel' => %i[system exec spawn].freeze, 'Open3' => %i[capture2 capture2e capture3 pipeline].freeze, 'IO' => %i[popen].freeze, 'Process' => %i[waitall detach].freeze }.freeze
- BARE_KERNEL_METHODS =
%i[system exec spawn].freeze
- MESSAGE =
'Subprocess operation may block the thread running the fiber scheduler.'- REMEDIATION =
'Move long-running subprocess work outside the request path, or verify scheduler behaviour under load.'
Constants inherited from Base
FiberAudit::Static::Rules::Base::CONTEXT_CEILING
Instance Method Summary collapse
Methods inherited from Base
confidence, default_confidence, default_severity, description, id, #initialize, severity
Constructor Details
This class inherits a constructor from FiberAudit::Static::Rules::Base
Instance Method Details
#analyze(call_sites:) ⇒ Object
29 30 31 32 33 34 35 |
# File 'lib/fiber_audit/static/rules/blocking_subprocess.rb', line 29 def analyze(call_sites:) call_sites.filter_map do |site| next unless (match = match_call_site(site)) build_finding(site, match) end end |