Remove any "All Rights Reserved" references (#1969)

* Remove any "All Rights Reserved" references

InSpec is licensed and released under the Apache 2.0 license. This
change removes all reference to legacy code files that still had
any Copyright or License lines referring to "All Rights Reserved".

Signed-off-by: Adam Leff <adam@leff.co>

* fix functional tests

Signed-off-by: Christoph Hartmann <chris@lollyrock.com>
This commit is contained in:
Adam Leff 2017-06-28 07:14:19 -04:00 committed by Christoph Hartmann
parent cc6f1e90ca
commit a6582bea9b
76 changed files with 24 additions and 78 deletions

View file

@ -1,6 +1,6 @@
#!/usr/bin/env ruby
# encoding: utf-8
# Copyright 2015 Dominik Richter. All rights reserved.
# Copyright 2015 Dominik Richter
# author: Dominik Richter
# author: Christoph Hartmann

View file

@ -1,6 +1,5 @@
# encoding: utf-8
# copyright: 2016, Chef Software, Inc.
# license: All rights reserved
# manipulate controls of `profile`
include_controls 'profile' do

View file

@ -1,6 +1,5 @@
# encoding: utf-8
# copyright: 2015, The Authors
# license: All rights reserved
# import full profile
include_controls 'dev-sec/ssh-baseline'

View file

@ -1,6 +1,5 @@
# encoding: utf-8
# copyright: 2015, Chef Software, Inc.
# license: All rights reserved
title '/tmp profile'

View file

@ -1,6 +1,5 @@
# encoding: utf-8
# copyright: 2016, Chef Software, Inc.
# license: All rights reserved
title 'Gordon Config Checks'

View file

@ -1,6 +1,5 @@
# encoding: utf-8
# copyright: 2015, The Authors
# license: All rights reserved
title 'sample section'

View file

@ -1,6 +1,5 @@
# encoding: utf-8
# copyright: 2015, Dominik Richter
# license: All rights reserved
# author: Dominik Richter
# author: Christoph Hartmann

View file

@ -1,6 +1,5 @@
# encoding: utf-8
# copyright: 2015, Dominik Richter
# license: All rights reserved
# author: Dominik Richter
# author: Christoph Hartmann

View file

@ -1,6 +1,6 @@
#!/usr/bin/env ruby
# encoding: utf-8
# Copyright 2015 Dominik Richter. All rights reserved.
# Copyright 2015 Dominik Richter
# author: Dominik Richter
# author: Christoph Hartmann

View file

@ -1,5 +1,5 @@
# encoding: utf-8
# Copyright 2015 Dominik Richter. All rights reserved.
# Copyright 2015 Dominik Richter
# author: Dominik Richter
# author: Christoph Hartmann

View file

@ -2,7 +2,6 @@
# copyright: 2016, Chef Software Inc.
# author: Dominik Richter
# author: Christoph Hartmann
# license: All rights reserved
class Struct
unless instance_methods.include? :to_h

View file

@ -1,5 +1,5 @@
# encoding: utf-8
# Copyright 2015 Dominik Richter. All rights reserved.
# Copyright 2015 Dominik Richter
# author: Dominik Richter
# author: Christoph Hartmann

View file

@ -1,6 +1,5 @@
# encoding: utf-8
# copyright: 2015, Vulcano Security GmbH
# license: All rights reserved
# author: Dominik Richter
# author: Christoph Hartmann
require 'inspec/plugins'

View file

@ -1,6 +1,5 @@
# encoding: utf-8
# copyright: 2015, Dominik Richter
# license: All rights reserved
# author: Dominik Richter
# author: Christoph Hartmann

View file

@ -1,6 +1,5 @@
# encoding: utf-8
# copyright: 2015, Dominik Richter
# license: All rights reserved
# author: Dominik Richter
# author: Christoph Hartmann

View file

@ -2,7 +2,6 @@
# copyright: 2015, Vulcano Security GmbH
# author: Dominik Richter
# author: Christoph Hartmann
# license: All rights reserved
RSpec::Matchers.define :be_readable do
match do |file|

View file

@ -2,7 +2,6 @@
# copyright: 2015, Vulcano Security GmbH
# author: Christoph Hartmann
# author: Dominik Richter
# license: All rights reserved
module Inspec::Resources
class Apache < Inspec.resource(1)

View file

@ -2,7 +2,6 @@
# copyright: 2015, Vulcano Security GmbH
# author: Dominik Richter
# author: Christoph Hartmann
# license: All rights reserved
require 'utils/simpleconfig'
require 'utils/find_files'

View file

@ -2,7 +2,6 @@
# copyright: 2015, Vulcano Security GmbH
# author: Christoph Hartmann
# author: Dominik Richter
# license: All rights reserved
# Advanced Auditing:
# As soon as you start applying Advanced Audit Configuration Policy, legacy policies will be completely ignored.

View file

@ -2,7 +2,6 @@
# copyright: 2015, Vulcano Security GmbH
# author: Christoph Hartmann
# author: Dominik Richter
# license: All rights reserved
require 'utils/simpleconfig'

View file

@ -2,7 +2,6 @@
# copyright: 2015, Vulcano Security GmbH
# author: Christoph Hartmann
# author: Dominik Richter
# license: All rights reserved
require 'forwardable'
require 'utils/filter_array'

View file

@ -2,7 +2,6 @@
# copyright: 2015, Vulcano Security GmbH
# author: Dominik Richter
# author: Christoph Hartmann
# license: All rights reserved
module Inspec::Resources
class Cmd < Inspec.resource(1)

View file

@ -2,7 +2,6 @@
# copyright: 2015, Vulcano Security GmbH
# author: Christoph Hartmann
# author: Dominik Richter
# license: All rights reserved
# The file format consists of
# - group name

View file

@ -2,7 +2,6 @@
# copyright: 2015, Vulcano Security GmbH
# author: Dominik Richter
# author: Christoph Hartmann
# license: All rights reserved
require 'shellwords'

View file

@ -1,6 +1,5 @@
# encoding: utf-8
# author: Thomas Cate
# license: All rights reserved
require 'utils/simpleconfig'

View file

@ -2,7 +2,6 @@
# copyright: 2015, Vulcano Security GmbH
# author: Christoph Hartmann
# author: Dominik Richter
# license: All rights reserved
require 'utils/simpleconfig'

View file

@ -1,7 +1,6 @@
# encoding: utf-8
# author: Christoph Hartmann
# author: Dominik Richter
# license: All rights reserved
module Inspec::Resources
class KernelModule < Inspec.resource(1)

View file

@ -1,6 +1,5 @@
# encoding: utf-8
# author: Christoph Hartmann
# license: All rights reserved
module Inspec::Resources
class KernelParameter < Inspec.resource(1)

View file

@ -2,7 +2,6 @@
# copyright: 2015, Vulcano Security GmbH
# author: Christoph Hartmann
# author: Dominik Richter
# license: All rights reserved
require 'utils/simpleconfig'

View file

@ -2,7 +2,6 @@
# copyright: 2015, Vulcano Security GmbH
# author: Christoph Hartmann
# author: Dominik Richter
# license: All rights reserved
require 'utils/simpleconfig'

View file

@ -2,7 +2,6 @@
# copyright: 2015, Vulcano Security GmbH
# author: Dominik Richter
# author: Christoph Hartmann
# license: All rights reserved
module Inspec::Resources
class Mysql < Inspec.resource(1)

View file

@ -1,7 +1,6 @@
# encoding: utf-8
# copyright: 2015, Vulcano Security GmbH
# author: Dominik Richter
# license: All rights reserved
require 'utils/simpleconfig'
require 'utils/find_files'

View file

@ -3,7 +3,6 @@
# author: Dominik Richter
# author: Christoph Hartmann
# author: Aaron Lippold
# license: All rights reserved
module Inspec::Resources
class MysqlSession < Inspec.resource(1)

View file

@ -2,7 +2,6 @@
# copyright: 2015, Vulcano Security GmbH
# author: Christoph Hartmann
# author: Dominik Richter
# license: All rights reserved
require 'utils/simpleconfig'

View file

@ -1,6 +1,5 @@
# encoding: utf-8
# author: Nolan Davidson
# license: All rights reserved
module Inspec::Resources
class OracledbSession < Inspec.resource(1)

View file

@ -2,7 +2,6 @@
# copyright: 2015, Vulcano Security GmbH
# author: Christoph Hartmann
# author: Dominik Richter
# license: All rights reserved
# Usage:
#

View file

@ -2,7 +2,6 @@
# copyright: 2017, Chef Software, Inc. <legal@chef.io>
# author: Joshua Timberman
# author: Alex Pop
# license: All rights reserved
require 'utils/filter'

View file

@ -2,7 +2,6 @@
# copyright: 2015, Vulcano Security GmbH
# author: Dominik Richter
# author: Christoph Hartmann
# license: All rights reserved
# Usage example:
#

View file

@ -2,7 +2,6 @@
# copyright: 2015, Vulcano Security GmbH
# author: Christoph Hartmann
# author: Dominik Richter
# license: All rights reserved
# The file format consists of
# - username

View file

@ -3,7 +3,6 @@
# author: Dominik Richter
# author: Christoph Hartmann
# author: Aaron Lippold
# license: All rights reserved
module Inspec::Resources
class Postgres < Inspec.resource(1)

View file

@ -3,7 +3,6 @@
# author: Dominik Richter
# author: Christoph Hartmann
# author: Aaron Lippold
# license: All rights reserved
require 'utils/simpleconfig'
require 'utils/find_files'

View file

@ -3,7 +3,6 @@
# author: Dominik Richter
# author: Christoph Hartmann
# author: Aaron Lippold
# license: All rights reserved
module Inspec::Resources
class Lines

View file

@ -2,7 +2,6 @@
# copyright: 2015, Vulcano Security GmbH
# author: Christoph Hartmann
# author: Dominik Richter
# license: All rights reserved
module Inspec::Resources
class PowershellScript < Cmd

View file

@ -2,7 +2,6 @@
# copyright: 2015, Vulcano Security GmbH
# author: Dominik Richter
# author: Christoph Hartmann
# license: All rights reserved
require 'utils/filter'

View file

@ -1,7 +1,6 @@
# encoding: utf-8
# copyright: 2015, Vulcano Security GmbH
# author: Christoph Hartmann
# license: All rights reserved
require 'json'

View file

@ -2,7 +2,7 @@
# author: Christoph Hartmann
# author: Dominik Richter
# author: Stephan Renatus
# license: All rights reserved
require 'hashie'
module Inspec::Resources

View file

@ -2,7 +2,6 @@
# copyright: 2015, Vulcano Security GmbH
# author: Dominik Richter
# author: Christoph Hartmann
# license: All rights reserved
require 'utils/simpleconfig'

View file

@ -1,6 +1,5 @@
# encoding: utf-8
# copyright: 2015, Chef Software Inc.
# license: All rights reserved
# author: Dominik Richter
# author: Christoph Hartmann

View file

@ -1,6 +1,5 @@
# encoding: utf-8
# copyright: 2015, Chef Software, Inc.
# license: All rights reserved
# author: Stephan Renatus
class FilterArray

View file

@ -1,6 +1,5 @@
# encoding: utf-8
# copyright: 2015, Vulcano Security GmbH
# license: All rights reserved
# author: Dominik Richter
# author: Christoph Hartmann

View file

@ -1,6 +1,5 @@
# encoding: utf-8
# copyright: 2015, Dominik Richter
# license: All rights reserved
# author: Dominik Richter
# author: Christoph Hartmann

View file

@ -26,7 +26,7 @@ task :spdx do
require 'net/http'
json_data = JSON.parse(Net::HTTP.get(URI('https://raw.githubusercontent.com/spdx/license-list-data/master/json/licenses.json')))
licenses = json_data['licenses'].map { |l| l['licenseId'] }
# "All Rights Reserved" is non-standard extra value to cover proriatary license
# "All Rights Reserved" is non-standard extra value to cover proprietary license
licenses.push('All Rights Reserved')
File.write(File.join(UTILS_DIR, 'spdx.txt'), licenses.join("\n"))
end

View file

@ -58,7 +58,7 @@ describe 'inspec exec with json formatter' do
"license" => "Apache-2.0",
"summary" => "Demonstrates the use of InSpec Compliance Profile",
"version" => "1.0.0",
"sha256" => "821f866e407a91cfadb44af5d4570b92ac7f7a272025da7aa9a92aa635cc4440",
"sha256" => "8eed5154c9fa0174067ab475c0ad4a053f772590d129eb324101fe43ef30794d",
"supports" => [{"os-family" => "unix"}],
"attributes" => []
})
@ -93,7 +93,7 @@ describe 'inspec exec with json formatter' do
src = actual.delete('source_location')
src['ref'].must_match %r{examples/profile/controls/example.rb$}
src['line'].must_equal 8
src['line'].must_equal 7
result = actual.delete('results')[0]
result.wont_be :nil?

