Commit graph

2613 commits

Author SHA1 Message Date
Gokulakrishnan KS
14f546391f
Added fatal message check for postgres_session:query method (#7154)
* Added fatal message check for postgres_session:query method

Signed-off-by: Gokulakrishnan KS <Gokulakrishnan.KS@progress.com>

* Added empty new line for the new fixture

Signed-off-by: Gokulakrishnan KS <Gokulakrishnan.KS@progress.com>

---------

Signed-off-by: Gokulakrishnan KS <Gokulakrishnan.KS@progress.com>
2024-08-27 14:52:32 +05:30
Vasundhara Jagdale
7f1174a753
Attempt to fix the random failure of depedency_loader unit test (#7101)
* Attempt to fix the dependency_loader random unit test failure in verify pipeline

Signed-off-by: Vasu1105 <vjagdale@progress.com>

* Revert "Attempt to fix the dependency_loader random unit test failure in verify pipeline"

This reverts commit 890e71b667.

* Attempt to fix randomly failing dependency_loader unit test

Signed-off-by: Vasu1105 <vjagdale@progress.com>

---------

Signed-off-by: Vasu1105 <vjagdale@progress.com>
2024-07-26 12:15:03 +05:30
Aaron Lippold
0ab35681aa
Update ssh_config resource to support returning the current sshd_config file in use. (#7070)
* modify resource

* windows compatibility

* end line

* removing comments to clean things up

Signed-off-by: Aaron Lippold <lippold@gmail.com>

* CHEF-12175: Remove use of `Kernel.open` or `IO.read` or similar sinks with a non-constant value (#7079)

* fix: update io reads to fix codescanning vuln

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

* fix: remove kernel#open fallback and update open method to handle local files

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

* fix: replace io.readlines to file.readlines

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

* chore: fix lint offense, unnecessary space

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

* fix: raise exception for standard errors as FetcherFailure

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

* chore: update exception message

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

---------

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

* fix: Missing regular expression anchor (#7077)

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

* Bump version to 6.6.27 by Chef Expeditor

Obvious fix; these changes are the result of automation not creative thinking.

* Fix gitignore file in docs dir (#7082)

Signed-off-by: Ian Maddaus <ian.maddaus@progress.com>

* Bump version to 6.6.28 by Chef Expeditor

Obvious fix; these changes are the result of automation not creative thinking.

* adding docs now that the gitignore is fixed.

Signed-off-by: Aaron Lippold <lippold@gmail.com>

* add docs for sshd_active_config resource

* fix docs

* unit tests

* rubocop on ssh_config.rb, sshd_con_test.rb, and sshd_active_config.md

* rename active path in method

* doc fix

* Linting Corrections for Active SSHD Config (#1)

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

* Update sshd_active_config.md

updated version

* doc version update

---------

Signed-off-by: Aaron Lippold <lippold@gmail.com>
Signed-off-by: Sonu Saha <sonu.saha@progress.com>
Signed-off-by: Ian Maddaus <ian.maddaus@progress.com>
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
Co-authored-by: Daniel Medina <dmedina@mitre.org>
Co-authored-by: Sonu Saha <98935583+ahasunos@users.noreply.github.com>
Co-authored-by: Chef Expeditor <chef-ci@chef.io>
Co-authored-by: Ian Maddaus <IanMadd@users.noreply.github.com>
Co-authored-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2024-07-24 16:32:09 +05:30
Clinton Wolfe
29242deb7c
Usage Telemetry v3 (#6012)
* Remove unused telemetry v1 code

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

* Sketch out basics of telemetry, with start/stop of invocation telemetry

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

* Data structure for run telemetry - job capture

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

* Add per-control and per-run feature detection

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

* CHEF-4017 Telemetry job api updations (#6965)

* Added initial changes to jobs api

Signed-off-by: Nik08 <nikita.mathur@progress.com>

* Feature flag changes for telemetry

Signed-off-by: Nik08 <nikita.mathur@progress.com>

* move base, debug and null to its own file structure

Signed-off-by: Sathish <sbabu@progress.com>

* make HTTP client post requests

Signed-off-by: Sathish <sbabu@progress.com>

* remove old logic

Signed-off-by: Sathish <sbabu@progress.com>

* make backend class as `HTTP`

Signed-off-by: Sathish <sbabu@progress.com>

* CHEF-7258 Fetch and use licensing information for telemetry (#6964)

* Added method to fetch license ids for inspec

Signed-off-by: Nik08 <nikita.mathur@progress.com>

* Added free license check for performing telemetry api call

Signed-off-by: Nik08 <nikita.mathur@progress.com>

* move base, debug and null to its own file structure

Signed-off-by: Sathish <sbabu@progress.com>

* make HTTP client post requests

Signed-off-by: Sathish <sbabu@progress.com>

* remove old logic

Signed-off-by: Sathish <sbabu@progress.com>

* make backend class as `HTTP`

Signed-off-by: Sathish <sbabu@progress.com>

---------

Signed-off-by: Nik08 <nikita.mathur@progress.com>
Signed-off-by: Sathish <sbabu@progress.com>
Co-authored-by: Sathish <sbabu@progress.com>

* Updated control tags and desc value to be used in jobs api

Signed-off-by: Nik08 <nikita.mathur@progress.com>

* Added checks for automate run context and free license check

Signed-off-by: Nik08 <nikita.mathur@progress.com>

* capture target mode and id

Signed-off-by: Sathish <sbabu@progress.com>

* profile doesn't need ID

Signed-off-by: Sathish <sbabu@progress.com>

* use run context to set environment data

Signed-off-by: Sathish <sbabu@progress.com>

* refactor `create_wrapper` to be localized

Signed-off-by: Sathish <sbabu@progress.com>

* change all timestamps to be UTC

Signed-off-by: Sathish <sbabu@progress.com>

* Null checks for response and corrected job api endpoint

Signed-off-by: Nik08 <nikita.mathur@progress.com>

* Fixed tag values to be sent as string in api call

Signed-off-by: Nik08 <nikita.mathur@progress.com>

* make version as float

Signed-off-by: Sathish <sbabu@progress.com>

* add platform name

Signed-off-by: Sathish <sbabu@progress.com>

* Added control result data in jobs api payload

Signed-off-by: Nik08 <nikita.mathur@progress.com>

* Debug logs added for telemetry call

Signed-off-by: Nik08 <nikita.mathur@progress.com>

* Removed unwanted telemetry debug class

Signed-off-by: Nik08 <nikita.mathur@progress.com>

* Payload fix to pass features data only on per control basis

Signed-off-by: Nik08 <nikita.mathur@progress.com>

* Added class function to list all invoked features by feature sub system

Signed-off-by: Nik08 <nikita.mathur@progress.com>

* Using feature system to get all invoked features list to be used in jobs api

Signed-off-by: Nik08 <nikita.mathur@progress.com>

* Unit tests cases updated and fixed

Signed-off-by: Nik08 <nikita.mathur@progress.com>

* License type check downcased

Signed-off-by: Nik08 <nikita.mathur@progress.com>

* Lint fix

Signed-off-by: Nik08 <nikita.mathur@progress.com>

* CHEF-7265 Telemetry opt-in for CINC users (#6966)

* Enabled telemtry opt-in

Signed-off-by: Nik08 <nikita.mathur@progress.com>

* Removed old comments

Signed-off-by: Nik08 <nikita.mathur@progress.com>

* Unit test case added to validate the disabling telemetry behaviour for inspec user

Signed-off-by: Nik08 <nikita.mathur@progress.com>

---------

Signed-off-by: Nik08 <nikita.mathur@progress.com>

---------

Signed-off-by: Nik08 <nikita.mathur@progress.com>
Signed-off-by: Sathish <sbabu@progress.com>
Co-authored-by: Sathish <sbabu@progress.com>

* Product team review changes - only disable telemetry for commercial license users

Signed-off-by: Nik08 <nikita.mathur@progress.com>

* Connection failure handling for telemetry http call

Signed-off-by: Nik08 <nikita.mathur@progress.com>

* Testing fix - Remove usage of deleted library

Signed-off-by: Nik08 <nikita.mathur@progress.com>

* Telemetry test case fix - Issue caused because unit test are run without feature flag env set

Signed-off-by: Nik08 <nikita.mathur@progress.com>

* Fixed and replaced tightly coupled semver versioning regex matching test for telemetry data

Signed-off-by: Nik08 <nikita.mathur@progress.com>

* Telemery test fix to use license key from env or a dummy value if not set in env

Signed-off-by: Nik08 <nikita.mathur@progress.com>

* Added error logs in case the http call is not successful for telemetry

Signed-off-by: Nik08 <nikita.mathur@progress.com>

* Error handling for telemetry start and run calls

Signed-off-by: Nik08 <nikita.mathur@progress.com>

* Telemetry opt-in changes (#7055)

* Removed usage of feature system to enable telemetry - making it opt-in by default

Signed-off-by: Nik08 <nikita.mathur@progress.com>

* Telemetry disable check fix when no option is passed in args

Signed-off-by: Nik08 <nikita.mathur@progress.com>

* Fix in test to use license specs defined for testing

Signed-off-by: Nik08 <nikita.mathur@progress.com>

---------

Signed-off-by: Nik08 <nikita.mathur@progress.com>

* (Restoring) CHEF-10392 load default telemetry url conditionally (#7059)

* load default telemetry url conditionally

Signed-off-by: Sathish <sbabu@progress.com>

* remove version base path
version base path is defined in jobs path already

Signed-off-by: Sathish <sbabu@progress.com>

* use `CHEF_` prefix for the ENV

Signed-off-by: Sathish <sbabu@progress.com>

---------

Signed-off-by: Sathish <sbabu@progress.com>
Co-authored-by: Sathish <sbabu@progress.com>

* Typo fix in features list

Signed-off-by: Nik08 <nikita.mathur@progress.com>

* Stub added for CI license key

Signed-off-by: Nik08 <nikita.mathur@progress.com>

* License usage telemetry correction - not track control results (#7060)

Signed-off-by: Nik08 <nikita.mathur@progress.com>

* Changes to disable telemetry for other InSpec distros (#7065)

Signed-off-by: Nik08 <nikita.mathur@progress.com>

* Lint issue fix

Signed-off-by: Nik08 <nikita.mathur@progress.com>

* Removing disable telemetry test - breaks on CI because of commercial license usage

Signed-off-by: Nik08 <nikita.mathur@progress.com>

* CHEF-13228 Chef licensing telemetry documentation (#7056)

* WIP chef telemetry env variable usage updated

Signed-off-by: Nik08 <nikita.mathur@progress.com>

* WIP intro added for chef telemetry - requires edit

Signed-off-by: Nik08 <nikita.mathur@progress.com>

* Correction in opt in behaviour of telemetry

Signed-off-by: Nik08 <nikita.mathur@progress.com>

* Doc update after default opt in changes

Signed-off-by: Nik08 <nikita.mathur@progress.com>

* Doc edit from product

Signed-off-by: Nik08 <nikita.mathur@progress.com>

* Doc edit

Signed-off-by: Nik08 <nikita.mathur@progress.com>

* Edits

Signed-off-by: Ian Maddaus <ian.maddaus@progress.com>

---------

Signed-off-by: Nik08 <nikita.mathur@progress.com>
Signed-off-by: Ian Maddaus <ian.maddaus@progress.com>
Co-authored-by: Ian Maddaus <ian.maddaus@progress.com>

* Updated version pinning of chef licensing to version 1 for chef telemetry

Signed-off-by: Nik08 <nikita.mathur@progress.com>

---------

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
Signed-off-by: Nik08 <nikita.mathur@progress.com>
Signed-off-by: Sathish <sbabu@progress.com>
Signed-off-by: Ian Maddaus <ian.maddaus@progress.com>
Co-authored-by: Nikita Mathur <Nik08@users.noreply.github.com>
Co-authored-by: Sathish <sbabu@progress.com>
Co-authored-by: Nik08 <nikita.mathur@progress.com>
Co-authored-by: Ian Maddaus <ian.maddaus@progress.com>
2024-07-22 19:26:24 +05:30
Thomas Heinen
ea7e386028
Configurable backend for Chef Infra in Target Mode (#7058)
* Add configurable InSpec backend for Chef Infra

Signed-off-by: Thomas Heinen <thomasheinen@gmail.com>

* Add changing backend for Chef Infra

Signed-off-by: Thomas Heinen <thomasheinen@gmail.com>

* Add test

* Fix typo on test

Signed-off-by: Thomas Heinen <thomasheinen@gmail.com>

* Fix test

Signed-off-by: Thomas Heinen <thomasheinen@gmail.com>

---------

Signed-off-by: Thomas Heinen <thomasheinen@gmail.com>
2024-06-28 12:08:18 +05:30
Vasundhara Jagdale
26e6cbfb9c
Remove Ruby 3.0 support (#7057)
* Remove Ruby 3.0 support

Signed-off-by: Vasu1105 <vjagdale@progress.com>

* Updates sonarqube coverage file

Signed-off-by: Vasu1105 <vjagdale@progress.com>

* Fix failing test after remmoval of support for ruby 3.0

Signed-off-by: Vasu1105 <vjagdale@progress.com>

---------

Signed-off-by: Vasu1105 <vjagdale@progress.com>
2024-06-11 20:43:59 +05:30
Sonu Saha
c8f020cb81
Modify url fetcher to remove --symref flag in git ls-remote command (#7043)
* fix: remove --symref options from git ls-remote
it is causing issue on ubuntu16 and rhel6

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

* spec: update test to match commit-sha.tar.gz instead of master.tar.gz

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

* spec: skip test on windows, works locally on windows

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

---------

Signed-off-by: Sonu Saha <sonu.saha@progress.com>
2024-05-21 12:53:03 +05:30
Sonu Saha
65bd83f6ed
CHEF-6000: Fix URL fetcher failure to work when current directory is not a Git repository (#7023)
* fix: use git gem to perform git remote show
this fixes the issue to perform git remote show when dir is not a git dir

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

* test: update test with default_ref stubbing

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

* chore: remove stubs which are not required

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

* chore: remove unused method

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

* test: fix broken test due to changes in url fetcher

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

* chore: improve error message to be user-friendly
this makes the error message as earlier one

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

* chore: change error message:

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

* revert: remove git gem dependency and use shellout

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

* fix: update url fetcher to use ls-remote to make it work in non-git dirs

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

---------

Signed-off-by: Sonu Saha <sonu.saha@progress.com>
2024-04-30 11:35:03 +05:30
Nikita Mathur
61a4ee3fc2
List all invoked features by feature sub system (#6979)
* Added class function to list all invoked features by feature sub system

Signed-off-by: Nik08 <nikita.mathur@progress.com>

* Test cases to verify invoked features list function

Signed-off-by: Nik08 <nikita.mathur@progress.com>

---------

Signed-off-by: Nik08 <nikita.mathur@progress.com>
2024-04-16 14:55:33 +05:30
Sonu Saha
698df457e2
test: update test with updated failure message for gcp auth (#7010)
Signed-off-by: Sonu Saha <sonu.saha@progress.com>
2024-04-16 13:27:55 +05:30
Vasundhara Jagdale
91210f8afe
CHEF-9848 - Exclude Warning "Unrecognized feature name" for Custom InSpec plugins. (#6988)
* Adds the check for custom plugins to avoid showing "Unrecognised Feature " warnings for them.

Signed-off-by: Vasu1105 <vjagdale@progress.com>

* Test to verify feature validation should not show warning for custom plugins

Signed-off-by: Vasu1105 <vjagdale@progress.com>

* Fix the test failures

Signed-off-by: Vasu1105 <vjagdale@progress.com>

---------

Signed-off-by: Vasu1105 <vjagdale@progress.com>
2024-03-27 11:39:22 +05:30
Vasundhara Jagdale
c4e5386656
Adds unit test for progress bar streaming reporter (#6970)
Signed-off-by: Vasu1105 <vjagdle@progress.com>
Co-authored-by: Vasu1105 <vjagdle@progress.com>
2024-02-08 16:07:59 +05:30
Sonu Saha
16a74f39ae
CHEF-3162: Implement unit test for inspec-sign plugin (#6959)
* test: add unit test for inspec sign #profile_verify

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

* enhance: add support for custom config dir to be used during testing

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

* test: add unit test for inspec sign #keygen and #profile_sign

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

* test: remove test for profile sign

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

* test: add test for methods in inspec sign

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

---------

Signed-off-by: Sonu Saha <sonu.saha@progress.com>
2024-02-02 15:11:20 +05:30
Sonu Saha
d4208cb63c
CHEF-4571: Silence warning about transforming into git fetcher (#6946)
* chore: change log-level for url fetcher transformation

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

* test: remove warning logs from url fetcher test

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

---------

Signed-off-by: Sonu Saha <sonu.saha@progress.com>
2024-01-24 18:34:21 +05:30
Vasundhara Jagdale
ebd3eeca55
CHEF-6412: Fix for virutalization resource undefined method file_read (#6947)
* Fix the undefined method file_read error which is causing virtualizaiton resource to set nil for virtualization platform check

Signed-off-by: Vasu1105 <vasundhara.jagdale@progress.com>

* Adds unit test for virtualization resource detect podman container usind detect_container method.
Signed-off-by: Vasu1105 <vasundhara.jagdale@progress.com>

---------

Signed-off-by: Vasu1105 <vasundhara.jagdale@progress.com>
2024-01-24 18:32:06 +05:30
Vasundhara Jagdale
dc7631b8ac
Skip audit log test on Windows (#6950)
* Skip audit log test on Windows

Signed-off-by: Vasu1105 <vasundhara.jagdale@progress.com>

* Fix the text in the audit log test

Signed-off-by: Vasu1105 <vasundhara.jagdale@progress.com>

---------

Signed-off-by: Vasu1105 <vasundhara.jagdale@progress.com>
2024-01-24 14:00:51 +05:30
Nikita Mathur
7ac8ccf7c1
Unit tests added for enhanced outcomes (#6924)
Signed-off-by: Nik08 <nikita.mathur@progress.com>
2024-01-24 12:08:54 +05:30
Nikita Mathur
75fe6a0e27
Unit tests added for iaf_file (#6933)
Signed-off-by: Nik08 <nikita.mathur@progress.com>
2024-01-24 12:02:31 +05:30
Vasundhara Jagdale
e48e0c7786
Fix failing ssh_key test on Windows (#6948)
Signed-off-by: Vasu1105 <vasundhara.jagdale@progress.com>
2024-01-23 19:20:13 +05:30
Vasundhara Jagdale
b946f5454d
CHEF-3962: Adds ability to verify ssh keys (#6656)
* ssh_key resource file

Signed-off-by: Vasu1105 <vasundhara.jagdale@progress.com>

* Initial commit for unit test for ssh_key resource

Signed-off-by: Vasu1105 <vasundhara.jagdale@progress.com>

* Fix linting and added resource in resources file

Signed-off-by: Vasu1105 <vasundhara.jagdale@progress.com>

* extend the ssh key resource to use file resource properties

Signed-off-by: Vasu1105 <vasundhara.jagdale@progress.com>

* Updates the ssh_key resource to get length and type of key.

Signed-off-by: Vasu1105 <vasundhara.jagdale@progress.com>

* Updates unit test for ssh_key resource.

Signed-off-by: Vasu1105 <vasundhara.jagdale@progress.com>

* ADDS Docs for ssh_key resource

Signed-off-by: Vasu1105 <vasundhara.jagdale@progress.com>

* Fix Review: Empty file handling

Signed-off-by: Vasu1105 <vasundhara.jagdale@progress.com>

* Fixed review comments and few code refactoring for ssh_key resource

Signed-off-by: Vasu1105 <vasundhara.jagdale@progress.com>

* Doc edits

Signed-off-by: Ian Maddaus <ian.maddaus@progress.com>

* Updates test

Signed-off-by: Vasu1105 <vasundhara.jagdale@progress.com>

---------

Signed-off-by: Vasu1105 <vasundhara.jagdale@progress.com>
Signed-off-by: Ian Maddaus <ian.maddaus@progress.com>
Co-authored-by: Ian Maddaus <ian.maddaus@progress.com>
2024-01-19 21:56:18 +05:30
Nikita Mathur
18847ac69d
Fix CI test for windows (#6913)
* Skip functional tests to match exit code for mandatory profile signing error in windows

Signed-off-by: Nik08 <nikita.mathur@progress.com>

* Addded comment to clarify skipping exit code matching test in windows

Signed-off-by: Nik08 <nikita.mathur@progress.com>

---------

Signed-off-by: Nik08 <nikita.mathur@progress.com>
2023-12-19 13:47:10 +05:30
Sonu Saha
b79ad46e5a
Fix examples for file resource provided in docs (#6899)
* Update docs and introduce test for file content

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

* TEST: Fix broken test due to changes in fixture

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

---------

Signed-off-by: Sonu Saha <sonu.saha@progress.com>
2023-12-13 18:38:52 +05:30
Vasundhara Jagdale
20d0a9dc0d
CHEF-6440: Integrates audit logging feature (#6809)
* Adds cli options to enable audit log and configure the audit log

Signed-off-by: Vasu1105 <vasundhara.jagdale@progress.com>

* Updated code to validate the audit log options. Audit log options are only valid for inspec exec and inspec shell command as those commands use the backend to execute commands and for file operations

Signed-off-by: Vasu1105 <vasundhara.jagdale@progress.com>

* Updates cli options documentation for audit log options

Signed-off-by: Vasu1105 <vasundhara.jagdale@progress.com>

* Disable audit log in test environment unless and until explicitly --enable-audit-log option is provided in test

Signed-off-by: Vasu1105 <vasundhara.jagdale@progress.com>

* Rename enable-audit-log cli option to disable-audit-log

Signed-off-by: Vasu1105 <vasundhara.jagdale@progress.com>

* CHEF-8210 Enables feature preview flag for audit logging

Signed-off-by: Vasu1105 <vasundhara.jagdale@progress.com>

* Revert "Disable audit log in test environment unless and until explicitly --enable-audit-log option is provided in test"

This reverts commit 50a42f0b44cf2fde6d927a00e444370cdd288a5d.

* Adds functional test for audit logging feature

Signed-off-by: Vasu1105 <vasundhara.jagdale@progress.com>

* Updates cli doc for audit loggin feature flag

Signed-off-by: Vasu1105 <vasundhara.jagdale@progress.com>

* Debug why audit log functional test fails in ci environment

Signed-off-by: Vasu1105 <vasundhara.jagdale@progress.com>

* Revert "Rename enable-audit-log cli option to disable-audit-log"

This reverts commit d5169ec705.

* Revert "Debug why audit log functional test fails in ci environment"

This reverts commit 6f43898ad0.

* Removes the --enable-audit-log option from cli as feature flag will handle the enabling and disabling of audit log feature. And introduces few code changes after reverting renaming of --enable-audit-log option

Signed-off-by: Vasu1105 <vasundhara.jagdale@progress.com>

* Updates the functional test for audit log

Signed-off-by: Vasu1105 <vasundhara.jagdale@progress.com>

* REVERT THIS ONCE THE TEST IS GREEN: This is just to test implementation of audit log against the train changes made for audit log

Signed-off-by: Vasu1105 <vasundhara.jagdale@progress.com>

* Removes the right one

Signed-off-by: Vasu1105 <vasundhara.jagdale@progress.com>

* Documentation for inspec audit logging feature

Signed-off-by: Vasu1105 <vasundhara.jagdale@progress.com>

* Renames inspec audit log file

Signed-off-by: Vasu1105 <vasundhara.jagdale@progress.com>

* Edits to audit log docs

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

* Remove --audit-log-rotation and --audit-log-size option to set from CLI

Signed-off-by: Vasu1105 <vasundhara.jagdale@progress.com>

* Make sure we delete audit log file before running each test

Signed-off-by: Vasu1105 <vasundhara.jagdale@progress.com>

* Appends timestamp and process id to generate audit log file per invocation/execution

Signed-off-by: Vasu1105 <vasundhara.jagdale@progress.com>

* Updates functional test for audit logging feature

Signed-off-by: Vasu1105 <vasundhara.jagdale@progress.com>

* Fix typo in audit logging docs

Signed-off-by: Vasu1105 <vasundhara.jagdale@progress.com>

* Appends the timestamp and process id to user provided audit log file so that unique audit log file created per invocation

Signed-off-by: Vasu1105 <vasundhara.jagdale@progress.com>

* Updates the audit log functional test

Signed-off-by: Vasu1105 <vasundhara.jagdale@progress.com>

* Minor code improvements

Signed-off-by: Vasu1105 <vasundhara.jagdale@progress.com>

* Adds exception class for invalid audit log options

Signed-off-by: Vasu1105 <vasundhara.jagdale@progress.com>

* Revert "REVERT THIS ONCE THE TEST IS GREEN: This is just to test implementation of audit log against the train changes made for audit log"

This reverts commit a66137e70b.

* Upgrade train-core version pinning

Signed-off-by: Vasu1105 <vasundhara.jagdale@progress.com>

* Docs review

Signed-off-by: Ian Maddaus <ian.maddaus@progress.com>

* Fix titles

Signed-off-by: Ian Maddaus <ian.maddaus@progress.com>

* Update the signature for features.yaml file

Signed-off-by: Vasu1105 <vasundhara.jagdale@progress.com>

---------

Signed-off-by: Vasu1105 <vasundhara.jagdale@progress.com>
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
Signed-off-by: Ian Maddaus <ian.maddaus@progress.com>
Co-authored-by: Clinton Wolfe <clintoncwolfe@gmail.com>
Co-authored-by: Ian Maddaus <ian.maddaus@progress.com>
2023-11-09 10:28:12 -05:00
Nikita Mathur
fd4e6d97a6
CHEF-6439 Mandatory Profile Signing (Preview) (#6705)
* Updated exec option to allow unsigned profiles run

Signed-off-by: Nik08 <nikita.mathur@progress.com>

* Added method to verify signed profile and to check for signed profile

Signed-off-by: Nik08 <nikita.mathur@progress.com>

* Invoked logic on each run to verify profiles if signed else raise sig req error

Signed-off-by: Nik08 <nikita.mathur@progress.com>

* Tests cases added to validate behaviour of inspec exec with signed and unsigned profiles with --chef-allow-unsigned flag

Signed-off-by: Nik08 <nikita.mathur@progress.com>

* Refactored and moved delete_signing_keys to common helper library for tests

Signed-off-by: Nik08 <nikita.mathur@progress.com>

* Updated code comments for more information and clarity on security update of signed profiles inspec exec

Signed-off-by: Nik08 <nikita.mathur@progress.com>

* Test cases to validate inspec run with combination of signed and unsigned profiles

Signed-off-by: Nik08 <nikita.mathur@progress.com>

* Documented usage of flag --chef-allow-unsigned

Signed-off-by: Nik08 <nikita.mathur@progress.com>

* Renamed the flag to run unsigned profiles to --allow-unsigned

Signed-off-by: Nik08 <nikita.mathur@progress.com>

* Refactored logic on profile level for profile signing verification

Signed-off-by: Nik08 <nikita.mathur@progress.com>

* Renaming the argument variable - from runner_call to silent

Signed-off-by: Nik08 <nikita.mathur@progress.com>

* Added profile mandate check for other inspec commands running profile evaluation

Signed-off-by: Nik08 <nikita.mathur@progress.com>

* Updated error message for profile sign requirement

Signed-off-by: Nik08 <nikita.mathur@progress.com>

* Updated test helper to fix inspec json test

Signed-off-by: Nik08 <nikita.mathur@progress.com>

* Fixed inspec json ability to use cli options successfully

Signed-off-by: Nik08 <nikita.mathur@progress.com>

* Documentation added for signed profiles mandatory usage with CLI commands

Signed-off-by: Nik08 <nikita.mathur@progress.com>

* Flow changes of raising exception when unsigned instead of direct exit

Signed-off-by: Nik08 <nikita.mathur@progress.com>

* Renamed unsigned profile flags

Signed-off-by: Nik08 <nikita.mathur@progress.com>

* Extracted out allow unsigned condition to config and modified comment info

Signed-off-by: Nik08 <nikita.mathur@progress.com>

* Doc update on consent of using signed and unsigned profiles

Signed-off-by: Nik08 <nikita.mathur@progress.com>

* Fix in signing mandatin check and added additional check on runner for better error UI for exec command

Signed-off-by: Nik08 <nikita.mathur@progress.com>

* Removed repeated allow-unsigned-profile defination from exec_options

Signed-off-by: Nik08 <nikita.mathur@progress.com>

* Test fixes

Signed-off-by: Nik08 <nikita.mathur@progress.com>

* Enabled feature preview flag for mandatory signing

Signed-off-by: Nik08 <nikita.mathur@progress.com>

* Test fixes after feature flag usage for mandatory signing

Signed-off-by: Nik08 <nikita.mathur@progress.com>

* Doc changes using feature preview flag for mandatory signing feature

Signed-off-by: Nik08 <nikita.mathur@progress.com>

* Inspec exec tests fixes for ENV values and parallel test fix using default option --allow-unsigned-profile false

Signed-off-by: Nik08 <nikita.mathur@progress.com>

* Kitchen fix while using signed profiles with inspec

Signed-off-by: Nik08 <nikita.mathur@progress.com>

* Unit test fix for profile resource exception

Signed-off-by: Nik08 <nikita.mathur@progress.com>

* Virtual profile detection improved

Signed-off-by: Nik08 <nikita.mathur@progress.com>

* Move mandatory profile sigining info to sigining page

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

* Renamed flag from --allow-unsigned-profile to --allow-unsigned-profiles

Signed-off-by: Nik08 <nikita.mathur@progress.com>

* Typo fix in signing doc

Signed-off-by: Nik08 <nikita.mathur@progress.com>

* Trim note in cli.md about mandatory profile signing

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

* Docs changes

Signed-off-by: Ian Maddaus <ian.maddaus@progress.com>

* Correct docs regarding exit code 5

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

---------

Signed-off-by: Nik08 <nikita.mathur@progress.com>
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
Signed-off-by: Ian Maddaus <ian.maddaus@progress.com>
Co-authored-by: Clinton Wolfe <clintoncwolfe@gmail.com>
Co-authored-by: Ian Maddaus <ian.maddaus@progress.com>
2023-11-09 08:20:43 -05:00
Vasundhara Jagdale
ed033b9ac2
CHEF-7694 (CHEF-8271) : Fix security_policy resource returns array for non comma separated values (#6838)
* Adds unit test for more security policies

Signed-off-by: Vasu1105 <vasundhara.jagdale@progress.com>

* Fix for secuity_policy resource failing if policy includes single value in string format it returns array instead of string

Signed-off-by: Vasu1105 <vasundhara.jagdale@progress.com>

* Update code comments

Signed-off-by: Vasu1105 <vasundhara.jagdale@progress.com>

---------

Signed-off-by: Vasu1105 <vasundhara.jagdale@progress.com>
2023-11-08 18:46:36 +05:30
Sonu Saha
b5fcc141d2
CHEF-6437: Implement different version of inspec export (#6816)
* Failing test for export - should not evaluate

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

* Sketch out a info_from_parse method

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

* Temporary commit to checkpoint experimental work

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

* Basic control ids extraction

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

* Modify to capture entire block

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

* Ability to parse desc, impact and title of a control (#6662)

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

* Rework per-control metadata collectors to be class-based

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

* REFACTOR: make a common base class for collectors

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

* memoise `info_from_parse`

Signed-off-by: Sathish <sbabu@progress.com>

* Add --legacy-export option to inspec export (#6661)

* support legacy export option

Signed-off-by: Sathish <sbabu@progress.com>

* ability to run legacy export option

Signed-off-by: Sathish <sbabu@progress.com>

---------

Signed-off-by: Sathish <sbabu@progress.com>

* Improve ControlIDCollector and other fields of export data (#6686)

* Parse tags & refs from the ast nodes

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

* ENHANCE: Improve Desc collector to collect description

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

* ENHANCE: Only loop through the child node of begin block

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

* FIX: Fix bug/todo to handle duplicacy of control ids

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

* TEST - a profile which fails to properly be exported but is likely to be used by MITRE

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

* Revert "FIX: Fix bug/todo to handle duplicacy of control ids"

This reverts commit 46d66e0026.

* Revert "ENHANCE: Only loop through the child node of begin block"

This reverts commit 47c92d8746.

* ADD: Add code key in control data

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

* ADD: Add source_location key in controls data

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

* HACK: Update the location ref for the controls

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

* FIX: Update variable name as latest changes

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

* FIX: Fix source location ref for all controls in a file

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

* FIX: Improve tagcollector to handle other data types

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

* FIX: Improve tagcollector to handle different types of tags

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

* ENHANCE & TEST: Improve tag collector to collector different tag styles and add test for it

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

* update groups

Signed-off-by: Sathish <sbabu@progress.com>

* Add yml data to export info_from_parse

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

* Add inputs to export data info_from_parse

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

* Add status and status_messages

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

* Initialize all control fields

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

* WIP: Filter controls using --controls

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

* Add inputs collector class - rules remaining

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

* Parse inputs from dsl - 1

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

* TEST: Uncomment tests to verify export

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

* TEST: Include test for different desc

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

* TEST: Include test for different title

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

* TEST: Include test for different ref

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

* Default impact to 0.5 and add test

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

* FIX: Avoid duplicate inputs

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

* Add test for inputs

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

* REFACTOR: Minor refactoring of tests

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

* Uncomment test for refs

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

---------

Signed-off-by: Sonu Saha <sonu.saha@progress.com>
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
Signed-off-by: Sathish <sbabu@progress.com>
Co-authored-by: Clinton Wolfe <clintoncwolfe@gmail.com>
Co-authored-by: Sathish <sbabu@progress.com>

* Update option to match inspec's coding standard

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

* Handle inputs within control block

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

* TEST & ENHANCE: Enhance parser and add more tests

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

* FIX: Fix broken test for profile_test

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

* Update groups after filtering control

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

* Add --legacy-export support to inspec json

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

* TEST: Fix broken test & fix group filters

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

* DOCS: Manually update cli.md to include export cmd

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

* Add tag filtering support to export

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

* TEST: Add test for tag and control based filtering

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

* LINT: Fix lint offense

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

* CHORE: Remove addressed todo and update comments

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

* CHEF-6493: Support `--legacy-export` option in `inspec archive` (#6829)

* Introduce --legacy-export flag to archive command

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

* Add more test to verify --legacy-export with archive

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

* Update logic to fetch info based on --legacy-export flag

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

---------

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

* Enhance InputCollector to match pattern instead of to indexing children type to avoid nil errors

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

* Improve RefCollector to handle ref   ({:ref=>'Some ref', :url=>'https://'\}\) syntax

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

* Improve RefCollector and TagCollector to handle variables values from inputs/attributes

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

* Run inspec check using output info_from_parse (#6673)

* Add test fixture profile that emits evaluation markers on stderr

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

* Failing test for export - should not evaluate

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

* Sketch out a info_from_parse method

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

* Temporary commit to checkpoint experimental work

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

* Basic control ids extraction

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

* Modify to capture entire block

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

* Ability to parse desc, impact and title of a control (#6662)

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

* Rework per-control metadata collectors to be class-based

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

* REFACTOR: make a common base class for collectors

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

* memoise `info_from_parse`

Signed-off-by: Sathish <sbabu@progress.com>

* Add --legacy-export option to inspec export (#6661)

* support legacy export option

Signed-off-by: Sathish <sbabu@progress.com>

* ability to run legacy export option

Signed-off-by: Sathish <sbabu@progress.com>

---------

Signed-off-by: Sathish <sbabu@progress.com>

* Parse tags & refs from the ast nodes

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

* ENHANCE: Improve Desc collector to collect description

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

* ENHANCE: Only loop through the child node of begin block

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

* FIX: Fix bug/todo to handle duplicacy of control ids

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

* TEST - a profile which fails to properly be exported but is likely to be used by MITRE

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

* Revert "FIX: Fix bug/todo to handle duplicacy of control ids"

This reverts commit 46d66e0026.

* Revert "ENHANCE: Only loop through the child node of begin block"

This reverts commit 47c92d8746.

* ADD: Add code key in control data

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

* ADD: Add source_location key in controls data

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

* HACK: Update the location ref for the controls

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

* FIX: Update variable name as latest changes

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

* FIX: Fix source location ref for all controls in a file

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

* FIX: Improve tagcollector to handle other data types

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

* FIX: Improve tagcollector to handle different types of tags

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

* ENHANCE & TEST: Improve tag collector to collector different tag styles and add test for it

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

* update groups

Signed-off-by: Sathish <sbabu@progress.com>

* Add yml data to export info_from_parse

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

* Add inputs to export data info_from_parse

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

* Add status and status_messages

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

* Initialize all control fields

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

* make description `default` as a symbol

Signed-off-by: Sathish Babu <sbabu@progress.com>

* define `checks` as Set

Signed-off-by: Sathish Babu <sbabu@progress.com>

* Collect tests as part of collector
and store it in `checks`

Signed-off-by: Sathish Babu <sbabu@progress.com>

* refactor to read `ID` from controls which is an Array now unlike an Hash in `params.controls`

Signed-off-by: Sathish Babu <sbabu@progress.com>

* read yaml params from metadata

Signed-off-by: Sathish Babu <sbabu@progress.com>

* use to Array to simply DS as the o/p ie being converted to JSON

Signed-off-by: Sathish Babu <sbabu@progress.com>

* move old check as legacy check

Signed-off-by: Sathish Babu <sbabu@progress.com>

* support `legacy_check` as an option to run checks in legacy mode

Signed-off-by: Sathish Babu <sbabu@progress.com>

* fix tests to support `legacy_checks`

Signed-off-by: Sathish Babu <sbabu@progress.com>

* update document for check

Signed-off-by: Sathish Babu <sbabu@progress.com>

* Update usage doc for --legaccy-check

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

---------

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
Signed-off-by: Sonu Saha <sonu.saha@progress.com>
Signed-off-by: Sathish <sbabu@progress.com>
Signed-off-by: Sathish Babu <sbabu@progress.com>
Co-authored-by: Clinton Wolfe <clintoncwolfe@gmail.com>
Co-authored-by: Sonu Saha <98935583+ahasunos@users.noreply.github.com>
Co-authored-by: Sonu Saha <sonu.saha@progress.com>

* LINT: Fix lint offense

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

* do not include tests to controls by default

Signed-off-by: Sathish Babu <sbabu@progress.com>

* generate info with tests for check

Signed-off-by: Sathish Babu <sbabu@progress.com>

---------

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
Signed-off-by: Sonu Saha <sonu.saha@progress.com>
Signed-off-by: Sathish <sbabu@progress.com>
Signed-off-by: Sathish Babu <sbabu@progress.com>
Co-authored-by: Clinton Wolfe <clintoncwolfe@gmail.com>
Co-authored-by: Sathish <sbabu@progress.com>
Co-authored-by: Sathish Babu <80091550+sathish-progress@users.noreply.github.com>
2023-11-07 15:15:45 +05:30
Nikita Mathur
456fa5c8f5
CHEF-7670 Ability to set feature preview flag using ENV (#6833)
* Implemented ability to add feature flags in Inspec feature subsystem

Signed-off-by: Nik08 <nikita.mathur@progress.com>

* Added usage of env_preview for conditionalising features

Signed-off-by: Nik08 <nikita.mathur@progress.com>

* Test cases added for feature preview flag ability

Signed-off-by: Nik08 <nikita.mathur@progress.com>

* Minor chnages - Better commenting & smarter methods

Signed-off-by: Nik08 <nikita.mathur@progress.com>

---------

Signed-off-by: Nik08 <nikita.mathur@progress.com>
2023-10-30 21:08:26 +05:30
Nikita Mathur
b360d64a1c
Changed params usage in inspec archive to skip evaluation (#6741)
* Using metadata to fetch basic info as name and version required in archive

Signed-off-by: Nik08 <nikita.mathur@progress.com>

* Typo fixes

Signed-off-by: Nik08 <nikita.mathur@progress.com>

---------

Signed-off-by: Nik08 <nikita.mathur@progress.com>
2023-09-30 19:33:36 +05:30
Sathish Babu
e1d39e581a
CHEF-6422 Modify inspec archive to not check or export by default (#6659)
* make profile check optional

Signed-off-by: Sathish <sbabu@progress.com>

* Clarify error message when making inspec check optional

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

* Add test fixture profile that emits evaluation markers on stderr

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

* Make export to inspec.json optional, not enabled by default

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

* Add test confirming non-evaluative archive

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

* Fix failing plugin search test, failing since we published a new test gem

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

---------

Signed-off-by: Sathish <sbabu@progress.com>
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
Co-authored-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2023-09-29 18:12:37 -04:00
Vasundhara Jagdale
95c17d4e7f
CHEF-3849: InSpec should exit quickly and clearly if waiver file is malformed/corrupt (#6644)
* Functional test for malformed waiver file

Signed-off-by: Vasu1105 <vasundhara.jagdale@progress.com>

* Raise error for malformed yaml content and exit

Signed-off-by: Vasu1105 <vasundhara.jagdale@progress.com>

* Updates functional test for malformed yaml waiver file and for empty waiver file

Signed-off-by: Vasu1105 <vasundhara.jagdale@progress.com>

* Raises error in case of missing required parameters in waiver file

Signed-off-by: Vasu1105 <vasundhara.jagdale@progress.com>

* Update functional test for missing parameters, extra parameters or column without headers in waiver file

Signed-off-by: Vasu1105 <vasundhara.jagdale@progress.com>

* Fix linting

Signed-off-by: Vasu1105 <vasundhara.jagdale@progress.com>

* Fix warning and error messages

Signed-off-by: Vasu1105 <vasundhara.jagdale@progress.com>

* Updates nil and false check for yaml data and adds additional empty check.

Co-authored-by: Sathish Babu <80091550+sathish-progress@users.noreply.github.com>
Signed-off-by: Vasu1105 <vasundhara.jagdale@progress.com>

* Adds more generic message as this yaml reader is now getting used by other functionalities like waiver file

Signed-off-by: Vasu1105 <vasundhara.jagdale@progress.com>

* Fixed test description to reflect correct use case

Signed-off-by: Vasu1105 <vasundhara.jagdale@progress.com>

* Fix validate headers was not validating the required parametes for all the data fields as it was not called inside the loop where we are iterating over the data and fetching the headers.

Signed-off-by: Vasu1105 <vasundhara.jagdale@progress.com>

* Updates the test files for the use case to missing parameters and extra parameters

Signed-off-by: Vasu1105 <vasundhara.jagdale@progress.com>

* Updates code to better handle errors and warnings related to missing required parameters and extra parameters in waivers file in all format i.e (yaml, json and csv).

Signed-off-by: Vasu1105 <vasundhara.jagdale@progress.com>

* Updated functional test to capture the updated error and warning messages for waiver file validation

Signed-off-by: Vasu1105 <vasundhara.jagdale@progress.com>

* Fix linting

Signed-off-by: Vasu1105 <vasundhara.jagdale@progress.com>

* Deleted fixture file which is not required

Signed-off-by: Vasu1105 <vasundhara.jagdale@progress.com>

* Refactor: Renamed method validate_headers to reflect whats it's doing and instead of return data in array it will now return the data in hash

Signed-off-by: Vasu1105 <vasundhara.jagdale@progress.com>

---------

Signed-off-by: Vasu1105 <vasundhara.jagdale@progress.com>
Co-authored-by: Sathish Babu <80091550+sathish-progress@users.noreply.github.com>
2023-09-12 10:36:40 -04:00
Vasundhara Jagdale
8ee7bc946d
CHEF-642 Fix for inspec exec fails with git fetcher if current directory does not have .git directory (#6626)
* Functional Test to verify git fetcher able to work in a directory where git is not initialized or does not contain the .git directory

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

* Fix: If git branch, tag or reference information is not given it should clone the repo and checkout the default HEAD

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

* Remove the logic to find default branch in case of branch, tag or ref is not provided as it's not required logically as we will be cloning the and checkout the default HEAD

Signed-off-by: Vasu1105 <vasundhara.jagdale@progress.com>

* This is a temporary change to make verify test working on this PR. Revert once the work is done for the git fetcher fix

Signed-off-by: Vasu1105 <vasundhara.jagdale@progress.com>

* Unit Test: Fix unit test

Signed-off-by: Vasu1105 <vasundhara.jagdale@progress.com>

* Verifies the git url before creating cache_key, if given relative path does not exist make sure it deletes the cache directory created to copy the cloned repo. It raises error if any git command fails

Signed-off-by: Vasu1105 <vasundhara.jagdale@progress.com>

* Reverted verify git repo url call from cache_key as cache_key and shifted that to resolve_ref which is already raising the error in case of git ls remote command fails

Signed-off-by: Vasu1105 <vasundhara.jagdale@progress.com>

* Unit test to cover the changes done for resolve_ref when branch, tag or ref is not given and
unit test for invalid git repo

Signed-off-by: Vasu1105 <vasundhara.jagdale@progress.com>

---------

Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
Signed-off-by: Vasu1105 <vasundhara.jagdale@progress.com>
2023-08-31 20:06:24 +05:30
Sathish Babu
5d0ae06a01
Missing changes from main (#6564)
* Sync up the default branch as main (#6239)

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

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

* Bump version to 5.20.2 by Chef Expeditor

Obvious fix; these changes are the result of automation not creative thinking.

* resolves inspec/inspec#6042 (#6043)

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

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

* 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>

* Bump version to 5.20.3 by Chef Expeditor

Obvious fix; these changes are the result of automation not creative thinking.

* 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>

* Bump version to 5.20.4 by Chef Expeditor

Obvious fix; these changes are the result of automation not creative thinking.

* 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>

* Bump version to 5.21.0 by Chef Expeditor

Obvious fix; these changes are the result of automation not creative thinking.

* 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>

* Bump version to 5.21.1 by Chef Expeditor

Obvious fix; these changes are the result of automation not creative thinking.

* 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>

* Bump version to 5.21.2 by Chef Expeditor

Obvious fix; these changes are the result of automation not creative thinking.

* Update Faraday gem (#6267)

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

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

* Bump version to 5.21.3 by Chef Expeditor

Obvious fix; these changes are the result of automation not creative thinking.

* Bump test-kitchen from 3.3.1 to 3.3.2 in /omnibus (#6227)

Bumps [test-kitchen](https://github.com/test-kitchen/test-kitchen) from 3.3.1 to 3.3.2.
- [Release notes](https://github.com/test-kitchen/test-kitchen/releases)
- [Changelog](https://github.com/test-kitchen/test-kitchen/blob/main/CHANGELOG.md)
- [Commits](https://github.com/test-kitchen/test-kitchen/commits)

---
updated-dependencies:
- dependency-name: test-kitchen
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump version to 5.21.4 by Chef Expeditor

Obvious fix; these changes are the result of automation not creative thinking.

* Bump omnibus-software from `1d540dc` to `7d0e0fe` in /omnibus (#6274)

Bumps [omnibus-software](https://github.com/chef/omnibus-software) from `1d540dc` to `7d0e0fe`.
- [Release notes](https://github.com/chef/omnibus-software/releases)
- [Commits](1d540dcdef...7d0e0fe472)

---
updated-dependencies:
- dependency-name: omnibus-software
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump version to 5.21.5 by Chef Expeditor

Obvious fix; these changes are the result of automation not creative thinking.

* Fix for omnibus build failure on Windows (#6289)

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

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

* Bump version to 5.21.6 by Chef Expeditor

Obvious fix; these changes are the result of automation not creative thinking.

* RESOURCE-527 Add an inspec init template for alicloud (#6304)

* adding the alicloud in the spec.files

Signed-off-by: Soumyodeep Karmakar <soumyo.k13@gmail.com>

* adding the test for generating inspec profile alicloud

Signed-off-by: Soumyodeep Karmakar <soumyo.k13@gmail.com>

* adding the alicloud profile

Signed-off-by: Soumyodeep Karmakar <soumyo.k13@gmail.com>

* fix lint error

Signed-off-by: Soumyodeep Karmakar <soumyo.k13@gmail.com>

Signed-off-by: Soumyodeep Karmakar <soumyo.k13@gmail.com>

* Bump version to 5.21.7 by Chef Expeditor

Obvious fix; these changes are the result of automation not creative thinking.

* Fix Ruby 2.7 Bundle Installs on CI Verify Pipeline (#6324)

* We will never be on 2.6 again

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

* Only run html-proofer test on Ruby 3

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

* Pin to chef 16 on ruby 2.7, 17+ on Ruby 3

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

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

* Bump version to 5.21.8 by Chef Expeditor

Obvious fix; these changes are the result of automation not creative thinking.

* CFINSPEC-493 update signing_identity (#6298)

* update signing_identity

Signed-off-by: Sathish <sbabu@progress.com>

* pin chef to older version for ruby version lesser than 3.0

Signed-off-by: Sathish <sbabu@progress.com>

Signed-off-by: Sathish <sbabu@progress.com>
Co-authored-by: Clinton Wolfe <clintoncwolfe@gmail.com>

* Bump version to 5.21.9 by Chef Expeditor

Obvious fix; these changes are the result of automation not creative thinking.

* Cfinspec 488 fix nokigiri omnibus (#6305)

* update signing_identity

Signed-off-by: Sathish <sbabu@progress.com>

* pin chef 17.0 to ruby 2.7

Signed-off-by: Sathish <sbabu@progress.com>

* add nokogiri as dependency

Signed-off-by: Sathish <sbabu@progress.com>

* pin chef to older version for ruby version lesser than 3.0

Signed-off-by: Sathish <sbabu@progress.com>

* Linting

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

Signed-off-by: Sathish <sbabu@progress.com>
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
Co-authored-by: Clinton Wolfe <clintoncwolfe@gmail.com>

* Bump version to 5.21.10 by Chef Expeditor

Obvious fix; these changes are the result of automation not creative thinking.

* Remove Windows 3.0 testing. Chef 18 was never released for Ruby 3.0, only 3.1 (#6330)

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

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

* Bump version to 5.21.11 by Chef Expeditor

Obvious fix; these changes are the result of automation not creative thinking.

* Prevent negative status from crashing launchd service resource (#6262)

Signed-off-by: dtheyer <davidheyer2016@gmail.com>

Signed-off-by: dtheyer <davidheyer2016@gmail.com>

* Bump version to 5.21.12 by Chef Expeditor

Obvious fix; these changes are the result of automation not creative thinking.

* Update chefstyle from 2.0.x to 2.2.2 to use RuboCop 1.25.1 (#6240)

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

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

* Bump version to 5.21.13 by Chef Expeditor

Obvious fix; these changes are the result of automation not creative thinking.

* Update readme for usage via Docker (CFINSPEC-516) (#6329)

* DOCS: Update readme for usage via Docker (CFINSPEC-516)

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

* DOCS: Explain updated readme (CFINSPEC-516)

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

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

* Bump version to 5.21.14 by Chef Expeditor

Obvious fix; these changes are the result of automation not creative thinking.

* CFINSPEC-393 - Fix for custom plugin loading issue when gemspec file is invalid and unable to load the lib path. (#6334)

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

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

* Bump version to 5.21.15 by Chef Expeditor

Obvious fix; these changes are the result of automation not creative thinking.

* CFINSPEC-517: Fix for habitat buld failure  (#6340)

* Fix for habitat buld failure - Git load issue

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

* Updating ruby installer version to 3.2.1

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

* Revert "Updating ruby installer version to 3.2.1"

This reverts commit 53bae0f71e.

* Checking removing the lines which are not needed.

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

* Revert "Checking removing the lines which are not needed."

This reverts commit b5561abc51.

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

* Bump version to 5.21.16 by Chef Expeditor

Obvious fix; these changes are the result of automation not creative thinking.

* Upgraded mock ubuntu test from 20.04 to 22.04 (#6351)

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

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

* Fixing typo in user_permissions (#6344)

* Fixing typo in user_permissions

Signed-off-by: Magruder, Micah <Micah.Magruder@oracle.com>

* Corrected spacing

Signed-off-by: Magruder, Micah <Micah.Magruder@oracle.com>

Signed-off-by: Magruder, Micah <Micah.Magruder@oracle.com>

* Bump version to 5.21.17 by Chef Expeditor

Obvious fix; these changes are the result of automation not creative thinking.

* Fix env smoke test by updating ERB.new in `inspec env`; add additional test (#6342)

* Failing test for Ruby 3.1 - ERB.new call options changed

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

* Fix for Ruby 3.1 by using named params to ERB.new

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

* Restrict test to non-windows systems

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

* Restrict test to non-windows systems

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

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

* CFINSPEC-533: Fix undefined method 'summary' for Gem::SourceFetchProblem (NoMethodError) when airgapped  (#6337)

* This fixes the undefined method 'summary' for #<Gem::SourceFetchProblem:0x000000000139dc70> (NoMethodError) while invoking any inspec command if the custom plugin is installed and if inspec commands are run in an air gap environment.
This fix removes an earlier call for getting gem specification from rubygems.org which is the cause for above error and replaces it with fetching the summary from a locally saved gemspec file. This will work in both airgap and non-airgap environments.

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

* Adds test for reading description from local gemspec file.

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

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

* Bump version to 5.21.18 by Chef Expeditor

Obvious fix; these changes are the result of automation not creative thinking.

* Fix omnibus build which is picking ruby 2.7.4 which has vulnerability (#6341)

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

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

* Bump version to 5.21.19 by Chef Expeditor

Obvious fix; these changes are the result of automation not creative thinking.

* Bump version to 5.21.20 by Chef Expeditor

Obvious fix; these changes are the result of automation not creative thinking.

* Update CHANGELOG.md with details from pull request #6341

Obvious fix; these changes are the result of automation not creative thinking.

* Revert "CFINSPEC-240 Extended file format support for waivers (#6193)" (#6366)

This reverts commit b7ddac9dcc.

* Bump version to 5.21.21 by Chef Expeditor

Obvious fix; these changes are the result of automation not creative thinking.

* Revert the nokogiri dependency from omnibus project configuration (#6372)

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

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

* Bump version to 5.21.22 by Chef Expeditor

Obvious fix; these changes are the result of automation not creative thinking.

* CFINSPEC-553: Fix failing verify pipeline builds on ruby 3.0 (#6378)

* bundle install without kitchen group from Gemfile as verify pipeline is breaking for ruby 3.0 as Chef 18 requires to be work with ruby 3.1. In future we will be removing the support for ruby 3.0 as Chef 18 never released with ruby 3.0

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

* Removes all excluded groups from the bundle config set which was removed from the Gemfile.

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

* Exclude the gem dependencies for kitchen for omnibus builds

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

* Exclude the kitchen dependencies on windows platform too

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

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

* Bump version to 5.21.23 by Chef Expeditor

Obvious fix; these changes are the result of automation not creative thinking.

* Ruby 3.1 support: Adds ucrt platform to resolve windows omnibus build. (#6381)

* Adds the ucrt platform support for Windows

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

* Adds the environment variable to ignore artifactory proxy as some gem are getting 500 error when tries to download from artifactory

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

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

* Bump version to 5.21.24 by Chef Expeditor

Obvious fix; these changes are the result of automation not creative thinking.

* CFINSPEC-240 Extended file format support for waivers: JSON & CSV (#6369)

* Revert "Revert "CFINSPEC-240 Extended file format support for waivers (#6193)" (#6366)"

This reverts commit 30146e07fe.

* Waiver support for csv and json

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

* Removed the word excel from image tag

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

* Update waivers.md

Signed-off-by: Ian Maddaus <ian.maddaus@progress.com>

Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
Signed-off-by: Ian Maddaus <ian.maddaus@progress.com>
Co-authored-by: Ian Maddaus <ian.maddaus@progress.com>

* Bump version to 5.21.25 by Chef Expeditor

Obvious fix; these changes are the result of automation not creative thinking.

* CFINSPEC-542 Bug fix for profiles with dependent profiles (#6377)

* Matching semver using regex to determine profile name without version in dsl logic

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

* Testing for selecting control using version in require control dsl

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

* Documentation for using version with profile name when including or selecting controls in a profile

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

* Commenting in dsl library about logic for fetching version and matching it

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

* Comment for regex used to fetch version

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

* Minor improvement for regex variable placement

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

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

* Bump version to 5.21.26 by Chef Expeditor

Obvious fix; these changes are the result of automation not creative thinking.

* Bump version of omnibus-software (#6385)

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

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

* Bump version to 5.21.27 by Chef Expeditor

Obvious fix; these changes are the result of automation not creative thinking.

* Add ruby-msys2-devkit as dependency and check (#6391)

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

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

* adding new private verify, as this will kick off the expeditor bump version (#6397)

Signed-off-by: Sean Simmons <ssimmons@progress.com>

Signed-off-by: Sean Simmons <ssimmons@progress.com>

* Bump version to 5.21.28 by Chef Expeditor

Obvious fix; these changes are the result of automation not creative thinking.

* Update copyright year in README (#6395)

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

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

* Bump version to 5.21.29 by Chef Expeditor

Obvious fix; these changes are the result of automation not creative thinking.

* Executed '.expeditor/update_dockerfile.sh'

Obvious fix; these changes are the result of automation not creative thinking.

* CFINSPEC-522: Remove rake tasks which are no longer used (#6367)

* CLEAN-UP: Remove unused rake tasks
missing, kitchen and version tasks are not used

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

* CLEAN-UP: Remove functional rake test
test:default covers both unit and functional tests
default was introduced to cover both functional and unit in PR #4102

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

* CLEAN-UP: Remove unused docs related tasks

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

* CLEAN-UP: Remove tasks/* from expeditor config

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

* REVERT: Undo deletion of functional test

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

* RECOVER: Retain docs:cli task

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

* UNDO: Revert changes to config

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

* CHORE: Add reference to this PR in note for future use

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

---------

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

* RAKE TEST: Fix rake task for docs:cli

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

* DOCS: Generate cli.md with rake docs:cli

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

* Remove unused require

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

* FORMAT: Use html dl, dt, dd tags for displaying subcommands

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

* REFACTOR: Remove repetitive dl closing for subcommands of single command

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

* Bump version to 5.21.30 by Chef Expeditor

Obvious fix; these changes are the result of automation not creative thinking.

* CFINSPEC-573: Fix for mongo_session resources prints debug level of information in output of the run result. (#6401)

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

* Updates release process docs as per current changes (#6398)

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

* Bump version to 5.21.31 by Chef Expeditor

Obvious fix; these changes are the result of automation not creative thinking.

* Bump version to 5.21.32 by Chef Expeditor

Obvious fix; these changes are the result of automation not creative thinking.

* CFINSPEC-576 : Fix profile gem dependency loading issue when dependent gem is required inside profile libraries. (#6408)

* Test profile consist of custom resource which has a gem dependency

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

* CFINSPEC-576 Fix for profile gem depedency loading issue if depedent gem is required in libraries files of the profile

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

* Fix windows test failure for profile gem dependency

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

---------

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

* Bump version to 5.21.33 by Chef Expeditor

Obvious fix; these changes are the result of automation not creative thinking.

* CFINSPEC-580 Dependent profiles fix for any scheme of version used in profiles (#6410)

* Dependent profiles fix for any scheme of version used in profiles

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

* Dependent profile fix when version is blank in dependent profiles

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

---------

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

* Bump version to 5.21.34 by Chef Expeditor

Obvious fix; these changes are the result of automation not creative thinking.

* Formatting fixes for podman docs (#6386)

* Formatting fixes for podman docs

Signed-off-by: Ian Maddaus <ian.maddaus@progress.com>

* Minor fix

Signed-off-by: Ian Maddaus <ian.maddaus@progress.com>

* Update docs-chef-io/content/inspec/resources/podman.md

Signed-off-by: Ian Maddaus <ian.maddaus@progress.com>

Co-authored-by: Vasundhara Jagdale <vasundhara.jagdale@chef.io>

* Update docs-chef-io/content/inspec/resources/podman.md

Signed-off-by: Ian Maddaus <ian.maddaus@progress.com>

Co-authored-by: Vasundhara Jagdale <vasundhara.jagdale@chef.io>

---------

Signed-off-by: Ian Maddaus <ian.maddaus@progress.com>
Co-authored-by: Vasundhara Jagdale <vasundhara.jagdale@chef.io>

* Bump version to 5.21.35 by Chef Expeditor

Obvious fix; these changes are the result of automation not creative thinking.

* CFINSPEC-550 Add RHEL9 to build matrix (#6403)

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

* Bump omnibus-software from `6a13693` to `225e357` in /omnibus (#6442)

Bumps [omnibus-software](https://github.com/chef/omnibus-software) from `6a13693` to `225e357`.
- [Release notes](https://github.com/chef/omnibus-software/releases)
- [Commits](6a13693685...225e3576c4)

---
updated-dependencies:
- dependency-name: omnibus-software
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump version to 5.21.36 by Chef Expeditor

Obvious fix; these changes are the result of automation not creative thinking.

* Bump omnibus from `c66e97c` to `cf97613` in /omnibus (#6423)

Bumps [omnibus](https://github.com/chef/omnibus) from `c66e97c` to `cf97613`.
- [Release notes](https://github.com/chef/omnibus/releases)
- [Commits](c66e97c211...cf97613115)

---
updated-dependencies:
- dependency-name: omnibus
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump version to 5.21.37 by Chef Expeditor

Obvious fix; these changes are the result of automation not creative thinking.

* Bump kitchen-vagrant from 1.12.1 to 1.14.1 in /omnibus (#6427)

Bumps [kitchen-vagrant](https://github.com/opscode/kitchen-vagrant) from 1.12.1 to 1.14.1.
- [Release notes](https://github.com/opscode/kitchen-vagrant/releases)
- [Changelog](https://github.com/test-kitchen/kitchen-vagrant/blob/main/CHANGELOG.md)
- [Commits](https://github.com/opscode/kitchen-vagrant/compare/v1.12.1...v1.14.1)

---
updated-dependencies:
- dependency-name: kitchen-vagrant
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump version to 5.21.38 by Chef Expeditor

Obvious fix; these changes are the result of automation not creative thinking.

* Bump test-kitchen from 3.3.2 to 3.5.0 in /omnibus (#6360)

Bumps [test-kitchen](https://github.com/test-kitchen/test-kitchen) from 3.3.2 to 3.5.0.
- [Release notes](https://github.com/test-kitchen/test-kitchen/releases)
- [Changelog](https://github.com/test-kitchen/test-kitchen/blob/main/CHANGELOG.md)
- [Commits](https://github.com/test-kitchen/test-kitchen/commits/v3.5.0)

---
updated-dependencies:
- dependency-name: test-kitchen
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump version to 5.21.39 by Chef Expeditor

Obvious fix; these changes are the result of automation not creative thinking.

* Bump rack from 2.2.4 to 2.2.6.2 in /omnibus (#6388)

Bumps [rack](https://github.com/rack/rack) from 2.2.4 to 2.2.6.2.
- [Release notes](https://github.com/rack/rack/releases)
- [Changelog](https://github.com/rack/rack/blob/main/CHANGELOG.md)
- [Commits](https://github.com/rack/rack/compare/2.2.4...v2.2.6.2)

---
updated-dependencies:
- dependency-name: rack
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump version to 5.21.40 by Chef Expeditor

Obvious fix; these changes are the result of automation not creative thinking.

* Revert "adding new private verify, as this will kick off the expeditor bump version (#6397)" (#6479)

This reverts commit 227b0f2d35.

* Bump version to 5.21.41 by Chef Expeditor

Obvious fix; these changes are the result of automation not creative thinking.

* CHEF-1458 Multiple values changes in SimpleConfig library (#6489)

* Simple config changes to return array of values with multiple values opt

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

* New option added to split multiple values with a delimiter regex

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

---------

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

* Bump version to 5.21.42 by Chef Expeditor

Obvious fix; these changes are the result of automation not creative thinking.

* Adds configuration required for sonarqube integration. (#6480)

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

* Bump version to 5.21.43 by Chef Expeditor

Obvious fix; these changes are the result of automation not creative thinking.

* Add nftables resources (#6499)

* Fix systemd path for Leap image

Signed-off-by: Jeremy JACQUE <jeremy.jacque@algolia.com>

* Use vhef client version 17 as doocker cookbook do not support >= 18

Signed-off-by: Jeremy JACQUE <jeremy.jacque@algolia.com>

* Add nftables resource

Signed-off-by: Jeremy JACQUE <jeremy.jacque@algolia.com>

* Add nftables tests

Signed-off-by: Jeremy JACQUE <jeremy.jacque@algolia.com>

* Add fixtures for nftables tests

Signed-off-by: Jeremy JACQUE <jeremy.jacque@algolia.com>

* enable nftables only when attr is true - then disable iptables

Signed-off-by: Jeremy JACQUE <jeremy.jacque@algolia.com>

* By default test iptables, not nftables

Signed-off-by: Jeremy JACQUE <jeremy.jacque@algolia.com>

* Fix tests and lint errors

Signed-off-by: Jeremy JACQUE <jeremy.jacque@algolia.com>

* Increase unit test coverage for nftables

Signed-off-by: Jeremy JACQUE <jeremy.jacque@algolia.com>

* Do not use -nn nft option as behaviour changes based on nft version

Signed-off-by: Jeremy JACQUE <jeremy.jacque@algolia.com>

* Base nft params identification on its version, not os version

    Signed-off-by: Jeremy JACQUE <jeremy.jacque@algolia.com>

* Make test more human friendly by reversing unless/if logic

    Signed-off-by: Jeremy JACQUE <jeremy.jacque@algolia.com>

* Update mocked cmds with nft params

    Signed-off-by: Jeremy JACQUE <jeremy.jacque@algolia.com>

* Fix quoting issue with rubocop

Signed-off-by: Jeremy JACQUE <jeremy.jacque@algolia.com>

* Fix uninitiallized class vars

Signed-off-by: Jeremy JACQUE <jeremy.jacque@algolia.com>

* Fix unit test by adding nft version mocking

Signed-off-by: Jeremy JACQUE <jeremy.jacque@algolia.com>

* Clean nftables doc

Signed-off-by: Jeremy JACQUE <jeremy.jacque@algolia.com>

---------

Signed-off-by: Jeremy JACQUE <jeremy.jacque@algolia.com>

* Bump version to 5.21.44 by Chef Expeditor

Obvious fix; these changes are the result of automation not creative thinking.

* Clarify key_rsa docs regarding SSH keys (#6507)

* Clarify that an RSA resource can only work on RSA keypairs

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

* Update docs-chef-io/content/inspec/resources/key_rsa.md

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

Co-authored-by: Ian Maddaus <IanMadd@users.noreply.github.com>

---------

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
Co-authored-by: Ian Maddaus <IanMadd@users.noreply.github.com>

* CHEF-2438 Add train-kubernetes to inspec gemspec (#6512)

* Add train-kubernetes to inspec gemspec, fix spacing

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

* Fix failing test to detect system plugins

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

---------

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
Co-authored-by: Vasu1105 <vasundhara.jagdale@chef.io>

* Bump version to 5.22.0 by Chef Expeditor

Obvious fix; these changes are the result of automation not creative thinking.

* Bump omnibus from `cf97613` to `ae855f3` in /omnibus (#6515)

Bumps [omnibus](https://github.com/chef/omnibus) from `cf97613` to `ae855f3`.
- [Release notes](https://github.com/chef/omnibus/releases)
- [Commits](cf97613115...ae855f3060)

---
updated-dependencies:
- dependency-name: omnibus
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump rack from 2.2.6.2 to 2.2.6.4 in /omnibus (#6490)

Bumps [rack](https://github.com/rack/rack) from 2.2.6.2 to 2.2.6.4.
- [Release notes](https://github.com/rack/rack/releases)
- [Changelog](https://github.com/rack/rack/blob/main/CHANGELOG.md)
- [Commits](https://github.com/rack/rack/compare/v2.2.6.2...v2.2.6.4)

---
updated-dependencies:
- dependency-name: rack
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump version to 5.22.1 by Chef Expeditor

Obvious fix; these changes are the result of automation not creative thinking.

* Bump omnibus-software from `225e357` to `f06bbea` in /omnibus (#6508)

Bumps [omnibus-software](https://github.com/chef/omnibus-software) from `225e357` to `f06bbea`.
- [Release notes](https://github.com/chef/omnibus-software/releases)
- [Commits](225e3576c4...f06bbea744)

---
updated-dependencies:
- dependency-name: omnibus-software
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* fix: ensure Invoke-WebRequest headers can be configured (#6484)

* fix: ensure Invoke-WebRequest headers can be configured

Signed-off-by: Adrian Mlodzianowski <amlodzianowski@logicworks.net>

* fix: use array for custom headers

Signed-off-by: Adrian Mlodzianowski <amlodzianowski@logicworks.net>

* test: add unit test for Windows simple HTTP request with headers

Signed-off-by: Adrian Mlodzianowski <amlodzianowski@logicworks.net>

---------

Signed-off-by: Adrian Mlodzianowski <amlodzianowski@logicworks.net>
Co-authored-by: Adrian Mlodzianowski <amlodzianowski@logicworks.net>

* Bump version to 5.22.2 by Chef Expeditor

Obvious fix; these changes are the result of automation not creative thinking.

* For #6493 : Add postgres_session support for custom port with a socket connection (#6494)

* Add support for custom port with a socket connection

Signed-off-by: Pg <pg.developper.fr@gmail.com>

* Add tests for the postgres_session with custom port

Signed-off-by: Pg <pg.developper.fr@gmail.com>

---------

Signed-off-by: Pg <pg.developper.fr@gmail.com>

* Bump version to 5.22.3 by Chef Expeditor

Obvious fix; these changes are the result of automation not creative thinking.

* Update host resource to resolve all ipaddresses (#6481)

Signed-off-by: Alan Foster <alan@alanfoster.me>

* CHEF-1631 Clarify that command timeout default was withdrawn (#6511)

* Clarify that command timeout default was withdrawn

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

* Delete reference to timeout default entirely.

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

Co-authored-by: Ian Maddaus <IanMadd@users.noreply.github.com>

---------

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
Co-authored-by: Ian Maddaus <IanMadd@users.noreply.github.com>

* Bump version to 5.22.4 by Chef Expeditor

Obvious fix; these changes are the result of automation not creative thinking.

* Executed '.expeditor/update_dockerfile.sh'

Obvious fix; these changes are the result of automation not creative thinking.

* Update rspec to 3.12 (#6523)

Update RSpec dependency. There are some fixes and no breaking changes in 3.12

Signed-off-by: Phil Pirozhkov <hello@fili.pp.ru>

* Bump version to 5.22.5 by Chef Expeditor

Obvious fix; these changes are the result of automation not creative thinking.

* Update Docker base image to be ubuntu 22.04 (#6526)

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

* Update CHANGELOG.md with details from pull request #6526

Obvious fix; these changes are the result of automation not creative thinking.

* SUPPORT: Update dockerfile for m1 support (#6541)

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

* Update CHANGELOG.md with details from pull request #6541

Obvious fix; these changes are the result of automation not creative thinking.

* Bump omnibus from `ae855f3` to `9c0643a` in /omnibus (#6543)

Bumps [omnibus](https://github.com/chef/omnibus) from `ae855f3` to `9c0643a`.
- [Release notes](https://github.com/chef/omnibus/releases)
- [Commits](ae855f3060...9c0643a3a4)

---
updated-dependencies:
- dependency-name: omnibus
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump version to 5.22.6 by Chef Expeditor

Obvious fix; these changes are the result of automation not creative thinking.

* Bump berkshelf from 8.0.2 to 8.0.7 in /omnibus (#6530)

Bumps [berkshelf](https://github.com/chef/berkshelf) from 8.0.2 to 8.0.7.
- [Changelog](https://github.com/chef/berkshelf/blob/main/CHANGELOG.md)
- [Commits](https://github.com/chef/berkshelf/compare/v8.0.2...v8.0.7)

---
updated-dependencies:
- dependency-name: berkshelf
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump version to 5.22.7 by Chef Expeditor

Obvious fix; these changes are the result of automation not creative thinking.

* Bump omnibus-software from `f06bbea` to `4b08f0b` in /omnibus (#6548)

Bumps [omnibus-software](https://github.com/chef/omnibus-software) from `f06bbea` to `4b08f0b`.
- [Commits](f06bbea744...4b08f0bc06)

---
updated-dependencies:
- dependency-name: omnibus-software
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump version to 5.22.8 by Chef Expeditor

Obvious fix; these changes are the result of automation not creative thinking.

* YAML reporter test fix (#6563)

* Fix for yaml reporter data, not matching empty values with spaces

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

* Additional comment to document affecting fields

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

---------

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

* Bump version to 5.22.9 by Chef Expeditor

Obvious fix; these changes are the result of automation not creative thinking.

* Add inspec-6 branch to Dependabot monitoring. This change must be made on main for Dependabot to pick it up. (#6569)

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

* Update CHANGELOG.md with details from pull request #6569

Obvious fix; these changes are the result of automation not creative thinking.

* CHEF-4115 Added ability to merge reporter configurations from both CLI and config (#6568)

* Added ability to merge cli and config reporter options

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

* Test cases to validate working of reporter configuration using cli and config

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

* Documentation change to add information on reporter configurations usage with both

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

* Added Doc review changes and text fixture for config json

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

* Verify fix

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

* Verify pipeline test fixes for reporter options to be read successfully

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

* Test changes in both cli and config reporter usage scenarios to fix verify pipeline

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

* Review comments to improvise

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

* Renamed testing fixture file for reporter cli config file

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

---------

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

* Bump version to 5.22.10 by Chef Expeditor

Obvious fix; these changes are the result of automation not creative thinking.

* EULA: Update installer license text (#6582)

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

* Bump version to 5.22.11 by Chef Expeditor

Obvious fix; these changes are the result of automation not creative thinking.

* CHEF-5200 Waived controls are not getting waived (skipped) in case of failure at resource level. (#6588)

* CHEF-5200: This fix applies waiver if exception occurs while eval the control inside control block. This ensures that waiver are got applied in case of resouce level failures too.

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

* When waiver file is empty error should be raised the written is invalid for the empty waiver file.
Added different test to check only_if waiver is applied when the waived control in the waived file has expired.

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

* Fix lint

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

* Fix test failing on windows due to different exit code on the Windows.

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

---------

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

* Bump version to 5.22.12 by Chef Expeditor

Obvious fix; these changes are the result of automation not creative thinking.

* remove kitchen group

* keep waiver refactoring for inspec-6

Signed-off-by: Sathish <sbabu@progress.com>

---------

Signed-off-by: Takuya Noguchi <takninnovationresearch@gmail.com>
Signed-off-by: Marijus Ravickas <marijus.ravickas@gmail.com>
Signed-off-by: Sonu Saha <sonu.saha@progress.com>
Signed-off-by: Deepa Kumaraswamy <dkumaras@progress.com>
Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Soumyodeep Karmakar <soumyo.k13@gmail.com>
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
Signed-off-by: Sathish <sbabu@progress.com>
Signed-off-by: dtheyer <davidheyer2016@gmail.com>
Signed-off-by: Magruder, Micah <Micah.Magruder@oracle.com>
Signed-off-by: Ian Maddaus <ian.maddaus@progress.com>
Signed-off-by: Sean Simmons <ssimmons@progress.com>
Signed-off-by: Jeremy JACQUE <jeremy.jacque@algolia.com>
Signed-off-by: Adrian Mlodzianowski <amlodzianowski@logicworks.net>
Signed-off-by: Pg <pg.developper.fr@gmail.com>
Signed-off-by: Alan Foster <alan@alanfoster.me>
Signed-off-by: Phil Pirozhkov <hello@fili.pp.ru>
Co-authored-by: Takuya N <takninnovationresearch@gmail.com>
Co-authored-by: Chef Expeditor <chef-ci@chef.io>
Co-authored-by: Marijus Ravickas <marijus.ravickas@gmail.com>
Co-authored-by: Sonu Saha <98935583+ahasunos@users.noreply.github.com>
Co-authored-by: Deepa Kumaraswamy <dkumaras@progress.com>
Co-authored-by: Vasundhara Jagdale <vasundhara.jagdale@chef.io>
Co-authored-by: Nikita Mathur <Nik08@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Soumyodeep Karmakar <63713087+soumyo13@users.noreply.github.com>
Co-authored-by: Clinton Wolfe <clintoncwolfe@gmail.com>
Co-authored-by: dtheyer <davidheyer2016@gmail.com>
Co-authored-by: Micah Magruder <micah.magruder@cerner.com>
Co-authored-by: Ian Maddaus <ian.maddaus@progress.com>
Co-authored-by: sean-simmons-progress <111799713+sean-simmons-progress@users.noreply.github.com>
Co-authored-by: Sonu Saha <sonu.saha@progress.com>
Co-authored-by: Ian Maddaus <IanMadd@users.noreply.github.com>
Co-authored-by: jjacque <jeremy.jacque@algolia.com>
Co-authored-by: amlodzianowski <adrianmlodzianowski@gmail.com>
Co-authored-by: Adrian Mlodzianowski <amlodzianowski@logicworks.net>
Co-authored-by: Pg <pg.developper.fr@gmail.com>
Co-authored-by: Alan Foster <alan@alanfoster.me>
Co-authored-by: Phil Pirozhkov <pirj@users.noreply.github.com>
Co-authored-by: Nikita Mathur <nikita.mathur@chef.io>
2023-08-14 09:15:07 -04:00
Clinton Wolfe
eff13369f1
CHEF-4115 Added ability to merge reporter configurations from both CLI and config (#6568) (#6579)
* Added ability to merge cli and config reporter options



* Test cases to validate working of reporter configuration using cli and config



* Documentation change to add information on reporter configurations usage with both



* Added Doc review changes and text fixture for config json



* Verify fix



* Verify pipeline test fixes for reporter options to be read successfully



* Test changes in both cli and config reporter usage scenarios to fix verify pipeline



* Review comments to improvise



* Renamed testing fixture file for reporter cli config file



---------

Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
Co-authored-by: Nikita Mathur <Nik08@users.noreply.github.com>
2023-07-25 08:45:42 -04:00
Vasundhara Jagdale
dfb0172992
Adds test for licensing_config (#57)
* Adds test for licensing_config

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

Fix lint

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

Read the value of license server url from env for test

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

* Spell InSpec corrrectly in test

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

* Linting

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

---------

Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
Co-authored-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2023-07-06 21:24:05 -04:00
Clinton Wolfe
a3028b1fc8
For #6493 : Add postgres_session support for custom port with a socket connection (#6494) (#40)
* Add support for custom port with a socket connection



* Add tests for the postgres_session with custom port



---------

Signed-off-by: Pg <pg.developper.fr@gmail.com>
Co-authored-by: Pg <pg.developper.fr@gmail.com>
2023-07-04 16:05:25 -04:00
Sathish Babu
4ec735d09d
CHEF 83 Revert attestations changes (#47)
* revert attestation related files

Signed-off-by: Sathish <sbabu@progress.com>

* revert attestation changes to existing files

Signed-off-by: Sathish <sbabu@progress.com>

* update signature

Signed-off-by: Sathish <sbabu@progress.com>

---------

Signed-off-by: Sathish <sbabu@progress.com>
2023-05-30 20:09:29 +05:30
Sonu Saha
b4648e0193
CHEF-1458 Multiple values changes in SimpleConfig library (#6489) (#28)
* Simple config changes to return array of values with multiple values opt



* New option added to split multiple values with a delimiter regex



---------

Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
Co-authored-by: Nikita Mathur <Nik08@users.noreply.github.com>
2023-05-17 20:47:02 -04:00
Clinton Wolfe
4fce6845e5
Add nftables resources (#6499) (#44)
* Fix systemd path for Leap image



* Use vhef client version 17 as doocker cookbook do not support >= 18



* Add nftables resource



* Add nftables tests



* Add fixtures for nftables tests



* enable nftables only when attr is true - then disable iptables



* By default test iptables, not nftables



* Fix tests and lint errors



* Increase unit test coverage for nftables



* Do not use -nn nft option as behaviour changes based on nft version



* Base nft params identification on its version, not os version

    Signed-off-by: Jeremy JACQUE <jeremy.jacque@algolia.com>

* Make test more human friendly by reversing unless/if logic

    Signed-off-by: Jeremy JACQUE <jeremy.jacque@algolia.com>

* Update mocked cmds with nft params

    Signed-off-by: Jeremy JACQUE <jeremy.jacque@algolia.com>

* Fix quoting issue with rubocop



* Fix uninitiallized class vars



* Fix unit test by adding nft version mocking



* Clean nftables doc



---------

Signed-off-by: Jeremy JACQUE <jeremy.jacque@algolia.com>
Co-authored-by: jjacque <jeremy.jacque@algolia.com>
2023-05-17 20:45:57 -04:00
Clinton Wolfe
dd9dccd84e
Update host resource to resolve all ipaddresses (#6481) (#39)
Signed-off-by: Alan Foster <alan@alanfoster.me>
Co-authored-by: Alan Foster <alan@alanfoster.me>
2023-05-17 20:45:04 -04:00
Clinton Wolfe
1ab146d028
fix: ensure Invoke-WebRequest headers can be configured (#6484) (#41)
* fix: ensure Invoke-WebRequest headers can be configured



* fix: use array for custom headers



* test: add unit test for Windows simple HTTP request with headers



---------

Signed-off-by: Adrian Mlodzianowski <amlodzianowski@logicworks.net>
Co-authored-by: amlodzianowski <adrianmlodzianowski@gmail.com>
Co-authored-by: Adrian Mlodzianowski <amlodzianowski@logicworks.net>
2023-05-17 20:44:15 -04:00
Clinton Wolfe
cfde3f5bd8
CHEF-2438 Add train-kubernetes to inspec gemspec (#6512) (#43)
* Add train-kubernetes to inspec gemspec, fix spacing



* Fix failing test to detect system plugins



---------

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
Co-authored-by: Vasu1105 <vasundhara.jagdale@chef.io>
2023-05-17 20:33:27 -04:00
Vasundhara Jagdale
699d73993c
Licensing - Integrates Software Entitlement (#13)
* CFINSPEC-24:Integrate License Software Entitlment.

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

* CFINSPEC-506 license execution check

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

* Software entitlement call changes and handling of error

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

* Error handling from chef licensing error to standard error

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

* Updated Gemfile to pick the chef licensing changes from git url

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

* Trying with https url

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

* Revert "Trying with https url"

This reverts commit 33f1f4c0ecacf9ba2826e25e55b41219903ea736.

* Adds the license not entitled exit code

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

* Updates the require statement

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

* Fix typo

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

* Set the licensing configure for entitlement id failure

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

* Use ChefLicensing::Error instead of standard error

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

* REFACTOR Move out licensing cong=fig to its own file and make unconditional

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

* FIX TESTS - Add reference to licensing config for places where we call runner explicitly.

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

* Update inputs_test to use license configuration from utils

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

---------

Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
Co-authored-by: Nikita Mathur <nikita.mathur@chef.io>
Co-authored-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2023-03-27 10:26:35 -04:00
Vasundhara Jagdale
530d2d1ef2
CFINSPEC-580 Dependent profiles fix for any scheme of version used in profiles (#6410) (#6468)
* Dependent profiles fix for any scheme of version used in profiles



* Dependent profile fix when version is blank in dependent profiles



---------

Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
Co-authored-by: Nikita Mathur <Nik08@users.noreply.github.com>
2023-02-27 14:04:02 +05:30
Vasundhara Jagdale
ee35f4ed08
CFINSPEC-576 : Fix profile gem dependency loading issue when dependent gem is required inside profile libraries. (#6408) (#6467)
* Test profile consist of custom resource which has a gem dependency



* CFINSPEC-576 Fix for profile gem depedency loading issue if depedent gem is required in libraries files of the profile



* Fix windows test failure for profile gem dependency



---------

Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
2023-02-27 14:01:37 +05:30
Vasundhara Jagdale
812001abcc
CFINSPEC-542 Bug fix for profiles with dependent profiles (#6377) (#6435)
* Matching semver using regex to determine profile name without version in dsl logic



* Testing for selecting control using version in require control dsl



* Documentation for using version with profile name when including or selecting controls in a profile



* Commenting in dsl library about logic for fetching version and matching it



* Comment for regex used to fetch version



* Minor improvement for regex variable placement

Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
Co-authored-by: Nikita Mathur <Nik08@users.noreply.github.com>
2023-02-26 20:37:28 +05:30
Nikita Mathur
440934ca13
Foreport 6369 to inspec-6 Extended file format support for waivers: JSON & CSV only (#6371)
* Revert "Revert "CFINSPEC-240 Extended file format support for waivers (#6193)" (#6366)"

This reverts commit 30146e07fe.

* Waiver support for csv and json

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

* Removed the word excel from image tag

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

* Removed excel file format support for attestations file (#6370)

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

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

* Update waivers.md

Signed-off-by: Ian Maddaus <ian.maddaus@progress.com>

---------

Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
Signed-off-by: Ian Maddaus <ian.maddaus@progress.com>
Co-authored-by: Ian Maddaus <ian.maddaus@progress.com>
2023-02-26 19:27:02 +05:30
Vasundhara Jagdale
35f8c4829f
CFINSPEC-533: Fix undefined method 'summary' for Gem::SourceFetchProblem (NoMethodError) when airgapped (#6337) (#6434)
* This fixes the undefined method 'summary' for #<Gem::SourceFetchProblem:0x000000000139dc70> (NoMethodError) while invoking any inspec command if the custom plugin is installed and if inspec commands are run in an air gap environment.
This fix removes an earlier call for getting gem specification from rubygems.org which is the cause for above error and replaces it with fetching the summary from a locally saved gemspec file. This will work in both airgap and non-airgap environments.



* Adds test for reading description from local gemspec file.

Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
2023-02-24 17:47:19 +05:30
Vasundhara Jagdale
4376365304
Fix env smoke test by updating ERB.new in inspec env; add additional test (#6342) (#6440)
* Failing test for Ruby 3.1 - ERB.new call options changed



* Fix for Ruby 3.1 by using named params to ERB.new



* Restrict test to non-windows systems



* Restrict test to non-windows systems

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
Co-authored-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2023-02-24 17:42:42 +05:30
Nikita Mathur
3d54b17049
Upgraded mock ubuntu test from 20.04 to 22.04 (#6456)
Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
2023-02-24 16:00:19 +05:30
Vasundhara Jagdale
1e1e804b87
Prevent negative status from crashing launchd service resource (#6262) (#6433)
Signed-off-by: dtheyer <davidheyer2016@gmail.com>
Co-authored-by: dtheyer <davidheyer2016@gmail.com>
2023-02-24 15:12:38 +05:30