mirror of
https://github.com/inspec/inspec
synced 2024-12-19 01:23:50 +00:00
20776b363d
* Add support for multiple descriptions for controls This adds the ability to specify multiple descriptions in controls. Example: ```ruby control 'my-control' do impact 1.0 title 'My control' desc 'A default description' desc 'rational', 'I need an example' describe file('/tmp') do it { should be_directory } end end ``` Many thanks to @jquick for helping me with the unit tests. * Remove unused `descriptions` method * Remove unused profile from test mocks * Respond to feedback Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>
18 lines
548 B
Ruby
18 lines
548 B
Ruby
include_controls 'myprofile1' do
|
|
# skip this useless control
|
|
skip_control 'pro1-con3'
|
|
|
|
# fix this control from the profile we inherit
|
|
control 'pro1-con2' do
|
|
impact 0.999
|
|
title 'Profile 1 - Control 2-updated'
|
|
desc 'Profile 1 - Control 2 description-updated'
|
|
desc 'overwrite me', 'it is overwritten'
|
|
desc 'new entry', 'this is appended to the description list'
|
|
tag 'password-updated'
|
|
ref 'Section 3.5.2.1', url: 'https://example.com'
|
|
describe file('/etc/passwd') do
|
|
it { should exist }
|
|
end
|
|
end
|
|
end
|