Commit graph

465 commits

Author SHA1 Message Date
Ian Maddaus
c9a13ea6a2
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>
2023-02-27 00:02:20 -05:00
Sonu Saha
724b5c5f60 REFACTOR: Remove repetitive dl closing for subcommands of single command
Signed-off-by: Sonu Saha <sonu.saha@progress.com>
2023-02-02 12:45:25 +05:30
Sonu Saha
5d9e023828 FORMAT: Use html dl, dt, dd tags for displaying subcommands
Signed-off-by: Sonu Saha <sonu.saha@progress.com>
2023-02-01 16:32:00 +05:30
Sonu Saha
b59e2cb92a DOCS: Generate cli.md with rake docs:cli
Signed-off-by: Sonu Saha <sonu.saha@progress.com>
2023-01-31 21:31:45 +05:30
Nikita Mathur
74e69e6acd
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>
2023-01-17 07:29:52 -05:00
Nikita Mathur
ae1173c0b3
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>
2023-01-17 07:27:47 -05:00
Nikita Mathur
30146e07fe
Revert "CFINSPEC-240 Extended file format support for waivers (#6193)" (#6366)
This reverts commit b7ddac9dcc.
2023-01-04 16:02:16 +05:30
Nikita Mathur
f2dc49f6ea
CFINSPEC-374 DSL keyword only_applicable_if added (#6229)
* Not applicable if logic addition

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

* Changes from not applicable if to only applicable if

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

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

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

* Doc change added for only_applicable_if

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

* Doc Review

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

* Added generic examples that supports cross platform for testing

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

* Yet another build fix due to changes in test

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

Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
Signed-off-by: Deepa Kumaraswamy <dkumaras@progress.com>
Co-authored-by: Deepa Kumaraswamy <dkumaras@progress.com>
2022-09-29 09:44:52 -04:00
Sonu Saha
3bcf4e6544
Enhance lxc resource to test properties (#6243)
* ENHANCE: Extend lxc resource to test the properties

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

* TEST: Extend test for introduced properties

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

* DOCS: Extend test for introduced properties

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

* FIX: Correct exception class to handle bad yaml

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

* Doc Review

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

* FIX: Handle specific exception to handle bad yaml

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

Signed-off-by: Sonu Saha <sonu.saha@progress.com>
Signed-off-by: Deepa Kumaraswamy <dkumaras@progress.com>
Co-authored-by: Deepa Kumaraswamy <dkumaras@progress.com>
2022-09-15 09:23:45 -04:00
Vasundhara Jagdale
183d09c534
Adds podman resources. (#6183)
* CFINSPEC-368 Adds podman resource. Adds PodmanContainerFilter to handle podman.containers plural resource

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

* Fix lint errors

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

* Updated docs

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

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

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

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

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

* CFINSPEC-360 Adds podman_container resource. Adds podman_object module

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

* Fixed the require path

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

* Fixed deprecation warning in unit test

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

* Fixed indentation issue in the docs.

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

* Renamed the methods names

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

* Adds skip resource test

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

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

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

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

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

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

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

* Update podman.networks to fetch only hight level information

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

* Removed style for where it is not required

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

* Lint fix and some code improvisation

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

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

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

* Missing file in earlier commit

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

* Content Review

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

* CFINSPEC-361: Test for podman_image matchers and properties

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

* CFINSPEC-361: Add podman_image matchers and properties

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

* CFINSPEC-361: Documentation for podman_image matchers and properties

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

* CFINSPEC-361: Fix Rubocop lint issues

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

* CFINSPEC-361: Test for more properties

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

* CFINSPEC-361: Add more podman_image properties

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

* CFINSPEC-361: Documentation for podman_image properties

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

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

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

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

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

* CFINSPEC-361: Documentation for inspec_info property

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

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

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

* CFINSPEC-361: Decouple podman_image from podman plural resource

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

* CFINSPEC-361: Modify unit test and reqd fixtures

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

* CFINSPEC-361: Handle nil scenario of inspect_info

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

* CFINSPEC-361: Add missing property: id

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

* CFINSPEC-361: Update documentation

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

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

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

* CFINSPEC-361: Add stderr message in exception

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

* CFINSPEC-361: Remove comment

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

* CFINSPEC-361: Move json_key mapping to a method

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

* Content Review

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

* CFINSPEC-361: Remove exception and add nil

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

* CFINSPEC-351: failing tests for podman_network resource

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

* CFINSPEC-351 Adds podman_network resource properties

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

* Fixed typo in the test

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

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

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

* Uncommented the image test

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

* Update the example for podman_network

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

* Missing test fixture file

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

* Adds doc for podman_network resource

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

* Doc Review

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

* Adds module for podman to group all common methods

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

* LINT: Remove trailing whitespaces (CFINSPEC-351)

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

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

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

* Content Review

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

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

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

* Added support for json format waivers

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

* Added support for xls and xlsx

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

* Build issues and updated description of gems

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

* Doc changes for waivers about supports

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

* Fix added to check final options presense in config

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

* Renamed variables from inputs to waivers

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

* Validation changes with other small changes

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

* Headers validation added for json and yaml

* Linter issues resolved

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

* Some refactoring and message change

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

* exit code check removed from test cases since not req

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

* Doc change for waiver support for excel by showing example

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

Co-authored-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2022-08-01 09:19:35 -04:00
Deepa Kumaraswamy
305ebb0231 Minor changes
Signed-off-by: Deepa Kumaraswamy <dkumaras@progress.com>
2022-07-29 14:31:40 +05:30
Deepa Kumaraswamy
25f08e1625 Minor edits
Signed-off-by: Deepa Kumaraswamy <dkumaras@progress.com>
2022-07-29 14:31:40 +05:30
Nikita Mathur
c8351c9323 Added doc for only if impact change and modified test cases
Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
2022-07-29 14:31:40 +05:30
Clinton Wolfe
7cbaa892cc Corrections
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2022-07-29 14:31:40 +05:30
Deepa Kumaraswamy
9811ef3b7c Query Comments Addressed
Signed-off-by: Deepa Kumaraswamy <dkumaras@progress.com>
2022-07-29 14:31:40 +05:30
Deepa Kumaraswamy
974045d5d7 Content Review
Signed-off-by: Deepa Kumaraswamy <dkumaras@progress.com>
2022-07-29 14:31:38 +05:30
Nikita Mathur
7272d9e4df Enhanced outcome example images renamed
Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
2022-07-29 14:30:59 +05:30
Nikita Mathur
872eaa832a Grammar check for schema options section in cli doc
Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
2022-07-29 14:30:59 +05:30
Nikita Mathur
f59fd6adfb Doc changes for enhanced outcomes
Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
2022-07-29 14:30:59 +05:30
Ian Maddaus
57eca85305 Spellcheck corrections
Signed-off-by: Ian Maddaus <ian.maddaus@progress.com>
2022-07-20 11:46:26 -04:00
Ian Maddaus
e2f54ecf31 Delete azure_virtual_machine_data_disk.md page
Signed-off-by: Ian Maddaus <ian.maddaus@progress.com>
2022-07-20 11:21:15 -04:00
Ian Maddaus
21bc15771f Add k8s section to resources index page
Signed-off-by: Ian Maddaus <ian.maddaus@progress.com>
2022-06-28 11:13:15 -04:00
Clinton Wolfe
e39be8343f Docs edits
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2022-06-28 00:31:29 -04:00
Vasu1105
bcf888320c Updated docs for --podman-url option
Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
2022-06-23 19:28:49 +05:30
Vasu1105
b744da071b Updated docs
Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
2022-06-23 14:54:03 +05:30
Ian Maddaus
23480ff772 Minor text fixes
Signed-off-by: Ian Maddaus <ian.maddaus@progress.com>
2022-06-10 17:53:09 -04:00
Ian Maddaus
22e5d1513e Use shortcodes in text, move shortcodes into inspec subdir
Signed-off-by: Ian Maddaus <ian.maddaus@progress.com>
2022-06-10 16:47:46 -04:00
Ian Maddaus
6e53b15267 Update docs readme
Signed-off-by: Ian Maddaus <ian.maddaus@progress.com>
2022-06-10 16:47:46 -04:00
Ian Maddaus
f1218c19a4 Update Hugo resource archetype
Signed-off-by: Ian Maddaus <ian.maddaus@progress.com>
2022-06-10 16:47:46 -04:00
Ian Maddaus
60f250eee6 Additional changes
Signed-off-by: Ian Maddaus <ian.maddaus@progress.com>
2022-06-10 15:56:37 -04:00
Deepa Kumaraswamy
0685ff603c Typo
Signed-off-by: Deepa Kumaraswamy <dkumaras@progress.com>
2022-06-10 15:56:37 -04:00
Ian Maddaus
6f5c784043 Update docs-chef-io/content/inspec/matchers.md 2022-06-10 15:56:37 -04:00
Deepa Kumaraswamy
92a1909f85 Ian's comments
Signed-off-by: Deepa Kumaraswamy <dkumaras@progress.com>
2022-06-10 15:56:37 -04:00
Deepa Kumaraswamy
dd24c34888 Update docs-chef-io/content/inspec/matchers.md
Co-authored-by: Ian Maddaus <IanMadd@users.noreply.github.com>
2022-06-10 15:56:37 -04:00
Deepa Kumaraswamy
de2b1de596 Update docs-chef-io/content/inspec/matchers.md
Co-authored-by: Ian Maddaus <IanMadd@users.noreply.github.com>
2022-06-10 15:56:37 -04:00
Deepa Kumaraswamy
0e5a1eb138 Some more edits
Signed-off-by: Deepa Kumaraswamy <dkumaras@progress.com>
2022-06-10 15:56:37 -04:00
Deepa Kumaraswamy
7063a74c61 Ian's comments fixes
Signed-off-by: Deepa Kumaraswamy <dkumaras@progress.com>
2022-06-10 15:56:37 -04:00
Deepa Kumaraswamy
3feeab14c2 heading changes
Signed-off-by: Deepa Kumaraswamy <dkumaras@progress.com>
2022-06-10 15:56:37 -04:00
Deepa Kumaraswamy
08397f11c8 Matchers rewrite
Signed-off-by: Deepa Kumaraswamy <dkumaras@progress.com>
2022-06-10 15:56:37 -04:00
Deepa Kumaraswamy
a020e6babb Rewrite
Signed-off-by: Deepa Kumaraswamy <dkumaras@progress.com>
2022-06-10 15:56:37 -04:00
Clinton Wolfe
610e7aacea
Merge pull request #5995 from inspec/vasundhara/sign-profile-binary-format
CFINSPEC-167: Profile Signing Rollup
2022-06-08 17:07:27 -04:00
Clinton Wolfe
97af028ec5 Doc edits for clarification
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2022-06-08 17:00:24 -04:00
Vasu1105
078d1ce898 Updated sign and verify command to directly accept the path of the profile instead of additional option to provide those. Updated docs for the same.
Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
2022-06-02 10:36:50 +05:30
Clinton Wolfe
9e52000088
Merge pull request #6041 from inspec/ss/enhance-x509_certificate-resource
CFINSPEC-95: Enhance `x509_certificate` resource
2022-06-01 09:36:05 -04:00
Deepa Kumaraswamy
054cf22330 Writeup Review for Language
Signed-off-by: Deepa Kumaraswamy <dkumaras@progress.com>
2022-05-27 15:58:14 +05:30
Deepa Kumaraswamy
15f45fdaad Doc Review
Signed-off-by: Deepa Kumaraswamy <dkumaras@progress.com>
2022-05-27 15:40:28 +05:30
Ian Maddaus
0eda6ca5db Remove Hugo version from Netlify config
Signed-off-by: Ian Maddaus <ian.maddaus@progress.com>
2022-05-23 12:14:56 -04:00
Clinton Wolfe
c0bef5931a
Merge pull request #6065 from inspec/im/vale
Add vale config to docs in inspec repository
2022-05-22 23:57:12 -04:00
replicajune
5b0c359269
fixing bad markdown syntax
code blocks don't have specifiers for the closing triple quotes
2022-05-17 15:08:55 -04:00