This file is indexed.

/usr/lib/ruby/vendor_ruby/serverspec/type/windows_firewall.rb is in ruby-serverspec 2.41.3-3.

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
module Serverspec::Type
  class WindowsFirewall < Base
    def exists?
      @runner.check_firewall_exists(@name)
    end

    def tcp?
      @runner.check_firewall_has_protocol(@name, 'TCP')
    end

    def has_localport?(port)
      @runner.check_firewall_has_localport(@name, port)
    end

    def inbound?
      @runner.check_firewall_has_direction(@name, 'Inbound')
    end

    def enabled?
      @runner.check_firewall_is_enabled(@name)
    end

    def allowed?
      @runner.check_firewall_has_action(@name, 'Allow')
    end

  end
end