Commit graph

1509 commits

Author SHA1 Message Date
Clinton Wolfe
a15280fcc5
Merge pull request #5937 from inspec/vasundhara/fix-postgres-session-resource
CFINSPEC-154: postgres_session resource allow query errors to be treat as failures.
2022-03-23 09:44:06 -04:00
Clinton Wolfe
03d0f2374b
Merge pull request #5935 from inspec/ss/resource-cgroup
CFINSPEC-73: Add cgroup resource
2022-03-23 09:39:32 -04:00
Clinton Wolfe
4c351b00c8
Merge pull request #5931 from inspec/ss/resource-ppa
CFINSPEC-82: Add ppa resource
2022-03-23 09:36:48 -04:00
Sonu Saha
4f151bd72c CFINSPEC-73: Add unit test and relevant files for cgroup
Signed-off-by: Sonu Saha <sonu.saha@progress.com>
2022-03-23 08:40:34 +05:30
Sonu Saha
c5a66f58a6 CFINSPEC-73: Initial draft of cgroup resource
Signed-off-by: Sonu Saha <sonu.saha@progress.com>
2022-03-23 07:54:11 +05:30
Nikita Mathur
0f4ccee07e Oracle session resource fix when empty results and zero rows
Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
2022-03-22 17:05:31 +05:30
Nikita Mathur
a8716f8dda More build fixes and pr review changes
Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
2022-03-22 15:52:45 +05:30
Vasu1105
2d0d972d65 CFINSPEC-154: Updates postgres_session resource to raise exception only in case of connection and authentication error and allow any errors in query to be fetched using output property(keeping earlier behaviour).
Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
2022-03-22 15:12:44 +05:30
Nikita Mathur
311c22c062 webmock test cases fix for loader and installer tests
Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
2022-03-21 19:08:36 +05:30
Sonu Saha
5f3570ee7a CFINSPEC-82: Add unit test and documentation for ppa resource
Signed-off-by: Sonu Saha <sonu.saha@progress.com>
2022-03-17 22:59:16 +05:30
Sonu Saha
73920f76bc CFINSPEC-79: Raise exceptions and add relevant unit test for unsupported os
Signed-off-by: Sonu Saha <sonu.saha@progress.com>
2022-03-16 16:47:55 +05:30
Sonu Saha
ee9bbeb03c CFINSPEC-79: Add unit test for non existing container
Signed-off-by: Sonu Saha <sonu.saha@progress.com>
2022-03-16 15:34:47 +05:30
Sonu Saha
36bf43f350 CFINSPEC-79: Add unit test and its related changes for lxc resource
Signed-off-by: Sonu Saha <sonu.saha@progress.com>
2022-03-16 15:34:47 +05:30
Sonu Saha
24b8f13708 CFINSPEC-79: Initial draft for lxc resource
Signed-off-by: Sonu Saha <sonu.saha@progress.com>
2022-03-16 15:34:47 +05:30
Vasu1105
6e930303a4 Fix test
Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
2022-03-11 17:31:08 +05:30
Vasu1105
ab01652ee2 CFINSPEC-137: Fix the failing test and lint for the --target-option deprication changes
Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
2022-03-11 15:47:50 +05:30
Clinton Wolfe
63a5fd26a6
Merge pull request #5597 from mitre/firewalld_update
Firewalld update -- exposed more fields, updated docs, added custom matchers
2022-03-10 15:40:17 -05:00
Clinton Wolfe
b6b2fd385b
Merge pull request #5915 from inspec/nm/remove-cloud-resources
CFINSPEC-129 Removed cloud resources ( AWS & Azure ) from inspec-core
2022-03-10 15:24:59 -05:00
Clinton Wolfe
571d84fabd
Merge pull request #5914 from inspec/vasundhara/add-entitlement-id-to-profile-metadata-file
CFINSPEC-26: Adds entitlement_id field in metadata file
2022-03-10 09:41:18 -05:00
Clinton Wolfe
e3108aabf0
Merge pull request #5891 from inspec/vasundhara/add-cron-resource
CFINSPEC-74 Adds the cron resource.
2022-03-10 09:37:23 -05:00
Clinton Wolfe
105ed49b43
Merge pull request #5909 from inspec/vasundhara/fix-breaking-test-on-windows
Fix failing test for ibmdb2_session resource.
2022-03-10 09:35:08 -05:00
Nikita Mathur
41ba05f901 Removed aws and azure resources, unit and integration tests
Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
2022-03-10 19:24:52 +05:30
Vasu1105
419285130c Fix failing test for ibmdb2_session resource.
Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
2022-03-10 17:53:18 +05:30
Vasu1105
195de004e1 CFINSPEC-26: Adds entitlement_id field in metadata file
Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
2022-03-10 13:26:13 +05:30
Clinton Wolfe
4a63319840
Merge pull request #5871 from inspec/vasundhara/support-profile-gem-dependency
CFINSPEC-13:  Adds support for specifying gem dependencies in the metadata file of InSpec Profile.
2022-03-09 19:44:05 -05:00
Will Dower
23d1749ee8 merging in master
Signed-off-by: Will Dower <wdower@mitre.org>
2022-03-07 15:53:10 -05:00
Clinton Wolfe
edf019b0df Fixed json unit test
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2022-03-04 09:41:40 -05:00
Clinton Wolfe
3d8f5f9553 Revert "Revert "CFINSPEC-70 Added resource_id attribute for the custom resources in the base class""
This reverts commit 302bccf732.
2022-03-04 09:15:52 -05:00
Clinton Wolfe
524aa15af0 Add validation and testing for the same
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2022-03-04 00:34:46 -05:00
Vasu1105
9a561bce54 CFINSPEC-13: Adds code to handle all kinds of version constraint and improved installed gem search logic for the version constraint.
Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
2022-03-04 00:34:46 -05:00
Vasu1105
b3f4c9c70a CFINSPEC-13 Added check so that the adding gem to vendor set block will get called on Windows. Renamed the metadata file parameter name to provide gem dependencies.
Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
2022-03-04 00:34:46 -05:00
Vasu1105
b1ce116ebb CFINSPEC-13: Adds the support to load the gem dependencies from dependent profiles.
Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
2022-03-04 00:34:46 -05:00
Vasu1105
e3ef2cb912 CFINSPEC-13: Adds the ability to install and load the gem depedencies specified in the metadata file of profile/resource pack.
Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
2022-03-04 00:34:46 -05:00
Clinton Wolfe
302bccf732
Revert "CFINSPEC-70 Added resource_id attribute for the custom resources in the base class" 2022-03-03 23:48:32 -05:00
Sonu Saha
ccdfcd0445 CFINSPEC-66 : Add unit test for unsupported os:ipfilter resource
Signed-off-by: Sonu Saha <sonu.saha@progress.com>
2022-03-03 13:37:35 -05:00
Sonu Saha
7c874e67df CFINSPEC-66 : Add Ipfilter resource
Signed-off-by: Sonu Saha <sonu.saha@progress.com>
2022-03-03 13:37:34 -05:00
Sonu Saha
7b2d076899 CFINSPEC-77 : Add Ipnat resource-cleanup
Signed-off-by: Sonu Saha <sonu.saha@progress.com>
2022-03-03 13:16:28 -05:00
Sonu Saha
437abc866c CFINSPEC-77 : Add ipnat resource
Signed-off-by: Sonu Saha <sonu.saha@progress.com>
2022-03-03 13:16:28 -05:00
Nikita Mathur
607d765d16 Subtle fix in resource_id definition and documentation updated
Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
2022-03-03 12:26:13 -05:00
Nikita Mathur
1e292900bd Resource id method changed to instance method and documentation added
Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
2022-03-03 12:26:13 -05:00
Nikita Mathur
8b8b4db2b2 Resource id attribute added for the resources in the base class
Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
2022-03-03 12:26:13 -05:00
Nikita Mathur
19057252ec cassandra unit test fix for windows
Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
2022-03-03 15:31:08 +05:30
Vasu1105
993211c9b4 CFINSPEC-74 Adds the cron resource.
Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
2022-02-28 19:42:33 +05:30
Vasu1105
8d76db6828 Fix yaml reporter test on Windows.
Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
2022-02-10 11:22:32 +05:30
Clinton Wolfe
6d04576331
Merge pull request #5828 from inspec/vasundhara/fix_sestatus_command_for_amazon_linux
CFINSPEC-30 Fix sestatus command not found error on Amazon Linux 2
2022-02-09 04:10:31 -05:00
Clinton Wolfe
c065e923c3
Merge pull request #5782 from inspec/nm/kernel-params
CFINSPEC-3 Added kernel_parameters resource
2022-02-09 03:52:01 -05:00
Vasu1105
0d7f2c11fd Updated the condition to only verify the amazon linux os.
Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
2022-02-08 14:04:22 +05:30
Clinton Wolfe
cd4f0b59a0
Merge pull request #5816 from inspec/vasundhara/allow-core-resource-inheritance
CFINSPEC-15 Allows inheritance of core resource into the custom resource.
2022-02-01 16:11:44 -05:00
Vasu1105
d8798eca83 add custom resource in the registry at the reloading of dsl
Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
2022-01-31 19:10:27 +05:30
Nikita Mathur
ec35c6042a Fix to capture non indented grub conf values
Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
2022-01-24 19:19:43 +05:30
Clinton Wolfe
34f4ffa19f
Merge pull request #5777 from inspec/nm/ip-table-rule
IP Table resource: Added option to ignore rule comments
2022-01-20 10:08:29 -05:00
Clinton Wolfe
19fb98f00f
Merge pull request #5775 from inspec/vasundhara/add_new_property_file_resource
Adds user_permissions property and be_inherited matcher to the file resource for Windows.
2022-01-20 09:54:20 -05:00
Vasu1105
56c388f099 Renamed the matcher to be_inherited.
Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
2022-01-12 15:26:40 +05:30
Vasu1105
96249f24af Renamed users_permissions to user_permissions and added docs.
Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
2022-01-12 15:26:40 +05:30
Vasu1105
4bfef5281f Renamed the file_permissions property to users_permission
Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
2022-01-12 15:26:40 +05:30
Vasu1105
53ef84c8dd Adds property file_permissions and be_inherit matcher to the file resource for Windows.
Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
2022-01-12 15:26:40 +05:30
Vasu1105
bc9cdc1219 Renamed the matcher to be_inherited.
Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
2022-01-12 15:25:45 +05:30
Vasu1105
084bf70392 Adds user_permissions property to list user or group permissions on registry key and adds be_inherit matcher to check whether inheritance is enabled on the registry key
Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
2022-01-12 15:25:44 +05:30
Clinton Wolfe
3664b0c47d
Merge pull request #5758 from inspec/nm/timezone-resource
Added Timezone Resource
2022-01-09 20:45:15 -05:00
Clinton Wolfe
97c4002e82
Merge pull request #5771 from inspec/nm/package-latest
Check for latest - package resource
2022-01-09 20:28:55 -05:00
Nikita Mathur
4b9692c6fd Added kernel parameters resource
Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
2021-12-31 14:57:57 +05:30
Nikita Mathur
13b8eceff8 Ip tables ignore rules comments option added for the resource
Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
2021-12-27 18:19:08 +05:30
Nikita Mathur
5a3c73b521 Fix for parsing faulty multiline results
Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
2021-12-24 16:41:53 +05:30
Nikita Mathur
d1cee33462 Test fixes
Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
2021-12-22 13:48:07 +05:30
Nikita Mathur
b0794c2262 Latest package info test cases for resource
Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
2021-12-21 16:40:58 +05:30
Vasu1105
13fa3e930d Raises error for Connection error.
Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
2021-12-17 16:28:10 +05:30
Vasu1105
b4ccc15121 Adds tls1.3 support in ssl resource.
Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
2021-12-17 16:28:10 +05:30
Nikita Mathur
2d798c3b32 Fix: Alpine packages list command to only list installed packages
Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
2021-12-13 16:02:18 +05:30
Nikita Mathur
4743da84f7 Added windows platform support for timezone resource
Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
2021-12-07 18:16:46 +05:30
Nikita Mathur
4008af0be8 Implemented timezone resource to test timezone configuration values
Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
2021-12-06 14:38:15 +05:30
Nikita Mathur
06779f02e4 Oracle session fix when nil in query output
Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
2021-11-30 16:25:31 +05:30
Nikita Mathur
e122d34a3d Alpine support extended for os based resources
Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
2021-11-24 17:13:54 +05:30
Clinton Wolfe
8730e4acf0
Merge pull request #5606 from zofrex/fix-service-enable-check-freebsd
Fix FreeBSD service enabled check substring edge-case
2021-11-20 02:04:17 -05:00
Kimberly Garmoe
b3b470548c
Merge pull request #5697 from inspec/vasundhara/add-http-for-windows
Add Windows support for http resource.
2021-11-15 17:12:02 -08:00
Clinton Wolfe
497cf9ab98
Merge pull request #5618 from inspec/nm/check-cookstyle
Integrate InSpec check with Cookstyle
2021-10-25 19:32:45 -04:00
Nikita Mathur
2df4f7e433 Fix oracle db session resource issue of csv comma delimiter and sudo invocation message issue
Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
2021-10-22 14:10:51 +05:30
Nikita Mathur
e5f2ede389 Oracle fix when invoking query using os user and db role
Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
2021-10-19 14:43:50 +05:30
Vasu1105
c8495965d8 Fixed indentation and lint issues
Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
2021-10-13 19:27:29 +05:30
Vasu1105
f35eef20ff Adds windows support for http resource. Adopted PR #5280. Updated the code to handle post request,
Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
2021-10-13 18:26:38 +05:30
James 'zofrex' Sanderson
41ea0da4a9 Fix FreeBSD service enabled check substring edge-case
* Now services named a suffix of another service don't have false positives for being enabled
* Use new 'enabled' service command on FreeBSD 10+

