Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,6 @@ matrix:
- AFFECTED_DIRS="www"
- secure: "jdzXUhP1o7RkfSikZLKgUcCIaKqLjqWa35dnxWnz7qAQ2draRKa7I7cXmUv76BZkW8HBUUH11dOi8YOVxPYPOzaqvcTCfqNqGVxsT9epgWa7rA8aXMXkECp548ry1rYJQpti9zpwsoe2GQyNPr9vNiWMiyj51CaABmZ6JzmFEEqlZc8vqpqWeqJvIqaibQGk7ByLKmi4R44fVwFKIG39RuxV+alc/G4nnQ2zmNTFuy8uFGs5EghQvRytzWY+s2AKtDiZ0YXYOII1Nl1unXNnNoQt9oI209ztlSm1+XOuTPelW6bEIx5i7OZFaSRPgJzWnkGN85C9nBE08L2az9Jz18/rYJF4fdVRttdGskueyYI21lh1FwlAg51ZG0RfLTYk2Pq+k4c+NO1cfmGcaXBwihfD5BWqrILU5HHkYszXCSmgl4hscC7/BS4Kgcq2z32JJwV8B+x4XngM0G4uzIn1Soia3lZXEKdnfVsxFDdMQ7FK60F3uQlq/44LRkZujRhqfAKOiz+0tsLexWzj7wK+DJY9Y00CUfh7xcxRxDxFNpOv1FWYFB9lUlaOt3HDHgUoksqbURiUzhOZZzTE/1MAtF2K6mbpME5CbN08J88L5JBlb+CX79XCzj30lNMeS0I/dCRQEmkygr2eJYxvRO2qsBNuphs4SWk8NZyS/llVZFI="

notifications:
slack:
secure: zwOu1gWt8wBDzlhXrYJ39jBDYTYj4Zb8/Z5XH6PalFOyYBytOLYqmpPzxw5KTzFapmcxYt1/biViX25+zapSSmDBuDa94ZneaXuCZAPXX0UJb82ORALMDsdbV1TkkS4Q6N4soigLJ5UaJwIgkZze9VtXeUvo3g8L8+mDYX4J0Poi7Kf/f1KZycNhgaVs7N/i2AI3lBeiVJv+giQbA99OR5dxPzkbx1BeZCK+W+YEPFmg1xycAItiHq0unT+kBN4pm9gW8TT1s/ZucUsKVu6Q8inw5N0PjZwboOkqsQFi5BweVicZBcbOVsW3Xs/f8DX2G823y73Al3QQg+ENxnIpizsHfjE+YzXUVsZ7v/UdsOq01Khxz1GK/X/PYrvIdHQKBwZ86RPJP61BvGIaQ4Hy6f9z+o2Tl/EaAmiOMScpdFi7sMskm8xknI0G24ZG5hkd7XNQ1eVvu33dvs+u12DsBGIylnwrppMDGnh022I5Hg8pS9tJ9gAsJlSFoIBn/yOryoFYb4avB8ujvN6+8cbZgkQ41k6ydqCHk2DxWmhsM4dUVXqC36sOePDE8a/DK5uQ057DSai5M+go5LeEJyK5r4fT5nbTk3nW6CGH0k2bPGWH5aP22mSKB9r2alDzqVfVyArfgtBIX2OXS/cZLER26a1EcB4mf3PMPDB06Aekyj0=
on_success: change
on_failure: always
on_pull_requests: false

deploy:
provider: rubygems
on:
Expand Down
1 change: 1 addition & 0 deletions lib/bundles/inspec-habitat/profile.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ def self.upload(path, options = {})
def initialize(path, options = {})
@path = path
@options = options
@cli_config = nil

log_level = options.fetch('log_level', 'info')
Habitat::Log.level(log_level.to_sym)
Expand Down
3 changes: 3 additions & 0 deletions lib/inspec/profile.rb
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,9 @@ def initialize(source_reader, options = {})
@runner_context =
options[:profile_context] ||
Inspec::ProfileContext.for_profile(self, @backend, @attr_values)

@supports_platform = metadata.supports_platform?(@backend)
@supports_runtime = metadata.supports_runtime?
end

def name
Expand Down
1 change: 1 addition & 0 deletions lib/inspec/profile_context.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ def initialize(profile_id, backend, conf)
# in the transitive dependency tree of the loaded profile.
@resource_registry = Inspec::Resource.new_registry
@library_eval_context = Inspec::LibraryEvalContext.create(@resource_registry, @require_loader)
@current_load = nil
end

def dependencies
Expand Down
2 changes: 0 additions & 2 deletions lib/resources/azure/azure_virtual_machine_data_disk.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ class AzureVirtualMachineDataDisk < AzureResourceBase
filter = FilterTable.create
filter.add_accessor(:where)
.add_accessor(:entries)
.add_accessor(:has_data_disks?)
.add_accessor(:count)
.add(:exists?) { |x| !x.entries.empty? }
.add(:disk, field: :disk)
.add(:number, field: :number)
Expand Down
2 changes: 2 additions & 0 deletions lib/resources/http.rb
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ def initialize(http_method, url, opts)
@http_method = http_method
@url = url
@opts = opts
@response = nil
end

private
Expand Down Expand Up @@ -152,6 +153,7 @@ def initialize(inspec, http_method, url, opts)
'curl is not available on the target machine'
end

@ran_curl = false
@inspec = inspec
super(http_method, url, opts)
end
Expand Down
2 changes: 1 addition & 1 deletion lib/resources/nginx.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def initialize(nginx_path = '/usr/sbin/nginx')
read_content
end

%w{compiler_info error_log_path http_client_body_temp_path http_fastcgi_temp_path http_log_path http_proxy_temp_path http_scgi_temp_path http_uwsgi_temp_path lock_path modules_path openssl_version prefix sbin_path service support_info version}.each do |property|
%w{error_log_path http_client_body_temp_path http_fastcgi_temp_path http_log_path http_proxy_temp_path http_scgi_temp_path http_uwsgi_temp_path lock_path modules_path prefix sbin_path service version}.each do |property|
define_method(property.to_sym) do
@params[property.to_sym]
end
Expand Down
1 change: 0 additions & 1 deletion lib/resources/os_env.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ class OsEnv < Inspec.resource(1)
end
"

attr_reader :content
def initialize(env = nil)
@osenv = env
end
Expand Down
1 change: 1 addition & 0 deletions lib/utils/filter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ class Factory
def initialize
@accessors = []
@connectors = {}
@resource = nil
end

def connect(resource, table_accessor) # rubocop:disable Metrics/AbcSize
Expand Down
2 changes: 1 addition & 1 deletion test/unit/reporters/cli_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ def windowize(string)
it 'confirm controls' do
result = report.send(:anonymous_controls_from_profile, profile)
result.count.must_equal 3
result.first[:id].must_match /generated/
result.first[:id].must_match(/generated/)
end
end

Expand Down
3 changes: 0 additions & 3 deletions test/unit/resources/aws_s3_bucket_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -163,9 +163,6 @@ def test_be_public_auth_acl
def test_be_public_private_acl
refute(AwsS3Bucket.new('private').public?)
end
def test_be_public_public_acl
assert(AwsS3Bucket.new('public').public?)
end

def test_has_access_logging_enabled_positive
assert(AwsS3Bucket.new('public').has_access_logging_enabled?)
Expand Down