View file

@ -68,7 +68,7 @@ describe 'inspec json' do
it 'has a source location' do
loc = File.join(example_profile, '/controls/example.rb')
control['source_location']['ref'].must_equal loc
control['source_location']['line'].must_equal 8
control['source_location']['line'].must_equal 7
end
it 'has a the source code' do

View file

@ -1,6 +1,5 @@
# encoding: utf-8
# copyright: 2015, Chef Software, Inc
# license: All rights reserved
title 'Proc Filesystem Configuration'

View file

@ -3,7 +3,7 @@ title: complete example profile
maintainer: Chef Software, Inc.
copyright: Chef Software, Inc.
copyright_email: support@chef.io
license: Proprietary, All rights reserved
license: Apache-2.0
summary: Testing stub
version: 1.0.0
license: Apache-2.0

View file

@ -1,6 +1,5 @@
# encoding: utf-8
# copyright: 2015, The Authors
# license: All rights reserved
title 'sample section'
include_controls 'profile_c'

View file

@ -3,7 +3,7 @@ title: InSpec Profile
maintainer: The Authors
copyright: The Authors
copyright_email: you@example.com
license: All Rights Reserved
license: Apache-2.0
summary: An InSpec Compliance Profile
version: 0.1.0
depends:

View file

@ -1,6 +1,5 @@
# encoding: utf-8
# copyright: 2015, The Authors
# license: All rights reserved
title 'sample section'
include_controls 'profile_d'

