Skip to content

Fix potential controller sensitive data exposure by sprig template functions #1703

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

Merged
merged 2 commits into from
Mar 27, 2025

Conversation

RaveNoX
Copy link
Contributor

@RaveNoX RaveNoX commented Mar 14, 2025

Description of the change

Fixing potential controller environment exposure by removing some sprig template functions:

  • env, expandenv - controller environment variables exposure (which can contain sensitive data)
  • getHostByName - add possibility to resolve dns entries from templates, which is not secure in some cases

This potential exposure is added by PR #1542 where security risks was described in "possible drawbacks" section.

Also, sprig func map is now initialized due module initialization and reusing for rendering, which may improve performance.

In fact is just port of the argocd solution, which described in initial PR #1542

Benefits

  • Fix potential controller sensitive data exposure
  • Improve rendering performance

Possible drawbacks

No one

Applicable issues

Additional information

@RaveNoX RaveNoX force-pushed the sprig-controller-exposure branch from 92cecc9 to 6521a86 Compare March 14, 2025 09:58
@alvneiayu alvneiayu merged commit ab00d33 into bitnami-labs:main Mar 27, 2025
15 checks passed
@alvneiayu
Copy link
Collaborator

thanks a lot for your work @RaveNoX

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.

2 participants