Skip to content

Commit

Permalink
Merge branch 'main' into support-azure-synapse-workspaces
Browse files Browse the repository at this point in the history
  • Loading branch information
sathish-progress authored Mar 10, 2022
2 parents 1cd7f2a + 98d9364 commit 7265c5e
Show file tree
Hide file tree
Showing 181 changed files with 1,031 additions and 97 deletions.
12 changes: 6 additions & 6 deletions .envrc-example
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export WORKSPACE=`whoami`
export ATTRIBUTES_FILE=.$WORKSPACE-attributes.yml
# export WORKSPACE=`whoami`
# export ATTRIBUTES_FILE=.$WORKSPACE-attributes.yml

export AZURE_SUBSCRIPTION_ID=
export AZURE_CLIENT_ID=
export AZURE_TENANT_ID=
export AZURE_CLIENT_SECRET=
# export AZURE_SUBSCRIPTION_ID="AZURE_SUBSCRIPTION_ID"
# export AZURE_CLIENT_ID="AZURE_CLIENT_ID"
# export AZURE_TENANT_ID="AZURE_TENANT_ID"
# export AZURE_CLIENT_SECRET="AZURE_CLIENT_SECRET"
9 changes: 7 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
# Changelog
<!-- latest_release 1.97.0 -->
<!-- latest_release 1.97.1 -->
## [v1.97.1](https://github.com/inspec/inspec-azure/tree/v1.97.1) (2022-03-02)

