Skip to content

Comments

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

Merged
alvneiayu merged 2 commits intobitnami-labs:mainfrom
RaveNoX:sprig-controller-exposure
Mar 27, 2025
Merged

Fix potential controller sensitive data exposure by sprig template functions#1703
alvneiayu merged 2 commits intobitnami-labs:mainfrom
RaveNoX:sprig-controller-exposure

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

tmeijn pushed a commit to tmeijn/dotfiles that referenced this pull request Jun 13, 2025
This MR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [bitnami-labs/sealed-secrets](https://github.com/bitnami-labs/sealed-secrets) | minor | `v0.29.0` -> `v0.30.0` |

MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot).

**Proposed changes to behavior should be submitted there as MRs.**

---

### Release Notes

<details>
<summary>bitnami-labs/sealed-secrets (bitnami-labs/sealed-secrets)</summary>

### [`v0.30.0`](https://github.com/bitnami-labs/sealed-secrets/blob/HEAD/RELEASE-NOTES.md#v0300)

[Compare Source](bitnami-labs/sealed-secrets@v0.29.0...v0.30.0)

-   Bump golang to 1.24.4 ([#&#8203;1743](bitnami-labs/sealed-secrets#1743))
-   Fix typo in RBAC namespaced roles documentation ([#&#8203;1720](bitnami-labs/sealed-secrets#1720))
-   Bump to go1.24.1 ([#&#8203;1713](bitnami-labs/sealed-secrets#1713))
-   Fix potential controller sensitive data exposure by sprig template functions ([#&#8203;1703](bitnami-labs/sealed-secrets#1703))
-   Bump golang.org/x/crypto from 0.38.0 to 0.39.0 ([#&#8203;1742](bitnami-labs/sealed-secrets#1742))
-   Bump k8s.io/client-go from 0.33.0 to 0.33.1 ([#&#8203;1734](bitnami-labs/sealed-secrets#1734))
-   Bump k8s.io/api from 0.33.0 to 0.33.1 ([#&#8203;1733](bitnami-labs/sealed-secrets#1733))
-   Bump k8s.io/code-generator from 0.33.0 to 0.33.1 ([#&#8203;1732](bitnami-labs/sealed-secrets#1732))
-   Bump golang.org/x/crypto from 0.37.0 to 0.38.0 ([#&#8203;1731](bitnami-labs/sealed-secrets#1731))
-   Bump k8s.io/client-go from 0.32.3 to 0.33.0 ([#&#8203;1729](bitnami-labs/sealed-secrets#1729))
-   Bump k8s.io/code-generator from 0.32.3 to 0.33.0 ([#&#8203;1728](bitnami-labs/sealed-secrets#1728))
-   Bump k8s.io/api from 0.32.3 to 0.33.0 ([#&#8203;1730](bitnami-labs/sealed-secrets#1730))
-   Bump golang.org/x/net from 0.37.0 to 0.38.0 in the go_modules group ([#&#8203;1725](bitnami-labs/sealed-secrets#1725))
-   Bump github.com/prometheus/client_golang from 1.21.1 to 1.22.0 ([#&#8203;1724](bitnami-labs/sealed-secrets#1724))
-   Bump github.com/onsi/gomega from 1.36.3 to 1.37.0 ([#&#8203;1722](bitnami-labs/sealed-secrets#1722))
-   Bump github.com/onsi/ginkgo/v2 from 2.23.3 to 2.23.4 ([#&#8203;1723](bitnami-labs/sealed-secrets#1723))
-   Bump golang.org/x/crypto from 0.36.0 to 0.37.0 ([#&#8203;1721](bitnami-labs/sealed-secrets#1721))

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever MR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this MR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box

---

This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MC41Mi4wIiwidXBkYXRlZEluVmVyIjoiNDAuNTIuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiUmVub3ZhdGUgQm90Il19-->
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