From e1a7b4423e6cd3cdc5764f08a1a2d034ff785391 Mon Sep 17 00:00:00 2001 From: anupamme Date: Mon, 7 Sep 2026 13:18:00 +0000 Subject: [PATCH] fix: fix security issue in fhelp-impl.kap API keys are hardcoded in source files that are distributed to end users via WASM modules --- wasm/kap/standard-lib/fhelp-impl.kap | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wasm/kap/standard-lib/fhelp-impl.kap b/wasm/kap/standard-lib/fhelp-impl.kap index 39f0b08..7f38b6b 100644 --- a/wasm/kap/standard-lib/fhelp-impl.kap +++ b/wasm/kap/standard-lib/fhelp-impl.kap @@ -3255,10 +3255,10 @@ m ← m map:with "http:post" " ∇ gemini query { ⍝ curl with your apikey to see the list of models: - ⍝ https://generativelanguage.googleapis.com/v1beta/models?key=AI... + ⍝ https://generativelanguage.googleapis.com/v1beta/models?key=YOUR_API_KEY model ← \"gemini-2.5-flash-preview-05-20\" url ← \"https://generativelanguage.googleapis.com/v1beta/models/\", model, \":generateContent?key=\" - apikey ← \"AI..................................VyY\" ⍝ your API key goes here + apikey ← env:get \"GEMINI_API_KEY\" ⍝ set this environment variable to your own API key target_url ← url, apikey input ← \"{\\\"contents\\\":[{\\\"parts\\\":[{\\\"text\\\":\\\"\", query, \"\\\"}]}]}\" headrs ← \"Accept\" \"application/json\"