View file

@ -3,7 +3,7 @@ title: InSpec Profile
maintainer: The Authors
copyright: The Authors
copyright_email: you@example.com
license: All Rights Reserved
license: Apache-2.0
summary: An InSpec Compliance Profile
version: 0.1.0
depends:

View file

@ -3,6 +3,6 @@ title: InSpec Profile
maintainer: The Authors
copyright: The Authors
copyright_email: you@example.com
license: All Rights Reserved
license: Apache-2.0
summary: An InSpec Compliance Profile
version: 0.1.0

View file

@ -3,6 +3,6 @@ title: InSpec Profile
maintainer: The Authors
copyright: The Authors
copyright_email: you@example.com
license: All Rights Reserved
license: Apache-2.0
summary: An InSpec Compliance Profile
version: 0.1.0

View file

@ -1,6 +1,6 @@
# encoding: utf-8
# copyright: 2015, The Authors
# license: All rights reserved
require_resource(profile: 'profile_c', resource: 'gordon_config', as: 'gordy_config')
describe gordy_config do

View file

@ -3,7 +3,7 @@ title: InSpec Profile
maintainer: The Authors
copyright: The Authors
copyright_email: you@example.com
license: All Rights Reserved
license: Apache-2.0
summary: An InSpec Compliance Profile
version: 0.1.0
depends:

