From f254eeb0e96e649d192b7852375de9c548a520de Mon Sep 17 00:00:00 2001 From: Alex Lyn Date: Tue, 23 Sep 2025 11:54:32 +0800 Subject: [PATCH] CI: Keep base64 output is a single line This commit addresses an issue where base64 output, when used with a default configuration, would introduce newlines, causing decoding to fail on the runtime. The fix ensures base64 output is a single, continuous line using the -w0 flag. This guarantees the encoded string is a valid Base64 sequence, preventing potential runtime errors caused by invalid characters. Note that: When you use the base64 command without any parameters, it typically automatically adds newlines to the output, usually every 76 chars. In contrast, base64 -w0 explicitly tells the command not to add any newlines (-w for wrap, and 0 for a width of zero), which results in a continuous string with no whitespace. This is a critical distinction because if you pass a Base64 string with newlines to a runtime, it may be treated as an invalid string, causing the decoding process to fail. Signed-off-by: Alex Lyn --- .../how-to-use-the-kata-agent-policy.md | 22 +++---------------- tests/integration/kubernetes/tests_common.sh | 2 +- 2 files changed, 4 insertions(+), 20 deletions(-) diff --git a/docs/how-to/how-to-use-the-kata-agent-policy.md b/docs/how-to/how-to-use-the-kata-agent-policy.md index 84db5239de..26c446adcf 100644 --- a/docs/how-to/how-to-use-the-kata-agent-policy.md +++ b/docs/how-to/how-to-use-the-kata-agent-policy.md @@ -40,7 +40,7 @@ For example: ```bash $ STRING="$(< allow-all-except-exec-process.rego)" -$ cat <