codehere 0.3.0-rc.1 → 0.3.0-rc.2
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.
|
@@ -417,10 +417,14 @@ export function appendAuditLog(entry) {
|
|
|
417
417
|
* not execution — strip the search term so pattern strings in args don't
|
|
418
418
|
* trigger the scanner.
|
|
419
419
|
*
|
|
420
|
-
* Write / Edit / MultiEdit: the content is
|
|
421
|
-
*
|
|
422
|
-
*
|
|
423
|
-
*
|
|
420
|
+
* Write / Edit / MultiEdit: the content is DATA being written to disk, not
|
|
421
|
+
* a command being executed. Only scan the file path (destination) — that's
|
|
422
|
+
* enough to catch writes to sensitive files (~/.ssh/id_rsa, ~/.aws/credentials).
|
|
423
|
+
* Do NOT scan content: it produces false positives on legitimate source code
|
|
424
|
+
* that mentions attack-shaped strings (i18n with "system prompt", README docs
|
|
425
|
+
* describing what we block, LLM-prompt-engineering code, security tests).
|
|
426
|
+
* The Bash surface is the right place to catch prompt-injection / code-injection
|
|
427
|
+
* patterns; Edit-time content is data, not execution intent.
|
|
424
428
|
*/
|
|
425
429
|
function buildScanPayload(toolName, toolInput) {
|
|
426
430
|
if (toolName === 'Bash') {
|
|
@@ -438,11 +442,11 @@ function buildScanPayload(toolName, toolInput) {
|
|
|
438
442
|
return JSON.stringify({ file_path: toolInput.file_path ?? '' });
|
|
439
443
|
}
|
|
440
444
|
if (toolName === 'Edit') {
|
|
441
|
-
//
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
});
|
|
445
|
+
// Same model as Write: scan only the destination. The old_string is
|
|
446
|
+
// EXISTING file content (data), not execution intent — scanning it
|
|
447
|
+
// produced false positives on legitimate edits to files containing
|
|
448
|
+
// attack-shaped strings (e.g. i18n.js with a "system prompt" key).
|
|
449
|
+
return JSON.stringify({ file_path: toolInput.file_path ?? '' });
|
|
446
450
|
}
|
|
447
451
|
if (toolName === 'MultiEdit') {
|
|
448
452
|
// Scan file paths only
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "codehere",
|
|
3
|
-
"version": "0.3.0-rc.
|
|
3
|
+
"version": "0.3.0-rc.2",
|
|
4
4
|
"description": "A PM for your AI coding agents. Delegate, orchestrate, and audit Claude Code, Codex, Aider, and OpenCode from one local web UI — every AI action traced, every file scored.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"type": "module",
|