Signed-off-by: James 'zofrex' Sanderson <zofrex@gmail.com>
2021-10-13 08:57:51 +01:00
Clinton Wolfe
0bfb0bc648
Merge pull request #5667 from inspec/nm/group-user-sensitive
Group & User Resources - Resolve name case-sensitivity issue for windows
2021-10-12 21:05:57 -04:00
Nikita Mathur
09550ed7f3 User groups made case insensitive for user resource for include matcher
Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
2021-10-07 13:32:36 +05:30
Clinton Wolfe
6414e3a5ab
Merge pull request #5681 from inspec/vasundhara/update-tests-files
Update the unit test files to use latest versions of OS rather than the older.
2021-10-05 22:02:22 -04:00
Clinton Wolfe
a79be0ca96
Merge pull request #5683 from inspec/nm/cassandra-resource
Add support for Cassandra DB
2021-10-05 21:55:24 -04:00
Nikita Mathur
62b0d211fa Windows user fetched in user resource without case sensitivity
Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
2021-10-05 15:36:35 +05:30
Nikita Mathur
eb7e7305f4 Members and members array made case insensitive for group resources
Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
2021-10-05 15:36:35 +05:30
Nikita Mathur
964fdacbee Resolve case sensitivity issues with group name in group resource for windows platform
Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
2021-10-05 15:36:35 +05:30
Vasu1105
9b66e2830c Merge branch 'add-http-for-windows-2' of github.com:mbaitelman/inspec into add-http-for-windows 2021-10-01 16:03:55 +05:30
Nikita Mathur
8546595f30 Review changes and build fix
Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
2021-10-01 14:43:37 +05:30
Nikita Mathur
b4ca1914c4 Add support for Cassandra DB resources
Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
2021-09-30 16:09:08 +05:30
Vasu1105
ff65112ab5 Updated test files to use Ubuntu latest version while mocking the OS instead of Ubuntu1804
Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
2021-09-30 15:05:27 +05:30
Vasu1105
86391be836 Updated test files to use Ubuntu latest version while mocking the OS instead of Ubuntu1604
Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
2021-09-30 14:50:03 +05:30
Vasu1105
584bbfa3a3 Updated test files to use Ubuntu latest version while mocking the OS instead of Ubuntu1404 whereever required.
Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
2021-09-30 14:26:43 +05:30
Nikita Mathur
bedde88849 Integrate inspec check with cookstyle
Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
2021-09-29 13:23:35 +05:30
Vasu1105
fe555a3780 Remove the unit test added for Ubuntu using older version i.e 15.04.
Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
2021-09-29 12:53:58 +05:30
Clinton Wolfe
baf653282a
Merge pull request #5671 from inspec/vasundhara/fix-opa-resources
Fix opa_cli and opa_api resource unable to verify empty result {}
2021-09-28 08:18:09 -04:00
Vasu1105
04c1af6a24 Fixed lint
Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
2021-09-28 12:13:18 +05:30
Clinton Wolfe
86e7da02a1
Merge pull request #5664 from inspec/nm/postgres-socket
Add option in `postgres_session` resource to establish socket connection
2021-09-28 00:30:49 -04:00
Vasu1105
63e7eb5395 Fix opa_api and opa_cli resource to handle empty result
Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
2021-09-22 16:23:12 +05:30
Vasu1105
cc0d86a185 Add csv without headers support in csv resource
Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
2021-09-16 15:56:07 +05:30