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

helm_pull: Silence false no_log warning #796

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

colshine1
Copy link

@colshine1 colshine1 commented Nov 22, 2024

SUMMARY

Apply no_log=True to pass_credentials to silence false positive warning.

Fixes similar issue to: #423

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

changelog/fragements/796-false-positive-helmull.yaml
plugins/modules/helm_pull.py

Copy link

Copy link

Copy link
Contributor

@yurnov yurnov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

confirmed that even in module_utils we have no_logs=True and password not appear in module output, it's a false positive warning

@yurnov
Copy link
Contributor

yurnov commented Nov 24, 2024

Hi @colshine1,

please update the integration test with the following:
https://github.com/ansible-collections/kubernetes.core/blob/cd686316e9b3af6df67c19027b573b27468234e3/tests/integration/targets/helm_pull/tasks/main.yml#L170C1-L182C61

please add

              - '"Module did not set no_log for pass_credentials" not in _result.warnings'

Copy link

Copy link
Contributor

@yurnov yurnov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@@ -189,7 +189,7 @@ def main():
repo_password=dict(
type="str", no_log=True, aliases=["password", "chart_repo_password"]
),
pass_credentials=dict(type="bool", default=False),
pass_credentials=dict(type="bool", default=False, no_log=True),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
pass_credentials=dict(type="bool", default=False, no_log=True),
pass_credentials=dict(type="bool", default=False, no_log=False),

This should be False since this is a false positive.

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.

3 participants