Commit graph

89 commits

Author SHA1 Message Date
Vasundhara Jagdale
f7f35594bc
Upgrade declared minimum ruby version in gemspec from 2.4.0 to 3.0.3 (#6790)
* Upgrade ruby version in gempsec file

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

* Update to support ruby >= 3.0.3

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

---------

Signed-off-by: Vasu1105 <vasundhara.jagdale@progress.com>
2023-12-12 20:54:28 +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
Vasundhara Jagdale
bd55c1ab3a
Upgrade chef-licensing version pinning (#6856)
Signed-off-by: Vasu1105 <vasundhara.jagdale@progress.com>
2023-11-09 09:16:48 -05:00
Vasundhara Jagdale
e161ee87f8
Thor recent release 1.3.0 has changes related to aliases(https://github.com/rails/thor/pull/800) which started breaking the test. Till we find if recent release is stable and don't break any functionality we are pinning thor to < 1.3.0 (#6815)
Signed-off-by: Vasu1105 <vasundhara.jagdale@progress.com>
2023-10-23 13:00:00 -04:00
Clinton Wolfe
968f3b2639
CHEF-2627 Clarify License Description on Rubygems (#6630)
* Add a pair of files describing the relationship between the Chef EULA and the Apache 2.0 license, intended to be referenced from rubygems.org

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

* Add message to rubygems.org description of all 4 gems describing relationship between the two licenses

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

* Insert the full text of the Apache 2.0 license into the gem description on the advice of Legal

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

* Update README with message clarifying relationship between the two licenses

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

* Removes the full text of the Apache 2 license, which after clarification is not
in fact required to be in the rubygems description.

This reverts commit 4d02573f59.

* LINTING - adjust text markers

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

* LINTING - training whitespace

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

* Remove the word 'below' when refering to the inclusion of the Apache 2.0 license

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

* Add Chef-EULA to list of included files to inspec-core

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

---------

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2023-10-11 12:54:24 -04:00
dependabot[bot]
99fc6e9c44
Update hashie requirement from >= 3.4, < 5.0 to >= 3.4, < 6.0 (#6696)
Updates the requirements on [hashie](https://github.com/hashie/hashie) to permit the latest version.
- [Release notes](https://github.com/hashie/hashie/releases)
- [Changelog](https://github.com/hashie/hashie/blob/master/CHANGELOG.md)
- [Commits](https://github.com/hashie/hashie/compare/v3.4.0...v5.0.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-29 17:02:25 +05:30
Vasu1105
ac9927e32d Moves chef-licensing gem dependency to inspec gemspec file
Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
2023-08-22 10:30:07 -04:00
Phil Pirozhkov
9cae58d02b
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>
2023-06-05 17:47:26 -04:00
Soumyodeep Karmakar
965a5df1a2
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>
2022-11-23 13:08:29 +05:30
Vasundhara Jagdale
612e1c21b4
Update Faraday gem (#6267)
Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>

Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
2022-10-19 20:56:19 +05:30
Takuya N
5be10c0ea2
Replace faraday_middleware with faraday-follow_redirects (#6238)
faraday_middleware was already DEPRECATED in 2022-01.
Only FaradayMiddleware::FollowRedirects from faraday_middleware has been
used, and so we can replace it with faraday-follow_redirects.

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

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

Signed-off-by: Takuya Noguchi <takninnovationresearch@gmail.com>
2022-10-19 09:57:15 -04:00
Clinton Wolfe
e6c66d0398 Add dependencies on train 3.10.0 for podman support
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2022-06-28 00:33:58 -04:00
Clinton Wolfe
0dc2a9da1d
Merge pull request #5837 from inspec/vasundhara/support-rsepc-3-11
CFINSPEC-45: Update rspec version to 3.11
2022-02-21 13:18:27 -05:00
Vasu1105
18ec1992a2 CFINSPEC-45 Update rspec version to 3.11
Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
2022-02-17 11:39:44 +05:30
Vasu1105
6137577066 Update ruby version in gemspec file
Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
2022-02-10 11:22:32 +05:30
Tim Smith
48ff852289 Remove support for EOL Ruby 2.5
With the release of Ruby 3.1, Ruby 2.5 is now EOL. We should not be supporting an EOL release of Ruby.

Signed-off-by: Tim Smith <tsmith@chef.io>
2021-12-31 22:54:53 -05:00
Clinton Wolfe
62c5f2c1cf Move rake and cookstyle deps out of inspec core gemspec
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2021-11-17 22:47:49 -05:00
Clinton Wolfe
d8a2000fdb Move cookstyle dep from inspec gemspec to inspec-core, add rake
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2021-11-13 00:28:33 -05:00
Tim Smith
89848feedb Make sure we use chef-telemetry 1.0.8+
This version drops the http dep which greatly reduces the overall size
of deps.

Signed-off-by: Tim Smith <tsmith@chef.io>
2021-04-30 12:17:41 -07:00
dependabot-preview[bot]
c1102dd2ab
Update faraday requirement from >= 0.9.0, < 1.4 to >= 0.9.0, < 1.5
Updates the requirements on [faraday](https://github.com/lostisland/faraday) to permit the latest version.
- [Release notes](https://github.com/lostisland/faraday/releases)
- [Changelog](https://github.com/lostisland/faraday/blob/main/CHANGELOG.md)
- [Commits](https://github.com/lostisland/faraday/compare/v0.9.0...v1.4.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-04-19 07:06:54 +00:00
Clinton Wolfe
a87c9452a2 Pin back parslet to avoid conflict with toml in chef infra
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2021-01-26 12:18:35 -05:00
Clinton Wolfe
2b5c67e065 Add faraday_middleware to gemspec
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2021-01-25 12:45:25 -05:00
Tim Smith
cfee7ce474 Allow for rspec 3.9 in the gemspec
rspec 3.10 is causing issues with chef/chef tests due to changes in
rspec-mock that we're working to resolve. Right now we'd like to get the
latest inspec releases into chef/chef w/o the need for rspec 3.10. At
runtime inspec doesn't need 3.10, but it does need it for tests, so
let's make sure we bring it in via the gemfile, but allow the older 3.9
release at runtime.

Signed-off-by: Tim Smith <tsmith@chef.io>
2021-01-12 13:51:17 -08:00
dependabot-preview[bot]
9a83544e3a
Update faraday requirement from >= 0.9.0, < 1.2 to >= 0.9.0, < 1.4
Updates the requirements on [faraday](https://github.com/lostisland/faraday) to permit the latest version.
- [Release notes](https://github.com/lostisland/faraday/releases)
- [Changelog](https://github.com/lostisland/faraday/blob/master/CHANGELOG.md)
- [Commits](https://github.com/lostisland/faraday/compare/v0.9.0...v1.3.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-01-01 07:02:24 +00:00
dependabot-preview[bot]
66a1f56944
Update parslet requirement from ~> 1.5 to >= 1.5, < 3.0
Updates the requirements on [parslet](https://github.com/kschiess/parslet) to permit the latest version.
- [Release notes](https://github.com/kschiess/parslet/releases)
- [Changelog](https://github.com/kschiess/parslet/blob/master/HISTORY.txt)
- [Commits](https://github.com/kschiess/parslet/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-12-21 19:17:40 +00:00
Clinton Wolfe
cdfb325ca3 Apply chefstyle -a, and manually remove duplicate requires
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2020-12-21 13:25:04 -05:00
Clinton Wolfe
fcadb9792f Update functional tests to work with rspec 3.10+
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2020-12-21 12:24:24 -05:00
Tim Smith
981dbf75ff Require ruby 2.5+ / allow ruby 3
The currently ruby requirement is going to break things when we pull
Ruby 3 into Chef Infra Client next year.

Signed-off-by: Tim Smith <tsmith@chef.io>
2020-12-18 07:08:02 -08:00
dependabot-preview[bot]
a0b2507dc8
Update faraday requirement from >= 0.9.0, < 1.1 to >= 0.9.0, < 1.2
Updates the requirements on [faraday](https://github.com/lostisland/faraday) to permit the latest version.
- [Release notes](https://github.com/lostisland/faraday/releases)
- [Changelog](https://github.com/lostisland/faraday/blob/master/CHANGELOG.md)
- [Commits](https://github.com/lostisland/faraday/compare/v0.9.0...v1.1.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-12-17 07:06:26 +00:00
Clinton Wolfe
1bde2619f1
Update rubyzip requirement from ~> 1.2, >= 1.2.2 to >= 1.2.2, < 3.0 2020-12-16 10:47:36 -05:00
Clinton Wolfe
e6d5acc547
Update tomlrb requirement from ~> 1.2.0 to >= 1.2, < 2.1 2020-12-16 10:44:50 -05:00
dependabot-preview[bot]
c66b38e280
Update tomlrb requirement from ~> 1.2.0 to >= 1.2, < 2.1
Updates the requirements on [tomlrb](https://github.com/fbernier/tomlrb) to permit the latest version.
- [Release notes](https://github.com/fbernier/tomlrb/releases)
- [Changelog](https://github.com/fbernier/tomlrb/blob/master/CHANGELOG.md)
- [Commits](https://github.com/fbernier/tomlrb/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-12-16 07:35:50 +00:00
dependabot-preview[bot]
e4f73d9b5e
Update hashie requirement from ~> 3.4 to >= 3.4, < 5.0
Updates the requirements on [hashie](https://github.com/hashie/hashie) to permit the latest version.
- [Release notes](https://github.com/hashie/hashie/releases)
- [Changelog](https://github.com/hashie/hashie/blob/master/CHANGELOG.md)
- [Commits](https://github.com/hashie/hashie/compare/v3.4.0...v4.1.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-12-16 07:31:57 +00:00
dependabot-preview[bot]
fe9a1c8dd5
Update rubyzip requirement from ~> 1.2, >= 1.2.2 to >= 1.2.2, < 3.0
Updates the requirements on [rubyzip](https://github.com/rubyzip/rubyzip) to permit the latest version.
- [Release notes](https://github.com/rubyzip/rubyzip/releases)
- [Changelog](https://github.com/rubyzip/rubyzip/blob/master/Changelog.md)
- [Commits](https://github.com/rubyzip/rubyzip/compare/v1.2.2...v2.3.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-12-16 07:31:15 +00:00
Tim Smith
ae6a078c7d Parallel restored Ruby 2.4 support so unpin it
There's no need to pin here

Signed-off-by: Tim Smith <tsmith@chef.io>
2020-12-09 10:45:58 -08:00
Tim Smith
7a35751269 Remove the dependency on json_schemer
It looks like we're only using this in 3 test files and it conflicts
with new RuboCop releases, which is blocking us shipping that new
release in Chef Infra Client and Workstation

Signed-off-by: Tim Smith <tsmith@chef.io>
2020-12-01 14:17:12 -08:00
Nick Schwaderer
a6a4e61371 Bumps parallel for ruby 2.4 issue
Signed-off-by: Nick Schwaderer <nschwaderer@chef.io>
2020-11-10 10:08:01 +00:00
James Stocks
cb6c311846 Pin rspec to 3.9
Fixes #5296

rspec 3.10.0 introduces text changes to test outputs. Let's keep it pinned - we don't need to keep rspec current.

Signed-off-by: James Stocks <jstocks@chef.io>
2020-11-02 11:03:59 +00:00
Nick Schwaderer
a08bd0466f
Merge pull request #5181 from inspec/ns/bump_faraday
Bump faraday dependencies
2020-09-14 17:31:38 +01:00
Tim Smith
d2775e6b69 Allow license-acceptance 2.x gem dep
This release bumps the tty deps so we can bring in newer versions of
those libs in chef and workstation.

Signed-off-by: Tim Smith <tsmith@chef.io>
2020-08-27 11:18:33 -07:00
Nick Schwaderer
36022c603d Bump faraday dependencies
There are several outstanding issues about bumping faraday and
faraday_middleware. This gives us access to additional HTTP methods and
the versions we are pinned to are quite old.

Fixes #4234

Signed-off-by: Nick Schwaderer <nschwaderer@chef.io>
2020-08-27 12:38:43 +01:00
Nick Schwaderer
d1042bc7d4
Merge pull request #5202 from inspec/readme
Don't ship the readme in the gem
2020-08-17 11:47:01 +01:00
Tim Smith
cfcf21482b Don't ship the readme in the gem
We're just deleting this from chef and workstation anyways. It's buried deep in the install directory and doesn't do anyone any good.

Signed-off-by: Tim Smith <tsmith@chef.io>
2020-08-13 13:49:20 -07:00
Tim Smith
9053ad621b Remove htmlentities dependency
#4853 has been closed and I can find this being used anywhere in the codebase.

Signed-off-by: Tim Smith <tsmith@chef.io>
2020-08-13 13:26:17 -07:00
Tim Smith
5e56fb57bf Remove unused term-ansicolor
I went to swap this for pastel, but in the end I couldn't find where it was actually used.

Signed-off-by: Tim Smith <tsmith@chef.io>
2020-08-12 19:15:54 -07:00
Nick Schwaderer
5dd999229b Pin json_schemer to maintain Ruby 2.4 support
Signed-off-by: Nick Schwaderer <nschwaderer@chef.io>
2020-07-16 13:44:32 +01:00
James Stocks
9766cbd249 Fix tomlrb dependency
We need to avoid tomlrb 1.3.0 - fixes https://github.com/inspec/inspec/issues/5089

Signed-off-by: James Stocks <jstocks@chef.io>
2020-06-12 09:44:24 +01:00
Clinton Wolfe
b2deb9a4c1 Pin pry to ~> 0.13 to get Pry::Prompt new API to avoid deprecation warning
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2020-04-22 14:57:22 -04:00
Clinton Wolfe
dc5f8f1f64 Loosen gemspec constraint on method_source per tas50
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2020-04-21 16:43:06 -04:00
Nick Schwaderer
4021bb3c62 Bumps method_source dependency version
The `method_source` dependency for inspec-core has not been bumped in
five years, and it is indirectly holding `pry` back elsewhere in the
ecosystem which is causing issues for ruby 2.7+ support.

Signed-off-by: Nick Schwaderer <nschwaderer@chef.io>
2020-04-21 15:39:28 +01:00