This file is indexed.

/usr/lib/ruby/vendor_ruby/specinfra/backend/shell_script.rb is in ruby-specinfra 2.66.0-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
require 'singleton'

module Specinfra
  module Backend
    class ShellScript < Base
      def initialize(config = {})
        super

        @lines = [ "#!/bin/sh", "" ]
        ObjectSpace.define_finalizer(self, Writer.new(@lines))
      end

      def run_command(cmd, opts={})
        @lines << cmd
        CommandResult.new
      end

      class Writer
        def initialize(lines)
          @lines = lines
        end

        def call(*args)
          puts @lines
        end
      end
    end
  end
end