Commit graph

2612 commits

Author SHA1 Message Date
Nikita Mathur
15433e8661
Foreport 6229 to inspec 6 (#6277)
* Not applicable if logic addition

Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>

* Changes from not applicable if to only applicable if

Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>

* Fix to enable placing only_applicable_if at any position in control and for keeping impact zero intact

Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>

* Doc change added for only_applicable_if

Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>

* Doc Review

Signed-off-by: Deepa Kumaraswamy <dkumaras@progress.com>

* Added generic examples that supports cross platform for testing

Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>

* Yet another build fix due to changes in test

Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>

Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
Signed-off-by: Deepa Kumaraswamy <dkumaras@progress.com>
Co-authored-by: Deepa Kumaraswamy <dkumaras@progress.com>
2022-10-20 14:07:10 -04:00
Clinton Wolfe
2d886e3128
resolves inspec/inspec#6042 (#6043) (#6278)
Signed-off-by: Marijus Ravickas <marijus.ravickas@gmail.com>

Signed-off-by: Marijus Ravickas <marijus.ravickas@gmail.com>

Signed-off-by: Marijus Ravickas <marijus.ravickas@gmail.com>
Co-authored-by: Marijus Ravickas <marijus.ravickas@gmail.com>
2022-10-20 14:06:01 -04:00
Clinton Wolfe
9e4c4994c6
Enhance lxc resource to test properties (#6243) (#6275)
* ENHANCE: Extend lxc resource to test the properties

Signed-off-by: Sonu Saha <sonu.saha@progress.com>

* TEST: Extend test for introduced properties

Signed-off-by: Sonu Saha <sonu.saha@progress.com>

* DOCS: Extend test for introduced properties

Signed-off-by: Sonu Saha <sonu.saha@progress.com>

* FIX: Correct exception class to handle bad yaml

Signed-off-by: Sonu Saha <sonu.saha@progress.com>

* Doc Review

Signed-off-by: Deepa Kumaraswamy <dkumaras@progress.com>

* FIX: Handle specific exception to handle bad yaml

Signed-off-by: Sonu Saha <sonu.saha@progress.com>

Signed-off-by: Sonu Saha <sonu.saha@progress.com>
Signed-off-by: Deepa Kumaraswamy <dkumaras@progress.com>
Co-authored-by: Deepa Kumaraswamy <dkumaras@progress.com>

Signed-off-by: Sonu Saha <sonu.saha@progress.com>
Signed-off-by: Deepa Kumaraswamy <dkumaras@progress.com>
Co-authored-by: Sonu Saha <98935583+ahasunos@users.noreply.github.com>
Co-authored-by: Deepa Kumaraswamy <dkumaras@progress.com>
2022-10-20 14:04:57 -04:00
Vasundhara Jagdale
3e3b2c9b5b
Replace faraday_middleware with faraday-follow_redirects (#6238) (#6280)
faraday_middleware was already DEPRECATED in 2022-01.
Only FaradayMiddleware::FollowRedirects from faraday_middleware has been
used, and so we can replace it with faraday-follow_redirects.

faraday-follow_redirects 0.3.0 requires faraday ~> 1.0, which is as same
as "faraday_middleware 1.0.0 or higher.

Signed-off-by: Takuya Noguchi <takninnovationresearch@gmail.com>

Signed-off-by: Takuya Noguchi <takninnovationresearch@gmail.com>

Signed-off-by: Takuya Noguchi <takninnovationresearch@gmail.com>
Co-authored-by: Takuya N <takninnovationresearch@gmail.com>
2022-10-20 14:04:18 -04:00
Clinton Wolfe
393b8072e8
Feature Config File and Logger Support (#6260)
* Convenience method skeleton

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>

* Basic support for a config file

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>

* Add features() array method

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>

* Accept config as an option to with_feature

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>

* Accept logger as an option to with_feature

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>

* Refactor to push code into its own files

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>

* Basic logger integration

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>

* Crude validation of feature names, simply issues a warning log message

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>

* Linting

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>

* Add basic tamperproofing to feature config

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>

* Convenience method skeleton

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>

* Basic support for a config file

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>

* Add features() array method

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>

* Accept config as an option to with_feature

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>

* Accept logger as an option to with_feature

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>

* Refactor to push code into its own files

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>

* Basic logger integration

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>

* Crude validation of feature names, simply issues a warning log message

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>

* Linting

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>

* Add basic tamperproofing to feature config

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>

* CFINSPEC-464 CLI commands declaration using with_feature functionality (#6263)

* Declared inspec cli commands within feature_with function

Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>

* Added enhanced outcomes, waivers, reporters and streaming reporters within with_feature block

Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>

* Added with_feature declaration for attestations

Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>

Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>

* Update features.yaml signature after adding in new feature flags

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>

* Fix lint

Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>

* Resolved undefined method with_feature in reporters.rb

Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>

* Fix for features tampered file test failing

Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>

* Fixed the failing functional test for junit2: Missing the entry in the features.yaml
Added progress-bar reporter entry in features.yaml

Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
Co-authored-by: Nikita Mathur <Nik08@users.noreply.github.com>
Co-authored-by: Vasu1105 <vasundhara.jagdale@chef.io>
2022-10-19 19:17:56 +05:30
Nikita Mathur
efc6f2c63a
CFINSPEC-246/CFINSPEC-247 Attestation changes for N/R outcomes (#6222)
* Added attestation file option to read attestation in various formats

Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>

* Added method to add attestation data on control level

Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>

* Enhanced outcomes flag to be true when attestation file is passed

Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>

* Added logic for attestation for reporters

Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>

* Attestation integration with streaming reporters and lots of refactoring

Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>

* Support for mitre - with frequency, updated and explanation fields'

Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>

* To only revise enhanced outcomes when attestation data is present for the control - fix in streaming reporter

Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>

* Added test cases for attestation and also added validation warnings

Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>

* Attestation test for different formats of attestation file

Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>

* Validating presence of status column to be mandtory for attestation files

Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>

* Build fix

Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>

* Attestation build fix for windows

Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>

* No justification and no status graceful handling

Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>

* New class attestations added for logic and added missing test attestations file

Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>

* Code comments and cli doc changes for attestation option

Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>

* Moved logic of attestations and enhanced outcomes to the base of streaming reporter

Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>

* Attestation documentation added

Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>

* Added information on what happens if justification is missing in attestation file

Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>

* Attestation doc changes as per the review

Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>

* File fields doc changes in attestation doc

Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>

* Content Review

Signed-off-by: Deepa Kumaraswamy <dkumaras@progress.com>

* Edits

Signed-off-by: Deepa Kumaraswamy <dkumaras@progress.com>

* Attestation test changes matching regex and separated logic for expiration using frequency and updated date

Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>

* Proof-read

Signed-off-by: Deepa Kumaraswamy <dkumaras@progress.com>

* Name changes for expiry calculation method

Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>

* Generic tests in attestations for cross platform

Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>

Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
Signed-off-by: Deepa Kumaraswamy <dkumaras@progress.com>
Co-authored-by: Deepa Kumaraswamy <dkumaras@progress.com>
2022-09-30 09:53:32 -04:00
Vasundhara Jagdale
183d09c534
Adds podman resources. (#6183)
* CFINSPEC-368 Adds podman resource. Adds PodmanContainerFilter to handle podman.containers plural resource

Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>

* Fix lint errors

Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>

* Adds style simple to the filter table fields to flatten the array

Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>

* CFINSPEC-368 Updated podman resource to work with podman images plural resource

Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>

* CFINSPEC-368 Updated podman resource to work with podman networks plural resource

Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>

* CFINSPEC-368 Updated podman resource to work with podman pods  plural resource

Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>

* CFINSPEC-368 Updated podman resource to work with info and version parameter

Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>

* CFINSPEC-368 Updated podman resource to work  with podman volumes plural resource. Also updated the docs to add pods, networks and other resource parameters details.

Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>

* CFINSPEC-368 Updated podman resource to aspect object id to verify values of specified Podman object.

Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>

* Updated docs

Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>

* Updated column names to keep them same as the field names

Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>

* Adds style simple to commands column for podman containers plural resource

Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>

* CFINSPEC-360 Adds podman_container resource. Adds podman_object module

Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>

* Fixed the require path

Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>

* Fixed deprecation warning in unit test

Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>

* Fixed indentation issue in the docs.

Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>

* Renamed the methods names

Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>

* Adds skip resource test

Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>

* Updated podman.images to fetch only high level information as using query with low level information does not have required fields and represents the data in different way.

Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>

* added method to parse command which uses format option to fetch specific placeholders

Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>

* Update the podman,containers to fetch only high level information

Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>

* Update podman.networks to fetch only hight level information

Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>

* Removed style for where it is not required

Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>

* Lint fix and some code improvisation

Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>

* It turn out to be the docker object module can be utilized but still there is scope to rename that module to generic and not specific if going to use with other container management tools

Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>

* Missing file in earlier commit

Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>

* Content Review

Signed-off-by: Deepa Kumaraswamy <dkumaras@progress.com>

* CFINSPEC-361: Test for podman_image matchers and properties

Signed-off-by: Sonu Saha <sonu.saha@progress.com>

* CFINSPEC-361: Add podman_image matchers and properties

Signed-off-by: Sonu Saha <sonu.saha@progress.com>

* CFINSPEC-361: Documentation for podman_image matchers and properties

Signed-off-by: Sonu Saha <sonu.saha@progress.com>

* CFINSPEC-361: Fix Rubocop lint issues

Signed-off-by: Sonu Saha <sonu.saha@progress.com>

* CFINSPEC-361: Test for more properties

Signed-off-by: Sonu Saha <sonu.saha@progress.com>

* CFINSPEC-361: Add more podman_image properties

Signed-off-by: Sonu Saha <sonu.saha@progress.com>

* CFINSPEC-361: Documentation for podman_image properties

Signed-off-by: Sonu Saha <sonu.saha@progress.com>

* CFINSPEC-361: Test for low-level information of image

Signed-off-by: Sonu Saha <sonu.saha@progress.com>

* CFINSPEC-361: Add inspec_info property to test low-level info

Signed-off-by: Sonu Saha <sonu.saha@progress.com>

* CFINSPEC-361: Documentation for inspec_info property

Signed-off-by: Sonu Saha <sonu.saha@progress.com>

* CFINSPEC-361: Modify resource id to avoid dependency on other methods

Signed-off-by: Sonu Saha <sonu.saha@progress.com>

* CFINSPEC-361: Decouple podman_image from podman plural resource

Signed-off-by: Sonu Saha <sonu.saha@progress.com>

* CFINSPEC-361: Modify unit test and reqd fixtures

Signed-off-by: Sonu Saha <sonu.saha@progress.com>

* CFINSPEC-361: Handle nil scenario of inspect_info

Signed-off-by: Sonu Saha <sonu.saha@progress.com>

* CFINSPEC-361: Add missing property: id

Signed-off-by: Sonu Saha <sonu.saha@progress.com>

* CFINSPEC-361: Update documentation

Signed-off-by: Sonu Saha <sonu.saha@progress.com>

* CFINSPEC-361: Rename method and attribute name as suggested

Signed-off-by: Sonu Saha <sonu.saha@progress.com>

* CFINSPEC-361: Add stderr message in exception

Signed-off-by: Sonu Saha <sonu.saha@progress.com>

* CFINSPEC-361: Remove comment

Signed-off-by: Sonu Saha <sonu.saha@progress.com>

* CFINSPEC-361: Move json_key mapping to a method

Signed-off-by: Sonu Saha <sonu.saha@progress.com>

* Content Review

Signed-off-by: Deepa Kumaraswamy <dkumaras@progress.com>

* CFINSPEC-361: Remove exception and add nil

Signed-off-by: Sonu Saha <sonu.saha@progress.com>

* CFINSPEC-351: failing tests for podman_network resource

Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>

* CFINSPEC-351 Adds podman_network resource properties

Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>

* Fixed typo in the test

Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>

* Refactored the code for podman_image to handle non exisiting image and for creating dynamic methods for properties

Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>

* Uncommented the image test

Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>

* Update the example for podman_network

Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>

* Missing test fixture file

Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>

* Adds doc for podman_network resource

Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>

* Doc Review

Signed-off-by: Deepa Kumaraswamy <dkumaras@progress.com>

* Adds module for podman to group all common methods

Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>

* Updated code to match the stderr string for non existing image and network. Also added the test for the same. Added code comments.

Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>

* TEST: Add failing test for podman_volume (CFINSPEC-351)

Signed-off-by: Sonu Saha <sonu.saha@progress.com>

* RESOURCE: Add podman_volume properties & matcher (CFINSPEC-351)

Signed-off-by: Sonu Saha <sonu.saha@progress.com>

* TEST: Add mock cmds and fixtures for test to pass (CFINSPEC-351)

Signed-off-by: Sonu Saha <sonu.saha@progress.com>

* DOCS: Update documentation for podman_volume (CFINSPEC-351)

Signed-off-by: Sonu Saha <sonu.saha@progress.com>

* TEST: Add failing test for podman_pod (CFINSPEC-351)

Signed-off-by: Sonu Saha <sonu.saha@progress.com>

* RESOURCE: Add podman_pod properties & matcher (CFINSPEC-351)

Signed-off-by: Sonu Saha <sonu.saha@progress.com>

* TEST: Add mock cmds and fixtures for test to pass (CFINSPEC-351)

Signed-off-by: Sonu Saha <sonu.saha@progress.com>

* DOCS: Update documentation for podman_pod (CFINSPEC-351)

Signed-off-by: Sonu Saha <sonu.saha@progress.com>

* DOCS: Update properties of podman_volume (CFINSPEC-351)

Signed-off-by: Sonu Saha <sonu.saha@progress.com>

* LINT: Remove trailing whitespaces (CFINSPEC-351)

Signed-off-by: Sonu Saha <sonu.saha@progress.com>

* REFACTOR: Extend existing fixture, remove new fixtures (CFINSPEC-351)

Signed-off-by: Sonu Saha <sonu.saha@progress.com>

* Content Review

Signed-off-by: Deepa Kumaraswamy <dkumaras@progress.com>

Co-authored-by: Deepa Kumaraswamy <dkumaras@progress.com>
Co-authored-by: Sonu Saha <sonu.saha@progress.com>
2022-08-04 09:13:45 -04:00
Nikita Mathur
b7ddac9dcc
CFINSPEC-240 Extended file format support for waivers (#6193)
* Added separate waiver file reader and support for csv

Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>

* Added support for json format waivers

Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>

* Added support for xls and xlsx

Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>

* Build issues and updated description of gems

Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>

* Doc changes for waivers about supports

Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>

* Fix added to check final options presense in config

Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>

* Renamed variables from inputs to waivers

Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>

* Validation changes with other small changes

Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>

* Headers validation added for json and yaml

* Linter issues resolved

Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>

* Some refactoring and message change

Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>

* exit code check removed from test cases since not req

Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>

* Doc change for waiver support for excel by showing example

Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>

Co-authored-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2022-08-01 09:19:35 -04:00
Nikita Mathur
249f0aec9a Enhanced outcomes build fix for windows
Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
2022-07-29 14:42:37 +05:30
Nikita Mathur
c8351c9323 Added doc for only if impact change and modified test cases
Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
2022-07-29 14:31:40 +05:30
Nikita Mathur
1274a39690 Minitest deprecation warning fix for nil check
Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
2022-07-29 14:31:40 +05:30
Nikita Mathur
84c14a505a Added impact setting option in only_if
Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
2022-07-29 14:31:40 +05:30
Nikita Mathur
b26506b741 Enhanced outcomes changes in json based and yaml reporter
Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
2022-07-29 14:30:59 +05:30
Nikita Mathur
cfbddb82a5 Negative test added to check no status flag exist when enhanced outcomes flag is not used
Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
2022-07-29 14:30:59 +05:30
Nikita Mathur
a9fae7cfe2 Added enhanced outcomes option to schema subcommand and updated schema
Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
2022-07-29 14:30:59 +05:30
Nikita Mathur
dfd66012b4 Enhanced outcomes test profiles made consistent for testing across diff platforms
Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
2022-07-29 14:30:59 +05:30
Nikita Mathur
a96e226bef Exit code logic to consider error count and build fixes
Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
2022-07-29 14:30:59 +05:30
Nikita Mathur
1fc0076f1a Enhanced outcomes changes for streaming progress bar reporter
Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
2022-07-29 14:30:58 +05:30
Nikita Mathur
2b9f4d4bbf Enhanced outcomes changes in cli reporter
Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
2022-07-29 14:30:58 +05:30
Nikita Mathur
e7aa37dc24 Added logic for error in run_data
Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
2022-07-29 14:30:58 +05:30
Nikita Mathur
8c2d78161a N/A and N/R logic integration with base formatter run_data
Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
2022-07-29 14:30:58 +05:30
Nikita Mathur
390d883f99 Test added for enhanced_outcomes N/A and N/R
Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
2022-07-29 14:30:58 +05:30
Nikita Mathur
ec43054411 Platform checks on tests for unix and windows
Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
2022-07-01 14:14:00 +05:30
Nikita Mathur
df0397fa61 Windows testing with different versions of dependent profiles
Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
2022-06-30 17:51:27 +05:30
Nikita Mathur
26a40c1bbb Fix for if conditions placement in exec test file
Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
2022-06-30 13:37:13 +05:30
Nikita Mathur
5617ed819c Added inheritance test for windows
Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
2022-06-29 17:10:55 +05:30
Nikita Mathur
8bcfc38fe0 Windows fix for dependent profiles
Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
2022-06-29 17:05:59 +05:30
Clinton Wolfe
17d7822365 Use esxi instead of undefined as an unsupported OS to silence 'unknown OS' warnings
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2022-06-27 16:21:23 -04:00
Clinton Wolfe
34cdb8780d Add explict /usr/sbin/netstat to mockloader, fixes routingtable tests
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2022-06-27 16:21:23 -04:00
Nikita Mathur
f3aa18b4f9 Pinning minitest to 5.15.0 to fix build issue
Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
2022-06-27 16:21:23 -04:00
Nikita Mathur
1166489a93 Test case added for verifying running of same profile with different versions
Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
2022-06-14 13:21:27 +05:30
jayashrig158
ffbf2ff554
add ruby test 3.1 in verify pipeline (#5892)
* add ruby test 3.1 in verify pipeline

Signed-off-by: jayashri garud <jgarud@msystechnologies.com>

* updating rubygem to 3.3.3

Signed-off-by: jayashri garud <jgarud@msystechnologies.com>

* Test fixture plugin files for ABI 3.1.0

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>

* Use kwargs to match new calling style for ERB in ruby 2.7 and 3.0

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>

* Allow Date and Time data types, needed for waivers, since safe load is now the default for YAML

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>

* Use Time.parse, not Time.new since the rules tightened for what you can pass the constructor for waiver dates

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>

* Add ruby platform debug message to test parallel output

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>

* Conditionalize permitted_classes in inputs yaml_load for <= 3.1.x only

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>

* In ruby 3.1.0 net/pop3 is no more a default gem and that will require us to add it in Gemfile so trying with the byebug gem which we are bundling already

Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>

* CFINSPEC-166 Updated url fetcher to handle Net::OpenTimeout Exception on Windows

Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>

Co-authored-by: Clinton Wolfe <clintoncwolfe@gmail.com>
Co-authored-by: Vasu1105 <vasundhara.jagdale@chef.io>
2022-06-13 14:24:33 -04:00
Clinton Wolfe
29ef063833
Merge pull request #6100 from inspec/ss/fix-processes-on-windows
CFINSPEC-291: Fix `processes` resource to consider processes without `path` on Windows
2022-06-08 17:32:00 -04:00
Clinton Wolfe
610e7aacea
Merge pull request #5995 from inspec/vasundhara/sign-profile-binary-format
CFINSPEC-167: Profile Signing Rollup
2022-06-08 17:07:27 -04:00
Clinton Wolfe
6385ea9f74
Merge pull request #6126 from inspec/vasundhara/group_2_resource_id
Adds resource_id to group 2  resources
2022-06-08 16:14:45 -04:00
Clinton Wolfe
b0c1373d64
Merge pull request #6119 from inspec/vasundhara/group_1_resource_id_fix
CFINSPEC-262 - Handle resource_id in error situation
2022-06-08 16:13:38 -04:00
Clinton Wolfe
dd258e3926
Merge pull request #6115 from inspec/nm/add-resource-id-group-10
CFINSPEC 271 Group10 - Added resource_id in resources
2022-06-08 16:11:42 -04:00
Clinton Wolfe
37eee62150
Merge pull request #6112 from inspec/vasundhara/group12_add_resource_id
CFINSPEC-273 Adds resource_id group 12
2022-06-08 16:10:41 -04:00
Clinton Wolfe
00b396b8fe
Merge pull request #6111 from inspec/vasundhara/group9_resource_ids
CFINSPEC-270 Adds resource_id group9
2022-06-08 16:09:15 -04:00
Clinton Wolfe
0ae8f52c19
Merge pull request #6110 from inspec/ss/add-resource-ids-group-11
CFINSPEC-272: resource_ids group 11
2022-06-08 16:07:42 -04:00
Clinton Wolfe
092cf8090f
Merge pull request #6109 from inspec/nm/add-resource-id-group-4
CFINSPEC-265  Group 4 - Added resource_id in resources
2022-06-08 16:06:50 -04:00
Clinton Wolfe
3f9b234160
Merge pull request #6108 from inspec/nm/add-resource-id-group-3
CFINSPEC-264 Group 3 - Added resource_id in resources
2022-06-08 16:05:09 -04:00
Clinton Wolfe
9076dd6626
Merge pull request #6107 from inspec/vasundhara/group8_resource_ids
CFINSPEC-269 Adds resource_id group 8
2022-06-08 16:03:56 -04:00
Clinton Wolfe
39744335c5
Merge pull request #6106 from inspec/ss/add-resource-ids-group-13
CFINSPEC-274: resource_ids group 13
2022-06-08 16:02:16 -04:00
Sonu Saha
8ffca97e27 CFINSPEC-291: Add windows test for process without path
Signed-off-by: Sonu Saha <sonu.saha@progress.com>
2022-06-08 18:28:02 +05:30
Vasu1105
24f1fb18b6 CFINSPEC-263 Adds resource_id for cron resource and unit test for the same
Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
2022-06-08 14:58:46 +05:30
Vasu1105
78d1eb61be CFINSPEC-263 Adds resource_id to chocolatey_package, chrony_conf, command, cpan, cran, csv, dh_params resource and unit test for the same.
Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
2022-06-08 14:58:24 +05:30
Vasu1105
55ecbc4f21 CFINSPEC-262 - Handle resource_id in error situation
Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
2022-06-08 13:54:47 +05:30
Vasu1105
7f581f083d CFINSPEC-273 Adds resource_id to user, vbscript, virtualization, windows_feature, windows_firewall, windows_firewall_rule, windows_hotfix, windows_task and unit test for the same.
Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
2022-06-08 13:53:25 +05:30
Vasu1105
1b0eaf765f CFINSPEC-270 Adds resource_id to os, os_env, package, parse_config, parse_config_file, pip, platform, postfix_conf, postgres_conf, postgres_session resource and unit test for the same
Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
2022-06-08 13:52:40 +05:30
Vasu1105
5d47334735 CFINSPEC-269 Adds resource_id for npm, ntp_conf, oneget, opa_api, opa_cli resource and unit test for the same
Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
2022-06-08 13:52:16 +05:30
Vasu1105
14d5be2d20 CFINSPEC-268 Adds resource_id for ibmdb2_conf, ibmdb2_session, nginx, nginx_conf, noop and unit test for the same. Updated resource_id generation for mount and mysql_conf resource.
Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
2022-06-08 13:46:54 +05:30
Vasu1105
d2ebb270f4 CFINSPEC-268 Adds resource_id to mongodb_conf, mongodb_session, mount, mssql_session, mysql_conf resource and unit test for the same.
Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
2022-06-08 13:46:54 +05:30
Vasu1105
8f995a3c8f CFINSPEC-340 Handle inspec exec to work with change in the headers and fixes the failing test
Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
2022-06-08 11:10:34 +05:30
Vasu1105
5c061ea90b Fixes azure connection test
Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
2022-06-08 10:43:41 +05:30
Vasu1105
ae082725a9 Fix the key duplication error warning in the mock_loader.rb
Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
2022-06-06 13:58:35 +05:30
Clinton Wolfe
0d26fd2811
Merge pull request #6103 from inspec/ss/add-resource-ids-group-5
CFINSPEC-266: resource_ids group 5
2022-06-03 09:00:00 -04:00
Clinton Wolfe
47105e7f79
Merge pull request #6102 from inspec/vasundhara/group1_resource_ids
CFINSPEC-262 Adds resource_id group 1
2022-06-03 08:56:51 -04:00
Nikita Mathur
fc925afaa4 Added resource id for rabbitmq and windows resources
Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
2022-06-03 17:07:45 +05:30
Vasu1105
1c66679e46 CFINSPEC-262 Adds resource_id to aide_conf, apache_conf, apt, audit_policy, auditd_conf, bash, bond, bridge, cassandradb_conf, cassandradb_session resources and unit test for the same
Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
2022-06-03 13:53:57 +05:30
Nikita Mathur
a57843b8e7 Added resource id for iis and other db resources
Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
2022-06-03 01:32:49 +05:30
Sonu Saha
d306ceca9a CFINSPEC-272: Add resource_id & unit test: timezone
Signed-off-by: Sonu Saha <sonu.saha@progress.com>
2022-06-02 19:16:03 +05:30
Sonu Saha
36bd8f6b7a CFINSPEC-266: Add unit test: toml(depends on json)
Signed-off-by: Sonu Saha <sonu.saha@progress.com>
2022-06-02 18:28:46 +05:30
Nikita Mathur
cac93ee152 added name to be used as resource id for docker resource - loosely unique
Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
2022-06-02 17:14:36 +05:30
Nikita Mathur
7b0b98edac Resource id added for filesystem, grub, group, gem and other resources
Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
2022-06-02 17:11:00 +05:30
Sonu Saha
d012aec0b8 CFINSPEC-266: Add resource_id & unit test: iptables
Signed-off-by: Sonu Saha <sonu.saha@progress.com>
2022-06-02 16:55:55 +05:30
Sonu Saha
a2c9597335 CFINSPEC-266: Add resource_id & unit test: ipnat
Signed-off-by: Sonu Saha <sonu.saha@progress.com>
2022-06-02 16:55:41 +05:30
Sonu Saha
389495793f CFINSPEC-266: Add resource_id & unit test: ipfilter
Signed-off-by: Sonu Saha <sonu.saha@progress.com>
2022-06-02 16:55:18 +05:30
Sonu Saha
56e5a67f97 CFINSPEC-266: Add resource_id & unit test: ip6tables
Signed-off-by: Sonu Saha <sonu.saha@progress.com>
2022-06-02 16:54:50 +05:30
Sonu Saha
3c1c28f3ec CFINSPEC-266: Add resource_id & unit test: interface
Signed-off-by: Sonu Saha <sonu.saha@progress.com>
2022-06-02 16:54:18 +05:30
Sonu Saha
67081c00d4 CFINSPEC-266: Add resource_id & unit test: ini, json, xml, yaml
Signed-off-by: Sonu Saha <sonu.saha@progress.com>
2022-06-02 16:53:37 +05:30
Sonu Saha
978288dd95 CFINSPEC-266: Add resource_id & unit test: inetd_conf
Signed-off-by: Sonu Saha <sonu.saha@progress.com>
2022-06-02 16:52:04 +05:30
Sonu Saha
4853077dfd CFINSPEC-266: Add resource_id & unit test: iis_site
Signed-off-by: Sonu Saha <sonu.saha@progress.com>
2022-06-02 16:51:14 +05:30
Sonu Saha
60f80b9f97 CFINSPEC-274: Add resource_id & unit test: zfs_pool
Signed-off-by: Sonu Saha <sonu.saha@progress.com>
2022-06-02 16:46:45 +05:30
Sonu Saha
84a68668dd CFINSPEC-274: Add resource_id & unit test: zfs_dataset
Signed-off-by: Sonu Saha <sonu.saha@progress.com>
2022-06-02 16:46:36 +05:30
Sonu Saha
c9181db3bc CFINSPEC-274: Add resource_id & unit test: yum
Signed-off-by: Sonu Saha <sonu.saha@progress.com>
2022-06-02 16:46:12 +05:30
Sonu Saha
8e13fb1f36 CFINSPEC-274: Add resource_id & unit test: x509_certificate
Signed-off-by: Sonu Saha <sonu.saha@progress.com>
2022-06-02 16:45:24 +05:30
Sonu Saha
1fb530e739 CFINSPEC-274: Add resource_id & unit test: wmi
Signed-off-by: Sonu Saha <sonu.saha@progress.com>
2022-06-02 16:44:41 +05:30
Nikita Mathur
298c83a550 Resource id added for etc, docker and file resources
Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
2022-06-02 16:32:06 +05:30
Sonu Saha
86a96f34f7 CFINSPEC-267: Add resource_id & unit test: mongodb
Signed-off-by: Sonu Saha <sonu.saha@progress.com>
2022-06-02 11:55:50 +05:30
Sonu Saha
b39ab1e5e1 CFINSPEC-267: Add resource_id & unit test: login_defs
Signed-off-by: Sonu Saha <sonu.saha@progress.com>
2022-06-02 11:52:26 +05:30
Sonu Saha
eac4e11b34 CFINSPEC-267: Add resource_id & unit test: limits_conf
Signed-off-by: Sonu Saha <sonu.saha@progress.com>
2022-06-02 11:50:49 +05:30
Sonu Saha
06029220b4 CFINSPEC-267: Add resource_id & unit test: service, launchd_service
Signed-off-by: Sonu Saha <sonu.saha@progress.com>
2022-06-02 11:48:29 +05:30
Sonu Saha
ee8d263b74 CFINSPEC-267: Add resource_id & unit test: ksh
Signed-off-by: Sonu Saha <sonu.saha@progress.com>
2022-06-02 11:31:22 +05:30
Sonu Saha
db9f7f4466 CFINSPEC-267: resource_id unit test: key_rsa
Signed-off-by: Sonu Saha <sonu.saha@progress.com>
2022-06-02 11:28:40 +05:30
Sonu Saha
d6950fcd1c CFINSPEC-267: resource_id unit test: kernel_parameter
Signed-off-by: Sonu Saha <sonu.saha@progress.com>
2022-06-02 11:13:26 +05:30
Sonu Saha
d96647cdaf CFINSPEC-267: resource_id unit test: kernel_module
Signed-off-by: Sonu Saha <sonu.saha@progress.com>
2022-06-02 11:11:17 +05:30
Sonu Saha
0e9e249506 CFINSPEC-267: resource_id unit test: lxc
Signed-off-by: Sonu Saha <sonu.saha@progress.com>
2022-06-02 11:07:21 +05:30
Vasu1105
078d1ce898 Updated sign and verify command to directly accept the path of the profile instead of additional option to provide those. Updated docs for the same.
Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
2022-06-02 10:36:50 +05:30
Clinton Wolfe
9e52000088
Merge pull request #6041 from inspec/ss/enhance-x509_certificate-resource
CFINSPEC-95: Enhance `x509_certificate` resource
2022-06-01 09:36:05 -04:00
Sonu Saha
4d538f57c2 CFINSPEC-291: Remove byebugs and noise
Signed-off-by: Sonu Saha <sonu.saha@progress.com>
2022-06-01 13:30:28 +05:30
Sonu Saha
c3b1ce3e9e CFINSPEC-291: Fix test according to changes introduced in processes
Signed-off-by: Sonu Saha <sonu.saha@progress.com>
2022-06-01 13:10:07 +05:30
Vasundhara Jagdale
566ac8ed77
Merge pull request #6040 from marijus-ravickas/unit_yaml_reporter
UNIT_TESTS: update yaml reporter test for Ruby 3+
2022-05-18 09:05:03 +00:00
Sonu Saha
b4f52dff23 CFINSPEC-81: Add unit test for php_config
Signed-off-by: Sonu Saha <sonu.saha@progress.com>
2022-05-17 12:51:42 +05:30
Vasundhara Jagdale
b1c1b1bc92
Merge pull request #5991 from inspec/ss/enhance-processes-resource
CFINSPEC-92: Enhance `processes` resource
2022-05-17 06:01:55 +00:00
Vasundhara Jagdale
0978c8c274
Merge pull request #6045 from inspec/ss/enhance-host-resource
CFINSPEC-90: Enhance `host` resource
2022-05-17 06:01:15 +00:00
Vasundhara Jagdale
a0fba6d46d
Merge pull request #6018 from inspec/ss/add-x509_private_key-resource
CFINSPEC-84: Add `x509_private_key` resource
2022-05-17 06:00:03 +00:00
Clinton Wolfe
1d4e70ede5
Merge pull request #6057 from inspec/vasundhara/gem-dependency-version-issue
CFINSPEC-252: Fix profile gem dependency installation is failing when  gem version is not specified
2022-05-16 23:21:52 -04:00
Clinton Wolfe
0b587a98af Add ability to export metadata and README
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2022-05-13 00:31:32 +05:30
Clinton Wolfe
0553b7a359 Add validation options for --what and --format, add (failing) tests
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2022-05-13 00:31:32 +05:30