Strips newlines from AWS host/username secrets#842
Conversation
📝 WalkthroughWalkthroughAll ten Tekton Task YAML files (five templates under Changeshost-info Secret Newline Sanitization
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This test ensures `tr -d '\n\r'` is correctly applied to host and username fields, but *not* to `id_rsa`, within AWS host-access secret templates. This prevents malformed private keys while ensuring host/username values are single-line.
|
thx @abdulazeem-tk4vr for the contribution, can you check the failure it needs to catch the error I think, also can you extend the fix to all tekton tasks not only aws? |
Ensures that
hostandusernamevalues extracted from files for AWS host-access secrets are properly sanitized.Previously, these values could include newline or carriage return characters, leading to incorrect base64 encoding and potential issues when creating Kubernetes Opaque secrets. Adding
tr -d '\n\r'removes these characters, ensuring the secret data is clean and valid.This PR helps close the issue in redhat-developer/mapt - #817