#### Merged Pull Requests
- Removes the unwanted warnings from the integration tests [#643](https://github.com/inspec/inspec-azure/pull/643) ([soumyo13](https://github.com/soumyo13))
<!-- latest_release -->

## [v1.97.0](https://github.com/inspec/inspec-azure/tree/v1.97.0) (2022-02-28)

#### Merged Pull Requests
- RESOURCE-139 Support adls paths [#485](https://github.com/inspec/inspec-azure/pull/485) ([sathish-progress](https://github.com/sathish-progress))
<!-- latest_release -->

## [v1.96.1](https://github.com/inspec/inspec-azure/tree/v1.96.1) (2022-02-25)

Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.97.0
1.97.1
2 changes: 1 addition & 1 deletion inspec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ copyright: Chef Software, Inc.
copyright_email: support@chef.io
license: Apache-2.0
summary: This resource pack provides compliance resources for Azure.
version: 1.97.0
version: 1.97.1
inspec_version: '>= 4.18.39'
supports:
- platform: azure
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
control 'azure_active_directory_domain_service' do

impact 1.0
title 'Testing the singular resource of azure_active_directory_domain_service.'
desc 'Testing the singular resource of azure_active_directory_domain_service.'

azure_active_directory_domain_services.ids.each do |domain_service_id|
describe azure_active_directory_domain_service(id: domain_service_id) do
it { should exist }
its('isVerified') { should eq true }
end
end

describe azure_active_directory_domain_service(id: 'dummy') do
it { should_not exist }
end
end
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
control 'azure_active_directory_domain_services' do

impact 1.0
title 'Testing the plural resource of azure_active_directory_domain_services.'
desc 'Testing the plural resource of azure_active_directory_domain_services.'

describe azure_active_directory_domain_services do
it { should exist }
end
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
directory_object = input(:sample_directory_object, value: '')

control 'azure active directory object' do

impact 1.0
title 'Testing the singular resource of azure_active_directory_object.'
desc 'Testing the singular resource of azure_active_directory_object.'

describe azure_active_directory_object(id: directory_object) do
it { should exist }
its('displayName') { should eq 'MyApps_AliBabaCloud' }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
directory_object = input(:sample_directory_object, value: '')

control 'azure active directory objects' do

impact 1.0
title 'Testing the plural resource of azure_active_directory_objects.'
desc 'Testing the plural resource of azure_active_directory_objects.'

describe azure_active_directory_objects do
it { should exist }
its('values') { should include directory_object }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
df_location = input('bastionHostLocation', value: nil)

control 'azure_bastion_hosts_resource' do

impact 1.0
title 'Testing the singular resource of azure_bastion_hosts_resource.'
desc 'Testing the singular resource of azure_bastion_hosts_resource.'

describe azure_bastion_hosts_resource(resource_group: resource_group, name: bastion_host_name) do
it { should exist }
its('name') { should eq bastion_host_name }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
df_location = input('bastionHostLocation', value: nil)

control 'azure_bastion_hosts_resources' do

impact 1.0
title 'Testing the plural resource of azure_bastion_hosts_resources.'
desc 'Testing the plural resource of azure_bastion_hosts_resources.'

describe azure_bastion_hosts_resources(resource_group: resource_group) do
it { should exist }
its('names') { should include bastion_host_name }
Expand Down
5 changes: 5 additions & 0 deletions test/integration/verify/controls/azure_container_group.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
container_group_name = input(:inspec_container_group_name, value: '')

control 'check container group properties' do

impact 1.0
title 'Testing the singular resource of azure_container_group.'
desc 'Testing the singular resource of azure_container_group.'

describe azure_container_group(resource_group: resource_group, name: container_group_name) do
it { should exist }
its('location') { should eq 'eastus' }
Expand Down
7 changes: 5 additions & 2 deletions test/integration/verify/controls/azure_container_groups.rb
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
control 'check container groups' do

impact 1.0
title 'Testing the plural resource of azure_container_groups.'
desc 'Testing the plural resource of azure_container_groups.'

describe azure_container_groups do
it { should exist }
its('types') { should include 'Microsoft.ContainerInstance/containerGroups' }
its('locations') { should include 'eastus' }
its('restart_policies') { should include 'OnFailure' }
its('os_types') { should include 'Linux' }
end
end

control 'check all container groups that have been provisioned' do
describe azure_container_groups.where(provisioning_state: 'Succeeded') do
it { should exist }
end
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
resource_group = attribute('resource_group', default: nil)
container_registry_name = attribute('container_registry_name', default: nil)
resource_group = attribute('resource_group', value: nil)
container_registry_name = attribute('container_registry_name', value: nil)

control 'azure_container_registries' do

impact 1.0
title 'Testing the plural resource of azure_container_registries.'
desc 'Testing the plural resource of azure_container_registries.'

describe azure_container_registries(resource_group: resource_group) do
it { should exist }
its('names') { should include container_registry_name }
Expand Down
8 changes: 6 additions & 2 deletions test/integration/verify/controls/azure_container_registry.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
resource_group = attribute('resource_group', default: nil)
container_registry_name = attribute('container_registry_name', default: nil)
resource_group = attribute('resource_group', value: nil)
container_registry_name = attribute('container_registry_name', value: nil)

control 'azure_container_registry' do

impact 1.0
title 'Testing the singular resource of azure_container_registry.'
desc 'Testing the singular resource of azure_container_registry.'

describe azure_container_registry(resource_group: resource_group, name: container_registry_name) do
it { should exist }
its('id') { should_not be_nil }
Expand Down
5 changes: 5 additions & 0 deletions test/integration/verify/controls/azure_data_factories.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
df_location = input('df_location', value: nil)

control 'azure_data_factories' do

impact 1.0
title 'Testing the plural resource of azure_data_factories.'
desc 'Testing the plural resource of azure_data_factories.'

describe azure_data_factories(resource_group: resource_group) do
it { should exist }
its('names') { should include factory_name }
Expand Down
4 changes: 4 additions & 0 deletions test/integration/verify/controls/azure_data_factory.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@

control 'azure_data_factory' do

impact 1.0
title 'Testing the singular resource of azure_data_factory.'
desc 'Testing the singular resource of azure_data_factory.'

describe azure_data_factory(resource_group: resource_group, name: factory_name) do
it { should exist }
its('name') { should eq factory_name }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@
dataset_type = input('dataset_type', value: nil)

control 'azure_data_factory_dataset' do

impact 1.0
title 'Testing the singular resource of azure_data_factory_dataset.'
desc 'Testing the singular resource of azure_data_factory_dataset.'

describe azure_data_factory_dataset(resource_group: resource_group, factory_name: factory_name, dataset_name: dataset_name) do
it { should exist }
its('name') { should eq dataset_name }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@
dataset_type = input('dataset_type', value: nil)

control 'azure_data_factory_datasets' do

impact 1.0
title 'Testing the plural resource of azure_data_factory_datasets.'
desc 'Testing the plural resource of azure_data_factory_datasets.'

describe azure_data_factory_datasets(resource_group: resource_group, factory_name: factory_name) do
it { should exist }
its('names') { should include dataset_name }
Expand All @@ -14,6 +19,7 @@
its('linkedServiceName_referenceNames') { should include linked_service_name }
its('linkedServiceName_types') { should include 'LinkedServiceReference' }
end

describe azure_data_factory_datasets(resource_group: resource_group, factory_name: 'fake') do
it { should_not exist }
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@

control 'azure_data_factory_linked_service' do

impact 1.0
title 'Testing the singular resource of azure_data_factory_linked_service.'
desc 'Testing the singular resource of azure_data_factory_linked_service.'

describe azure_data_factory_linked_service(resource_group: resource_group1,
factory_name: factory_name1, linked_service_name: linked_service_name1) do
it { should exist }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
resource_group = input('resource_group', value: nil)
factory_name = input('df_name', value: nil)
pipelines_name = input('df_pipeline_name', value: nil)

control 'azure_data_factory_pipeline' do

impact 1.0
title 'Testing the singular resource of azure_data_factory_pipeline.'
desc 'Testing the singular resource of azure_data_factory_pipeline.'

describe azure_data_factory_pipeline(resource_group: resource_group, factory_name: factory_name, pipeline_name: pipelines_name) do
it { should exist }
its('name') { should eq pipelines_name }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
pipelines_name = input('df_pipeline_name', value: nil)

control 'azure_data_factory_pipelines' do

impact 1.0
title 'Testing the plural resource of azure_data_factory_pipelines.'
desc 'Testing the plural resource of azure_data_factory_pipelines.'

describe azure_data_factory_pipelines(resource_group: resource_group, factory_name: factory_name) do
it { should exist }
its('names') { should include pipelines_name }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
account_name = input(:inspec_adls_account_name, value: '')
filesystem = input(:inspec_adls_fs_name, value: '')

control 'verify settings of Azure Data Lake Gen2 Filesystem ' do
control 'verify settings of Azure Data Lake Gen2 Filesystem' do

impact 1.0
title 'Testing the singular resource of azure_data_lake_storage_gen2_filesystem.'
desc 'Testing the singular resource of azure_data_lake_storage_gen2_filesystem.'

describe azure_data_lake_storage_gen2_filesystem(account_name: account_name, name: filesystem) do
it { should exist }
its('x_ms_namespace_enabled') { should eq 'false' }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
filesystem = input(:inspec_adls_fs_name, value: '')

control 'verify settings of all Azure Data Lake Gen2 Filesystems' do

impact 1.0
title 'Testing the plural resource of azure_data_lake_storage_gen2_filesystems.'
desc 'Testing the plural resource of azure_data_lake_storage_gen2_filesystems.'

describe azure_data_lake_storage_gen2_filesystems(account_name: account_name) do
it { should exist }
its('names') { should include filesystem }
Expand Down
13 changes: 9 additions & 4 deletions test/integration/verify/controls/azure_db_migration_service.rb
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
resource_group_name = attribute(:resource_group, default: nil)
service_name = attribute(:inspec_db_migration_service_name, default: nil)
sku_name = attribute(:inspec_db_migration_service_sku_name, default: nil)
location = attribute(:location, default: nil)
resource_group_name = attribute(:resource_group, value: nil)
service_name = attribute(:inspec_db_migration_service_name, value: nil)
sku_name = attribute(:inspec_db_migration_service_sku_name, value: nil)
location = attribute(:location, value: nil)

control 'azure_db_migration_service' do

impact 1.0
title 'Testing the singular resource of azure_db_migration_service.'
desc 'Testing the singular resource of azure_db_migration_service.'

describe azure_db_migration_service(resource_group: resource_group_name, service_name: service_name) do
it { should exist }
its('sku.name') { should eq sku_name }
Expand Down
11 changes: 8 additions & 3 deletions test/integration/verify/controls/azure_db_migration_services.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
service_name = attribute(:inspec_db_migration_service_name, default: nil)
sku_name = attribute(:inspec_db_migration_service_sku_name, default: nil)
location = attribute(:location, default: nil)
service_name = attribute(:inspec_db_migration_service_name, value: nil)
sku_name = attribute(:inspec_db_migration_service_sku_name, value: nil)
location = attribute(:location, value: nil)

control 'azure_db_migration_services' do

impact 1.0
title 'Testing the plural resource of azure_db_migration_services.'
desc 'Testing the plural resource of azure_db_migration_services.'

describe azure_db_migration_services do
it { should exist }
its('names') { should include service_name }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@

control 'azure_ddos_protection_resource' do

impact 1.0
title 'Testing the singular resource of azure_ddos_protection_resource.'
desc 'Testing the singular resource of azure_ddos_protection_resource.'

describe azure_ddos_protection_resource(resource_group: resource_group, name: ddos_protection_plan_name) do
it { should exist }
its('name') { should eq ddos_protection_plan_name }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
df_location = input('ddos_protection_plan_location', value: nil)

control 'azure_ddos_protection_resources' do

impact 1.0
title 'Testing the plural resource of azure_ddos_protection_resources.'
desc 'Testing the plural resource of azure_ddos_protection_resources.'

describe azure_ddos_protection_resources(resource_group: resource_group) do
it { should exist }
its('names') { should include ddos_protection_plan_name }
Expand Down
4 changes: 4 additions & 0 deletions test/integration/verify/controls/azure_dns_zones_resource.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@

control 'azure_dns_zones_resource' do

impact 1.0
title 'Testing the singular resource of azure_dns_zones_resource.'
desc 'Testing the singular resource of azure_dns_zones_resource.'

describe azure_dns_zones_resource(resource_group: resource_group, name: dns_zones) do
it { should exist }
its('name') { should eq dns_zones }
Expand Down
5 changes: 5 additions & 0 deletions test/integration/verify/controls/azure_dns_zones_resources.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
dns_location = input('dns_location', value: nil)

control 'azure_dns_zones_resources' do

impact 1.0
title 'Testing the plural resource of azure_dns_zones_resources.'
desc 'Testing the plural resource of azure_dns_zones_resources.'

describe azure_dns_zones_resources do
it { should exist }
its('names') { should include dns_zones }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@
sku_family = input('sku_family', value: nil)

control 'azure_express_route_circuit' do

impact 1.0
title 'Testing the singular resource of azure_express_route_circuit.'
desc 'Testing the singular resource of azure_express_route_circuit.'

describe azure_express_route_circuit(resource_group: resource_group, circuit_name: circuit_name) do
it { should exist }
its('name') { should eq circuit_name }
Expand Down
Loading

0 comments on commit 7265c5e

Please sign in to comment.