registry  /  audit-tools  /  0.30.56

audit-tools@0.30.56

Portable hybrid code auditing + remediation orchestrators for arbitrary repositories.

AI Security Review

scanned 4d ago · by lpm-firewall-ai

LPM blocks this version under the AI-agent control-surface policy. Install-time lifecycle mutates user-level AI-agent command, skill, plugin, and OpenCode permission surfaces. This is unconsented control-surface persistence outside the consuming project.

Static reason
One or more suspicious static signals were detected.; previous stored version diff introduced dangerous source
Trigger
npm install / postinstall
Impact
Adds slash commands/skills/plugins and OpenCode permissions that can steer future AI-agent behavior
Mechanism
automatic AI-agent host configuration writes
Policy narrative
On installation, package.json runs scripts/postinstall.mjs, which spawns both audit and remediate deployers. Those scripts copy package-controlled prompts/skills into user-level Codex, Claude, OpenCode, and Gemini/Antigravity locations and merge OpenCode permissions. This modifies AI-agent control surfaces automatically during package install rather than through an explicit runtime install command.
Rationale
The package has a legitimate audit/remediation purpose, but lifecycle-time writes to global AI-agent configuration and permission surfaces are concrete unconsented agent control-surface mutation. That crosses the firewall boundary even without network exfiltration or destructive behavior. Product guard normalized a non-low false-positive publish_block request to warn-only suspicious.
Evidence
package.jsonscripts/postinstall.mjsscripts/audit/postinstall.mjsscripts/remediate/postinstall.mjsskills/audit-code/SKILL.mdskills/remediate-code/SKILL.md~/.codex/skills/audit-code/SKILL.md~/.codex/skills/audit-code/audit-code.prompt.md~/.codex/skills/remediate-code/SKILL.md~/.codex/skills/remediate-code/remediate-code.prompt.md~/.claude/commands/audit-code.md~/.claude/commands/remediate-code.md~/.config/opencode/opencode.json~/.gemini/config/plugins/audit-code/plugin.json~/.gemini/config/plugins/remediate-code/plugin.json

Decision evidence

public snapshot
AI called this Suspicious at 91.0% confidence as Dangerous Capability with medium false-positive risk.
Evidence for policy block
  • package.json runs postinstall: node scripts/postinstall.mjs
  • scripts/postinstall.mjs launches audit and remediate postinstall deployers automatically
  • scripts/audit/postinstall.mjs writes user AI-agent surfaces under ~/.codex, ~/.claude, ~/.config/opencode, and ~/.gemini
  • scripts/remediate/postinstall.mjs writes analogous user AI-agent surfaces for remediate-code
  • OpenCode agent configs grant read/glob/grep and command-specific bash/edit permissions during install
Evidence against
  • Postinstall source assets come from package skills/prompts, not downloaded payloads
  • No credential exfiltration or destructive filesystem behavior found in lifecycle scripts
  • Runtime network endpoints are quota probes aligned with the audit/remediation orchestrator feature
  • CLI wrappers delegate to packaged dist entries and require user invocation beyond install
Behavioral surface
Source
ChildProcessCryptoDynamicRequireEnvironmentVarsFilesystemNetworkShell
Supply chain
HighEntropyStringsUrlStrings
Manifest
NoLicense
scanned 429 file(s), 3.00 MB of source, external domains: api.anthropic.com, api.github.com, chatgpt.com, cloudcode-pa.googleapis.com, console.anthropic.com, github.com, json-schema.org, opencode.ai

Source & flagged code

5 flagged · loading source
package.jsonView file
scripts.postinstall = node scripts/postinstall.mjs
High
Install Time Lifecycle Scripts

Package defines install-time lifecycle scripts.

package.jsonView on unpkg
scripts.postinstall = node scripts/postinstall.mjs
Medium
Ambiguous Install Lifecycle Script

Install-time lifecycle script is not statically allowlisted and needs review.

package.jsonView on unpkg
wrapper/audit-code-wrapper-lib.mjsView file
203const distUrl = new URL(`file:///${distCliEntry.replace(/\\/g, '/')}`); L204: const cli = await import(distUrl.href); L205: await cli.runCli([process.execPath, distCliEntry, commandName, ...commandArgs]);
Medium
Dynamic Require

Package source references dynamic require/import behavior.

wrapper/audit-code-wrapper-lib.mjsView on unpkg · L203
dist/audit/orchestrator/reviewPackets.jsView file
68let current = []; L69: const verbose = Boolean(process.env.AUDIT_CODE_VERBOSE); L70: for (const task of tasks.sort(compareTasksForPacket)) { ... L79: if (verbose) { L80: process.stderr.write(`[audit-code:packet-planning] isolated large-file chunk: task="${task.task_id}" file="${task.file_paths[0]}" estimatedTokens=${taskEstimatedTokens} targetPacke... L81: }
Low
Weak Crypto

Package source references weak cryptographic algorithms.

dist/audit/orchestrator/reviewPackets.jsView on unpkg · L68
dist/shared/providers/spawnLoggedCommand.jsView file
matchType = previous_version_dangerous_delta matchedPackage = audit-tools@0.30.54 matchedIdentity = npm:YXVkaXQtdG9vbHM:0.30.54 similarity = 0.958 summary = stored previous version shares package body but lacks this dangerous source file
Critical
Previous Version Dangerous Delta

This package version adds a dangerous source file absent from the previous stored version.

dist/shared/providers/spawnLoggedCommand.jsView on unpkg

Findings

1 Critical1 High5 Medium7 Low
CriticalPrevious Version Dangerous Deltadist/shared/providers/spawnLoggedCommand.js
HighInstall Time Lifecycle Scriptspackage.json
MediumAmbiguous Install Lifecycle Scriptpackage.json
MediumDynamic Requirewrapper/audit-code-wrapper-lib.mjs
MediumNetwork
MediumEnvironment Vars
MediumStructural Risk Force Deep Review
LowNon Install Lifecycle Scripts
LowScripts Present
LowWeak Cryptodist/audit/orchestrator/reviewPackets.js
LowFilesystem
LowHigh Entropy Strings
LowUrl Strings
LowNo License