View file

@ -1,6 +1,5 @@
# encoding: utf-8
# copyright: 2015, Chef Software, Inc.
# license: All rights reserved
title 'failures /tmp profile'

View file

@ -3,6 +3,6 @@ title: InSpec Profile
maintainer: The Authors
copyright: The Authors
copyright_email: you@example.com
license: All Rights Reserved
license: Apache-2.0
summary: An InSpec Compliance Profile
version: 0.1.0

View file

@ -1,6 +1,5 @@
# encoding: utf-8
# copyright: 2015, Chef Software, Inc
# license: All rights reserved
describe gordon do
it { should be_enabled }

View file

@ -3,7 +3,7 @@ title: complete example profile
maintainer: Chef Software, Inc.
copyright: Chef Software, Inc.
copyright_email: support@chef.io
license: Proprietary, All rights reserved
license: Apache-2.0
summary: Testing stub
version: 1.0.0
supports:

View file

@ -3,6 +3,6 @@ title: InSpec Profile
maintainer: The Authors
copyright: The Authors
copyright_email: you@example.com
license: All Rights Reserved
license: Apache-2.0
summary: An InSpec Compliance Profile
version: 0.1.0

View file

@ -1,5 +1,4 @@
# encoding: utf-8
# copyright: 2015, The Authors
# license: All rights reserved
include_controls 'windows-only'

