← safeguard@1.2.2

Propose a patch

A fix the maintainer can act on, with the evidence attached. It opens under your GitHub account in your browser; KillerSkills holds no token and never modifies the package. The fix is verified the only way we verify anything: the next crawl re-runs the new version in the honeypot. 59 · Caution

Evidence

The sandbox observed nothing beyond the static findings; the proposal cites those.

Diff · removes 11 caught lines

Download .patch
diff --git a/skills/safeguard/references/audit-dev-agent.md b/skills/safeguard/references/audit-dev-agent.md
--- a/skills/safeguard/references/audit-dev-agent.md
+++ b/skills/safeguard/references/audit-dev-agent.md
@@ -39,1 +39,0 @@
-‍⁠
diff --git a/skills/safeguard/scripts/lib/toml.mjs b/skills/safeguard/scripts/lib/toml.mjs
--- a/skills/safeguard/scripts/lib/toml.mjs
+++ b/skills/safeguard/scripts/lib/toml.mjs
@@ -8,1 +8,0 @@
-const lines = String(text).replace(/^/, '').split(/\r?\n/);
diff --git a/skills/safeguard/scripts/scan_secrets.mjs b/skills/safeguard/scripts/scan_secrets.mjs
--- a/skills/safeguard/scripts/scan_secrets.mjs
+++ b/skills/safeguard/scripts/scan_secrets.mjs
@@ -11,1 +11,0 @@
-const USAGE = 'Usage: node scan_secrets.mjs <dir> [--home] [--json]\n  --home  also check credential files in your home directory (~/.ssh, ~/.aws, ~/.npmrc, ...)';
diff --git a/skills/safeguard/scripts/mcp_server.mjs b/skills/safeguard/scripts/mcp_server.mjs
--- a/skills/safeguard/scripts/mcp_server.mjs
+++ b/skills/safeguard/scripts/mcp_server.mjs
@@ -54,1 +54,0 @@
-…'Absolute path of the folder'), include_home: bool('Also review ~/.ssh, ~/.aws, ~/.npmrc and similar') }, required: ['path'] }, annotations: RO }, { name: 'render_sca…
diff --git a/skills/safeguard/scripts/lib/common.mjs b/skills/safeguard/scripts/lib/common.mjs
--- a/skills/safeguard/scripts/lib/common.mjs
+++ b/skills/safeguard/scripts/lib/common.mjs
@@ -87,1 +87,0 @@
-return JSON.parse(text.replace(/^/, ''));
diff --git a/skills/safeguard/scripts/lib/patterns.mjs b/skills/safeguard/scripts/lib/patterns.mjs
--- a/skills/safeguard/scripts/lib/patterns.mjs
+++ b/skills/safeguard/scripts/lib/patterns.mjs
@@ -57,1 +57,0 @@
-// code that reads ~/.ssh or browser cookie stores and calls fetch is not.
@@ -74,1 +73,0 @@
-{ id: 'zero-width', sev: 'MEDIUM', re: /[​⁠](?=[\s\S]{0,2000}[​⁠])/, msg: 'Multiple zero-width spaces (possible hidden text)' },
diff --git a/skills/safeguard/scripts/guard.mjs b/skills/safeguard/scripts/guard.mjs
--- a/skills/safeguard/scripts/guard.mjs
+++ b/skills/safeguard/scripts/guard.mjs
@@ -97,1 +97,0 @@
-if (before != null && before.trim()) { try { json = JSON.parse(before.replace(/^/, '')); } catch { throw new Error(`${file} is not valid JSON — fix it first; nothing was changed`); } }
diff --git a/skills/safeguard/scripts/lib/agentcfg.mjs b/skills/safeguard/scripts/lib/agentcfg.mjs
--- a/skills/safeguard/scripts/lib/agentcfg.mjs
+++ b/skills/safeguard/scripts/lib/agentcfg.mjs
@@ -74,1 +74,0 @@
-report.add('INFO', 'agent:permissions', file, null, 'No deny rules for secrets — consider denying Read of ~/.ssh, ~/.aws, and .env files');
diff --git a/skills/safeguard/tests/run_tests.mjs b/skills/safeguard/tests/run_tests.mjs
--- a/skills/safeguard/tests/run_tests.mjs
+++ b/skills/safeguard/tests/run_tests.mjs
@@ -206,1 +206,0 @@
-put(reg, 'fp/emoji.md', 'Dev team 👨‍💻👩‍💻 rocks\n');
@@ -433,1 +432,0 @@
-check('guard: asks before reading secrets, allows examples', gdec('cat ~/.ssh/id_ed25519') === 'ask' && gdec('cat .env.example') === 'allow');

Zero-context hunks: apply with git apply --unidiff-zero fix.patch on the tagged source of 1.2.2. If the behavior is intended, declare it (host under permissions.network, a line in the README) instead of removing it; the next crawl scores declarations.

Issue / PR body

Title: safeguard: Zero-width characters (hidden text) (KillerSkills verdict caution 59)

## What the honeypot observed
KillerSkills ran **[email protected]** in an isolated sandbox (decoy credentials, recording proxy, syscall trace; engine 1.9.2) and scored it **CAUTION 59/100**. Summary: no network, touches nothing outside the project, writes no memory.

- See the findings below.

Full trace and findings: https://killerskills.ai/skills/glama/safeguard/1.2.2

## Findings with a location
- `skills/safeguard/references/audit-dev-agent.md:39` · Zero-width characters (hidden text) — skills/safeguard/references/audit-dev-agent.md:39 · Zero-width characters (hidden text)
- `skills/safeguard/scripts/lib/toml.mjs:8` · Hidden zero-width characters detected — skills/safeguard/scripts/lib/toml.mjs:8 · Hidden zero-width characters detected — may conceal content
- `skills/safeguard/scripts/scan_secrets.mjs:11` · References a credential file in the home directory — skills/safeguard/scripts/scan_secrets.mjs:11 · References a credential file in the home directory
- `skills/safeguard/scripts/mcp_server.mjs:54` · References a credential file in the home directory — skills/safeguard/scripts/mcp_server.mjs:54 · References a credential file in the home directory
- `skills/safeguard/scripts/lib/common.mjs:87` · Hidden zero-width characters detected — skills/safeguard/scripts/lib/common.mjs:87 · Hidden zero-width characters detected — may conceal content
- `skills/safeguard/scripts/lib/patterns.mjs:57` · Reads credential paths from the home directory — skills/safeguard/scripts/lib/patterns.mjs:57 · Reads credential paths from the home directory
- `skills/safeguard/scripts/guard.mjs:97` · Hidden zero-width characters detected — skills/safeguard/scripts/guard.mjs:97 · Hidden zero-width characters detected — may conceal content
- `skills/safeguard/scripts/lib/agentcfg.mjs:74` · Reads credential paths from the home directory — skills/safeguard/scripts/lib/agentcfg.mjs:74 · Reads credential paths from the home directory
- `skills/safeguard/scripts/lib/patterns.mjs:74` · Hidden zero-width characters detected — skills/safeguard/scripts/lib/patterns.mjs:74 · Hidden zero-width characters detected — may conceal content
- `skills/safeguard/tests/run_tests.mjs:433` · Reads credential paths from the home directory — skills/safeguard/tests/run_tests.mjs:433 · Reads credential paths from the home directory
- `skills/safeguard/tests/run_tests.mjs:433` · References a credential file in the home directory — skills/safeguard/tests/run_tests.mjs:433 · References a credential file in the home directory
- `skills/safeguard/tests/run_tests.mjs:206` · Hidden zero-width characters detected — skills/safeguard/tests/run_tests.mjs:206 · Hidden zero-width characters detected — may conceal content

## Proposed change
The attached patch removes the 11 lines above. If the behavior is intended, the fix is to declare it instead: list the host under `permissions.network` (or the MCP manifest) and say in the README why the package needs it; the next crawl will re-score it with the declaration taken into account.

## How this will be verified
Nothing is "verified safe" by assertion. When a new version is published, KillerSkills re-runs it in the honeypot and the verdict page updates; you can trigger it early from the verdict page ("Re-scan after I publish a fix"). Reply here or at [email protected] if you believe the verdict is wrong; disputes are reviewed by a person and the outcome is published on the verdict page.

_Proposed through killerskills.ai/threats by a user of the package, under their own GitHub account. The evidence is public; the package was never modified by KillerSkills._
# or from a terminal, under your own account:
gh repo fork codergeeta/safeguard --clone && cd safeguard
curl -s https://killerskills.ai/skills/glama/safeguard/1.2.2/patch.diff | git apply --unidiff-zero
git checkout -b killerskills/1.2.2 && git commit -am "safeguard: Zero-width characters (hidden text)"
gh pr create --fill --body-file <(curl -s https://killerskills.ai/skills/glama/safeguard/1.2.2/patch.md)

We count proposals opened, not merged: a merge shows up as a new version that the crawl re-runs. Disputes: the maintainer can contest the verdict from its page; a person reviews it and the outcome is published.