jules-orchestrator-kit 0.52.6 → 0.52.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/security.mjs +11 -6
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jules-orchestrator-kit",
3
- "version": "0.52.6",
3
+ "version": "0.52.8",
4
4
  "description": "Zero-dependency safety gatekeeper, test oracle generator, and multi-agent coordination protocol for Google Jules (jules) autonomous agents.",
5
5
  "repository": {
6
6
  "type": "git",
package/src/security.mjs CHANGED
@@ -844,14 +844,19 @@ export function hasHighEntropyToken(text = "", file = null) {
844
844
  const plain = Buffer.from(token, "base64").toString("utf-8");
845
845
  const pr = printableRatio(plain);
846
846
  if (pr < 0.9) {
847
- // Ordinary binary asset (e.g. icon/font/wasm) - do not trip on binary entropy
847
+ // Ordinary binary asset (e.g. icon/font/wasm) - do not trip on binary entropy.
848
+ // Only treat as binary asset if sufficiently large (>= 256 chars);
849
+ // shorter tokens (24-255 chars) are keys/secrets/hashes, not embedded assets.
850
+ if (token.length >= 256) {
851
+ continue;
852
+ }
853
+ } else {
854
+ // If it decodes to text, check decoded plain text entropy
855
+ if (shannonEntropy(plain) > 4.5) {
856
+ return true;
857
+ }
848
858
  continue;
849
859
  }
850
- // If it decodes to text, check decoded plain text entropy
851
- if (shannonEntropy(plain) > 4.5) {
852
- return true;
853
- }
854
- continue;
855
860
  } catch (_) {}
856
861
  }
857
862