View file

@ -3,7 +3,7 @@ title: InSpec Profile
maintainer: The Authors
copyright: The Authors
copyright_email: you@example.com
license: All Rights Reserved
license: Apache-2.0
summary: An InSpec Compliance Profile
version: 0.1.0
depends:

View file

@ -1,6 +1,5 @@
# encoding: utf-8
# copyright: 2015, The Authors
# license: All rights reserved
title 'sample section'

View file

@ -3,7 +3,7 @@ title: InSpec Profile
maintainer: The Authors
copyright: The Authors
copyright_email: you@example.com
license: All Rights Reserved
license: Apache-2.0
summary: An InSpec Compliance Profile
and this is
bad metadata because

View file

@ -1,6 +1,5 @@
# encoding: utf-8
# copyright: 2015, The Authors
# license: All rights reserved
control 'dhcp-disabled' do
title 'DHCP is disabled'

View file

@ -3,7 +3,7 @@ title: InSpec Profile
maintainer: The Authors
copyright: The Authors
copyright_email: you@example.com
license: All Rights Reserved
license: Apache-2.0
summary: An InSpec Compliance Profile
version: 0.1.0
supports:

View file

@ -70,14 +70,14 @@ describe Inspec::Profile do
end
it 'works on a complete profile' do
MockLoader.load_profile('complete-profile').sha256.must_equal 'f9dbfad594ff9eff2209c8a791a1a88a0330f3d3800395e56acf981e4cc5e236'
MockLoader.load_profile('complete-profile').sha256.must_equal 'b3dc0ec4603499ca9613e34da4a9476266875b8361b16be9284b39d1beacddd3'
end
end
describe 'code info' do
let(:profile_id) { 'complete-profile' }
let(:code) { "control 'test01' do\n impact 0.5\n title 'Catchy title'\n desc '\n There should always be a /proc\n '\n describe file('/proc') do\n it { should be_mounted }\n end\nend\n" }
let(:loc) { {:ref=>"controls/filesystem_spec.rb", :line=>7} }
let(:loc) { {:ref=>"controls/filesystem_spec.rb", :line=>6} }
it 'gets code from an uncompressed profile' do
info = MockLoader.load_profile(profile_id).info