Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed sensitive properties unsuppressed content issue #13014

Merged
merged 7 commits into from
Jul 7, 2022

Conversation

blabade
Copy link
Contributor

@blabade blabade commented Jun 21, 2022

Fixed sensitive properties unsuppressed content issue irrespective of desired state in the resource reporter.

Reference Issue Link - #12359

Signed-off-by: Bapu L bapu.labade@progress.com

Description

  • Added new method inlib/chef/mixin/properties.rb file called sensitive_properties() to return list of sensitive properties irrespective desired_state attribute value (true/false) as current method state_properties() is not returning all the sensitive properties.

  • Added new test cases to verify all the use cases.

Please find below output for same,

`Resource Declaration:
---------------------
# In /Users/blabade/.chef/local-mode-cache/cache/cookbooks/desiredstate_issue/recipes/default.rb

  8: site_status 'test' do
  9:   suppressed_content 'foo'
 10:   unsuppressed_content 'bar'
 11:   action :config
 12: end
 13: 

Compiled Resource:
------------------
# Declared in /Users/blabade/.chef/local-mode-cache/cache/cookbooks/desiredstate_issue/recipes/default.rb:8:in `from_file'

site_status("test") do
  action [:config]
  default_guard_interpreter :default
  declared_type :site_status
  cookbook_name "desiredstate_issue"
  recipe_name "default"
  suppressed_content "*sensitive value suppressed*"
  unsuppressed_content "*sensitive value suppressed*"
end

`

Related Issue

#12359

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Chore (non-breaking change that does not add functionality or fix an issue)

Checklist:

  • I have read the CONTRIBUTING document.
  • I have run the pre-merge tests locally and they pass.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • All commits have been signed-off for the Developer Certificate of Origin.

@blabade blabade requested review from a team as code owners June 21, 2022 14:21
Bapu L added 3 commits June 22, 2022 15:02
Signed-off-by: Bapu L <bapu.labade@progress.com>
Signed-off-by: Bapu L <bapu.labade@progress.com>
@sonarcloud
Copy link

sonarcloud bot commented Jun 27, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@neha-p6
Copy link
Collaborator

neha-p6 commented Jun 29, 2022

@blabade Please do a rebase instead of merge to pull latest changes from upstream.

@blabade
Copy link
Contributor Author

blabade commented Jun 30, 2022

@blabade Please do a rebase instead of merge to pull latest changes from upstream.

Noted, Thanks !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants