Commit graph

5398 commits

Author SHA1 Message Date
Takuya N
5be10c0ea2
Replace faraday_middleware with faraday-follow_redirects (#6238)
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>
2022-10-19 09:57:15 -04:00
Chef Expeditor
af5b8335af Bump version to 5.21.1 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2022-10-14 14:00:39 +00:00
Nikita Mathur
139f84831a
CFINSPEC-458 Oracle DB session resource compatibility with AIX-C shell (#6257)
* Oracle DB session resource compatibility with AIX-Cshell

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

* Fixes in oracledb session unit test using oracle_query_string

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

Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
2022-10-14 09:59:27 -04:00
Chef Expeditor
b71caaeaa1 Bump version to 5.21.0 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2022-09-29 13:46:06 +00:00
Nikita Mathur
f2dc49f6ea
CFINSPEC-374 DSL keyword only_applicable_if added (#6229)
* 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-09-29 09:44:52 -04:00
Chef Expeditor
60c80527f3 Bump version to 5.20.4 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2022-09-20 14:34:28 +00:00
Vasundhara Jagdale
572524b7ff
CFINSPEC-462: Fixes inspec sign breaks when there is period or dot in the profile name (#6261)
Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>

Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
2022-09-20 10:33:10 -04:00
Chef Expeditor
361c19a006 Bump version to 5.20.3 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2022-09-15 13:24:51 +00:00
Sonu Saha
3bcf4e6544
Enhance lxc resource to test properties (#6243)
* 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>
2022-09-15 09:23:45 -04:00
Marijus Ravickas
93f24cabbe
resolves inspec/inspec#6042 (#6043)
Signed-off-by: Marijus Ravickas <marijus.ravickas@gmail.com>

Signed-off-by: Marijus Ravickas <marijus.ravickas@gmail.com>
2022-08-25 09:39:17 -04:00
Chef Expeditor
fb44afe020 Bump version to 5.20.2 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2022-08-25 13:34:35 +00:00
Takuya N
fdb789febf
Sync up the default branch as main (#6239)
Signed-off-by: Takuya Noguchi <takninnovationresearch@gmail.com>

Signed-off-by: Takuya Noguchi <takninnovationresearch@gmail.com>
2022-08-25 09:33:17 -04:00
Chef Expeditor
61798ca383 Bump version to 5.20.1 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2022-08-04 13:18:01 +00:00
Chef Expeditor
28c41b3108 Bump version to 5.20.0 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2022-08-04 13:15:01 +00: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
Chef Expeditor
03793862d2 Bump version to 5.19.0 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2022-08-01 13:15:08 +00:00
Nikita Mathur
742d21c6e2 Duplicate method removal
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
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
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
82ab13dbe4 Html reporter changes for enhanced outcomes and refactoring changes
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
Clinton Wolfe
2ebd890533 Linting
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2022-07-29 14:30:58 +05:30
Nikita Mathur
9d531b68de Added failure and passed conditions in enhanced_outcomes
Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
2022-07-29 14:30:58 +05:30
Nikita Mathur
4e83f395c8 enhanced outcome fix in streaming reporter - collected test based on control_id
Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
2022-07-29 14:30:58 +05:30
Nikita Mathur
6d4729c437 Progress bar streaming reporter fix for unique control counts
Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
2022-07-29 14:30:58 +05:30
Nikita Mathur
f56f5ec844 enhanced outcomes logic in streaming reporter base class
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
29cd28f6ac Added plumbing logic to integrate enhanced outcomes in run_data
Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
2022-07-29 14:30:58 +05:30
Nikita Mathur
4b7543d109 Added enhanced_outcomes option for exec and shell
Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
2022-07-29 14:30:58 +05:30
Chef Expeditor
bb802f8dc9 Bump version to 5.18.17 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2022-07-27 14:00:17 +00:00
Chef Expeditor
a3beccfa43 Bump version to 5.18.16 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2022-07-21 05:50:37 +00:00
Chef Expeditor
833bfd8766 Bump version to 5.18.15 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2022-07-13 20:39:00 +00:00
Chef Expeditor
de7931d0c2 Bump version to 5.18.14 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2022-07-11 13:52:19 +00:00
Chef Expeditor
ddc7cfb56c Bump version to 5.18.13 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2022-07-09 16:50:46 +00:00
Chef Expeditor
8c72cf239d Bump version to 5.18.12 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2022-07-09 08:41:59 +00:00
Chef Expeditor
136f01c0f5 Bump version to 5.18.11 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2022-07-05 09:43:53 +00:00
Vasundhara Jagdale
5b0b39fee5
Merge pull request #6173 from inspec/nm/windows-fix-for-dependent-profiles
Merging this to make all other PR feel the happiness of green :)
2022-07-05 09:42:52 +00:00
Chef Expeditor
63835f42bc Bump version to 5.18.10 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2022-07-01 12:54:30 +00:00
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
9e32fec9b5
Merge pull request #6159 from inspec/vasundhara/adds_podman_inspec_support
CFINSPEC-236 Adds Podman support
2022-06-28 00:35:53 -04:00
Chef Expeditor
de9d8780f9 Bump version to 5.18.9 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2022-06-27 23:39:30 +00:00
Clinton Wolfe
54c175ca36
Merge pull request #6074 from inspec/nm/aws-profile-version-fix
CFINSPEC-249 Fix for dependent profiles with same name but different version
2022-06-27 17:34:43 -04:00
Chef Expeditor
81f89d5b31 Bump version to 5.18.8 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2022-06-27 20:15:03 +00:00
Nikita Mathur
e7ee813ec7 Reverted fake version change and added comments for more clarity
Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
2022-06-24 14:20:48 +05:30