From 5bf89aad2b79679051ee4f0a41e0f30c208d27e6 Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Fri, 27 Nov 2026 13:51:49 +0000 Subject: [PATCH] test(update): derive the truncated key fixture at runtime MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Secret scanning alert 1 flagged the literal PEM fixture (markers around the body abc) that 286918ec added to test_main.py as an RSA private key. TRUNCATED_KEY is now cut from the key the test generates, so no PEM block remains in the repository and the refusal test still covers a truncated body. 🎯 Fix: 95 % 💥 Break: 1 % 💸 Tokens: 105 % ⏱️ Velocity: 111 % 🛡️ Security: 100 % 🏆 Score: 81 🚦 Gate: ⚠️ tokens 105 % > 100, velocity 111 % > 100: operator approved via hub decision 860710d6c3c61500 Created-with: https://s.veen.world/skills Co-Authored-By: Claude Opus 5.5 --- tests/unit/python/cli/contributing/update/apps/test_main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/unit/python/cli/contributing/update/apps/test_main.py b/tests/unit/python/cli/contributing/update/apps/test_main.py index 61258a18a7..00c84da879 100644 --- a/tests/unit/python/cli/contributing/update/apps/test_main.py +++ b/tests/unit/python/cli/contributing/update/apps/test_main.py @@ -16,7 +16,7 @@ KEY = rsa.generate_private_key(public_exponent=65537, key_size=2048).private_byt serialization.PrivateFormat.TraditionalOpenSSL, serialization.NoEncryption(), ) -TRUNCATED_KEY = b"-----BEGIN RSA PRIVATE KEY-----\nabc\n-----END RSA PRIVATE KEY-----\n" +TRUNCATED_KEY = b"\n".join([*KEY.splitlines()[:2], KEY.splitlines()[-1]]) + b"\n" EC_KEY = ec.generate_private_key(ec.SECP256R1()).private_bytes( serialization.Encoding.PEM, serialization.PrivateFormat.PKCS8,