Loading npm security reports…
Loading npm security reports…
@piecemaker-legal/piecemaker@2.0.59: AI-agent capability abuse | LPM Firewall
Flagged as AI-agent capability risk
Allowed by default with warning: agent-facing configuration or capability changes need review before use.
AI security reviewscanned on Oct 29, 2026, 22:30 UTC · by lpm-firewall-ai The automatic project setup appears related to PieceMaker’s agent integration, but it writes agent instructions and changes Codex tool-approval settings during server startup. That unrequested change to agent controls merits a warning.
Static reason
High-risk behavior combination matched malicious policy.; source matched previously finalized malicious package; routed for review; previous stored version diff introduced dangerous source
Trigger
PieceMaker server startup and subsequent project-root scans.
Impact
Agent behavior and tool-approval settings in those projects can change without a per-project request.
Mechanism
For saved projects with CLAUDE.md, it writes or updates agent instruction files, configures the bundled MCP server, and sets its Codex tool approval mode to approve.
Evidence
dist-server/server/piecemaker/index.js dist-server/server/piecemaker/agent-instructions.js dist-server/server/piecemaker/mcp-declaration.js AGENTS.md CLAUDE.md .codex/config.toml
public snapshot
Evidence for warning
PieceMaker startup begins an agent-instruction migration over saved project roots and invokes MCP and skill setup for each project. For a project with CLAUDE.md, the migration creates AGENTS.md and adds shared instruction imports to CLAUDE.md. The MCP setup configures the bundled server in project agent configurations. The Codex configuration code sets the bundled server’s default_tools_approval_mode to approve. Evidence against
The package’s postinstall script is described and implemented as a macOS-only permission fix for node-pty’s spawn-helper. Shell-profile and PATH changes in the flagged CLI installer are guarded by an explicit CLI invocation. Behavioral surface
Source Child process · Crypto · Dynamic require · Environment variables · Eval · Filesystem · Network · Shell · Web socket
Supply chain High entropy strings · Minified · Possible obfuscation · Telemetry · URL strings
Manifest Copyleft license
Scanned 1,369 files · 20.6 MB of source
50 external domains referenced
127.0.0.1 169.254.169.254 api.anthropic.com api.example.com api.exemple.com api.github.com api.openai.com api.piste.gouv.fr chevrotain.io cloudcli.example codex.example.com console.mistral.ai cursor.com developer.mozilla.org discord.gg docs.anthropic.com docs.docker.com docxtemplater.com download.documentfoundation.org en.wikipedia.org example.com example.invalid example.org example.test exemple.com fb.me fonts.googleapis.com foo.bar gateway.exemple.fr git.example.invalid git.example.test github.com github.com.evil.example github.com.helper gitlab.com global.example.com langium.org locize.com login.tailscale.com mistral.ai ns.adobe.com oauth.piste.gouv.fr opencode.ai opencode.example.com openssh.com pandoc.org piste.gouv.fr pkgs.tailscale.com prosemirror.net purl.oclc.org Findings2 critical · 11 high · 6 medium · 9 low Source & flagged code18 flagged High Install time lifecycle scripts
Package defines install-time lifecycle scripts.
package.json View on unpkg Scanner record · 1 line scripts.postinstall = node scripts/fix-node-pty.js
dist-server/server/piecemaker/folder-history/git.js View file High Child process
Package source references child process execution.
dist-server/server/piecemaker/folder-history/git.js View on unpkg · L1 Code excerpt · 2 lines 1 import { spawn } from 'node:child_process' ;
2 import { access, mkdir, readFile, realpath, writeFile } from 'node:fs/promises' ;
dist-server/server/piecemaker/vendor/websocket-server/admin-routes.cjs View file High Shell
Package source references shell execution.
dist-server/server/piecemaker/vendor/websocket-server/admin-routes.cjs View on unpkg · L1530 Code excerpt · 3 lines 1530 { command: 'wt.exe' , args: ['-d' , absolutePath] },
1531 // Repli sans Windows Terminal : PowerShell ouvre l'invite de commandes
1532 // dans le dossier, `-WorkingDirectory` évite tout `cd` à échapper.
dist/assets/vendor-xterm-BWUgpGtR.js View file Low Eval
Package source references a known benign dynamic code generation pattern.
dist/assets/vendor-xterm-BWUgpGtR.js View on unpkg · L1 Code excerpt · 2 lines 1 var Ce={exports:{}},Re;function Pe (){return Re||(Re=1 ,(function (ue,me){(function (he,re){ue.exports=re ()})(self,(()=>(()=>{var he={575 :function (O,t,a){typeof self<"u" ||typeof window...
2 layout (location = 0 ) in vec2 a_unitquad;
dist-server/server/piecemaker/local-models.test.js View file Medium Dynamic require
Package source references dynamic require/import behavior.
dist-server/server/piecemaker/local-models.test.js View on unpkg · L6 Code excerpt · 3 lines 6 import test from 'node:test' ;
7 const require = createRequire (import .meta.url);
8 const { localModelRemovalTargets, removeLocalModel } = require ('./local-models.cjs' );
dist-server/server/piecemaker/vendor/piecemaker-plugin/scripts/lib/commits.cjs View file Low Weak crypto
Package source references weak cryptographic algorithms.
dist-server/server/piecemaker/vendor/piecemaker-plugin/scripts/lib/commits.cjs View on unpkg · L7 Code excerpt · 12 lines 7 const zlib = require ('node:zlib' );
8 const { spawn } = require ('node:child_process' );
9 const { performance } = require ('node:perf_hooks' );
⋯
46 * complète d'un projet Node, dont les 53 000 fichiers noyaient la liste de
47 * l'administration (47 000 entrées) et faisaient entrer les `package.json` de
48 * dans l
scripts/piecemaker/cli/install-command.mjs View file Critical Persistence backdoor
Source writes persistence or remote-access backdoor material.
scripts/piecemaker/cli/install-command.mjs View on unpkg · L2 Medium Install persistence
Source writes installer persistence such as shell profile or service configuration.
scripts/piecemaker/cli/install-command.mjs View on unpkg · L2 Shared code excerpt · 2 findings · 9 lines 3 import { execFileSync } from 'node:child_process' ;
4 import fs from 'node:fs' ;
⋯
13 const COMMAND_NAME = 'piecemaker' ;
14 const isWindows = process.platform === 'win32' ;
15
High Entrypoint build divergence
Manifest entrypoint contains risky behavior absent from dist/build output.
dist-server/server/index.js View on unpkg · L5 Code excerpt · 12 lines Manifest entrypoint (manifest.main) carries capability families absent from dist/build output: environment+network
5 import path from 'path' ;
6 import http from 'http' ;
7 import express from 'express' ;
⋯
36 import { configureWebPush } from './modules/notifications/index.js' ;
37 const __dirname = getModuleDirectory (import .meta.url);
dist-server/server/piecemaker/desktop-update/index.js View file High Same file environment network execution
A single source file combines environment access, network access, and code or shell execution; review context before blocking.
dist-server/server/piecemaker/desktop-update/index.js View on unpkg · L38 Code excerpt · 9 lines 38 }
39 spawn ('sh' , ['-c' , command], { cwd: os.homedir (), env: environment, detached: true , stdio: 'ignore' }).unref ();
40 }
⋯
46 applicationPid: process.ppid,
47 environment: process.env,
48 runInstaller,
⋯
53 throw new Error ('Adresse de mise à jour locale invalide.' );
server/piecemaker/vendor/mcp/legifrance/tests/test_justice_maintenance.py View file High Payload in excluded dir
Package hides binary, compressed, or executable-looking payloads in test/fixture/hidden paths.
server/piecemaker/vendor/mcp/legifrance/tests/test_justice_maintenance.py View on unpkg Scanner record · 4 lines path = [redacted]test_justice_maintenance.py
kind = payload_in_excluded_dir
sizeBytes = 1142
magicHex = [redacted]
dist-server/server/modules/assets/services/image-assets.service.js View file High Semantic analysis limited
A bounded semantic-analysis stage reached its safety limit; remaining detectors completed, but this package requires AI review.
dist-server/server/modules/assets/services/image-assets.service.js View on unpkg Scanner record · 1 line stage = ast_semantic_analysis; reason = ast_alias_growth_limit_exceeded; limitedFiles = 34
dist-server/server/modules/database/connection.js View file High Known malware source similarity
Source file is highly similar to a previously finalized malicious package; route for source-aware review.
dist-server/server/modules/database/connection.js View on unpkg Scanner record · 6 lines matchType = normalized_sha256
matchedPackage = wind-agent-cli@1.40.0
matchedPath = dist-[redacted].js
matchedIdentity = npm:d2luZC1hZ2VudC1jbGk:1.40.0
similarity = 1.000
summary = normalized source hash matched finalized malicious source
dist-server/server/modules/cli/sandbox.service.js View file High Known malware source similarity
Source file is highly similar to a previously finalized malicious package; route for source-aware review.
dist-server/server/modules/cli/sandbox.service.js View on unpkg Scanner record · 6 lines matchType = normalized_sha256
matchedPackage = wind-agent-cli@1.40.0
matchedPath = dist-[redacted].service.js
matchedIdentity = npm:d2luZC1hZ2VudC1jbGk:1.40.0
similarity = 1.000
summary = normalized source hash matched finalized malicious source
dist-server/server/modules/system/system.module.js View file High Known malware source similarity
Source file is highly similar to a previously finalized malicious package; route for source-aware review.
dist-server/server/modules/system/system.module.js View on unpkg Scanner record · 6 lines matchType = normalized_sha256
matchedPackage = wind-agent-cli@1.40.0
matchedPath = dist-[redacted].module.js
matchedIdentity = npm:d2luZC1hZ2VudC1jbGk:1.40.0
similarity = 1.000
summary = normalized source hash matched finalized malicious source
dist/assets/diagram-VX7I27RA-B2WGJk-O.js View file High Known malware source similarity
Source file is highly similar to a previously finalized malicious package; route for source-aware review.
dist/assets/diagram-VX7I27RA-B2WGJk-O.js View on unpkg Scanner record · 7 lines matchType = token_shingles
matchedPackage = termdock@1.4.66
matchedPath = dist/client/assets/diagram-G47NLZAW-gFduWt1a.js
matchedIdentity = npm:dGVybWRvY2s:1.4.66
similarity = 1.000
shingleOverlap = 48
summary = source token shingles overlapped finalized malicious source
dist-server/server/modules/providers/list/mistral/mistral-runtime.provider.js View file Critical Previous version dangerous delta
This package version adds a dangerous source file absent from the previous stored version; route for source-aware review.
dist-server/server/modules/providers/list/mistral/mistral-runtime.provider.js View on unpkg Scanner record · 5 lines matchType = previous_version_dangerous_delta
matchedPackage = @piecemaker-legal/piecemaker@2.0.53
matchedIdentity = npm:[redacted]:2.0.53
similarity = 0.717
summary = stored previous version shares package body but lacks this dangerous source file
Code↓
Package metadata 10 findings
Medium Network
Medium Environment variables
Medium Structural risk force deep review
Low Non install lifecycle scripts
dist-server/server/piecemaker/vendor/piecemaker-plugin/scripts/lib/commits.cjs1 finding
Low Weak crypto Code↓ `node_modules`
'historique du dossier.
55 const PERF_SLOW_MS = 250 ;
56 const PERF_LOG_ALL = process.env.PIECEMAKER_PERF_LOG === '1' ;
57 const COMMIT_USER_NAME_KEY = 'PIECEMAKER_USER_NAME' ;
62 const DEFAULT_COMMIT_USER_NAME = 'PieceMaker' ;
63 const GLOBAL_ENV_FILE = path.resolve (__dirname, '..' , '..' , '..' , '.env' );
64 // Identité de commit partagée par tous les clones. `GLOBAL_ENV_FILE` est résolu
69 function ensurePosixPathEntry () {
70 const shellFiles = ['.zshrc' , '.bashrc' , '.profile' ]
71 .map ((name) => path.join (os.homedir (), name))
72 .filter ((file) => fs.existsSync (file));
38
// The server source runs from /server, while the compiled output runs from /dist-server/server.
42 // Version of the code that is actually running, captured once at process
43 // startup. This intentionally does NOT re-read package.json per request: after
44 // an update replaces the files on disk, package.json reflects the NEW version
50 return JSON.parse (fs.readFileSync (path.join (APP_ROOT, 'package.json' ), 'utf8' )).
54 const response = await fetch (endpoint, { method: 'POST' });
55 return await response.json ();