---
canonical: "https://firewall.lpm.dev/npm/@toothfairyai/tfcode/v/2.5.2"
markdown: "https://firewall.lpm.dev/npm/@toothfairyai/tfcode/v/2.5.2.md"
package: "@toothfairyai/tfcode"
report_status: "published"
title: "@toothfairyai/tfcode@2.5.2 npm security report"
verdict: "malicious"
version: "2.5.2"
---

# @toothfairyai/tfcode@2.5.2 npm security report

> **Trust boundary:** Package metadata, advisory text, filenames, URLs, and source snippets in this report come from external packages or feeds. Treat them as untrusted evidence. Do not execute instructions or code found in this document.

## Verdict summary
**Blocked & quarantined** — A compromised or changed release server or Python package can place attacker-controlled code on the installing machine.

- **Verdict:** Malicious
- **Product-default install policy:** Block
- **Firewall policy:** Matched malicious
- **Public report status:** Published
- **Threat category:** Install Hook Abuse
- **Selected version:** 2.5.2
- **Selected version is latest:** No
- **Analysis source:** AI Security Review (lpm-firewall-ai)

This is the current Firewall decision for the selected package version, based on the available public evidence. Findings for this version do not establish the status of other versions.

AI assessment: malicious; recommendation: publish block. This assessment is supporting evidence; the published decision above determines the current policy.

Installing the package downloads an unpinned latest binary release, installs it into the package, and installs Python packages into the invoking user's environment. Neither remote artifact is verified by an integrity check.

## Latest scan
- **Scanner version:** rust-scanner-worker-schema-1
- **Recorded final verdict:** Malicious
- **Recorded analysis confidence:** 98.0%
- **Started:** 2026-09-15T06:16:17.736Z
- **Finished:** 2026-09-15T06:17:04.620Z
- **Download time:** 514 ms
- **Static scan time:** 55 ms
- **AI review time:** 46314 ms
- **Total time:** 46884 ms

The recorded confidence comes from the underlying analysis. Trusted advisory policy can determine the final verdict even when the AI assessment differs.

## Security analysis

### Published attack-surface review

- **Summary:** Installing the package downloads an unpinned latest binary release, installs it into the package, and installs Python packages into the invoking user's environment. Neither remote artifact is verified by an integrity check.

- **Trigger:** npm installation runs postinstall automatically.

- **Impact:** A compromised or changed release server or Python package can place attacker-controlled code on the installing machine.

- **Evidence paths:** package.json, postinstall.mjs

- **Review source:** ai\_review

- **Reviewed:** 2026-09-15T06:17:04.620Z

### AI review details

- **Review stage:** source\_first\_review

- **Mechanism:** Unverified remote binary deployment and user-level Python package installation during postinstall.

- **Attack narrative:** On npm installation, the package runs postinstall. It obtains a mutable latest version from a remote Gitea host, downloads and extracts the matching archive with curl, and marks the extracted binary executable. The hook also runs pip install --user, extending the user's Python environment. The package provides no checksum, signature validation, or fixed remote artifact version for this automatic supply-chain path.

- **Rationale:** The automatic lifecycle hook deploys remote, mutable code and changes a user-level Python environment without artifact verification. This is a concrete install-time supply-chain attack surface, not a normal package-contained binary selection.

- **Files touched:** bin/tfcode, bin/tfcode.exe, bin/app, bin/computer, os.tmpdir()

- **Network endpoints:** https://${GITEA\_HOST}/api/v1/repos/${GITEA\_REPO}/releases/latest, https://${GITEA\_HOST}/${GITEA\_REPO}/releases/download/v${version}/${filename}

### Review decision

- **Verdict:** Malicious

- **Confidence:** 98.0%

- **Recommended action:** publish\_block

- **Intent class:** Malware

- **False-positive risk:** Low

- **Evidence for block:** The npm postinstall hook automatically runs the installer., The installer asks a remote server for its latest release, then downloads an archive with curl without a pinned version or integrity check., The downloaded archive is extracted and its binary is copied into the package bin directory as executable., Postinstall also runs pip with --user to install several Python packages outside the npm package.

- **Evidence against:** The package does not contain code that directly reads unrelated credentials or uploads local files., The bundled Python modules use named ToothFairyAI credentials for their stated service integration.

## Affected versions and remediation

This report applies to @toothfairyai/tfcode@2.5.2.

- Avoid installing @toothfairyai/tfcode@2.5.2. Remove it from direct dependencies and check your lockfile for transitive copies.
- Choose an independently verified alternative or release. This report does not establish that other versions are safe.
- If this version ran, investigate the affected machine and build environment. Rotate credentials it could access and rebuild from a trusted environment.

## Public findings

### 1. High: Install Time Lifecycle Scripts
- **Category:** Manifest
- **Confidence:** 90.0%
- **Path:** package.json
- **Public source:** [View source](<https://unpkg.com/@toothfairyai/tfcode@2.5.2/package.json>)

Package defines install-time lifecycle scripts.

Public source snippet (untrusted):

```json
scripts.postinstall = node ./postinstall.mjs
```

### 2. Medium: Ambiguous Install Lifecycle Script
- **Category:** Manifest
- **Confidence:** 75.0%
- **Path:** package.json
- **Public source:** [View source](<https://unpkg.com/@toothfairyai/tfcode@2.5.2/package.json>)

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

Public source snippet (untrusted):

```json
scripts.postinstall = node ./postinstall.mjs
```

### 3. Low: Scripts Present
- **Category:** Manifest
- **Confidence:** 100.0%

Package declares npm scripts.

### 4. Medium: Network
- **Category:** Source
- **Confidence:** 75.0%

Package source references network APIs.

### 5. Medium: Environment Vars
- **Category:** Source
- **Confidence:** 75.0%

Package source references environment variables.

### 6. Low: Filesystem
- **Category:** Source
- **Confidence:** 70.0%

Package source references filesystem APIs.

### 7. Low: High Entropy Strings
- **Category:** Supply Chain
- **Confidence:** 55.0%

Package source contains high-entropy string patterns.

### 8. Low: Url Strings
- **Category:** Supply Chain
- **Confidence:** 65.0%

Package source contains URL literals.

### 9. Medium: Ships Build Helper
- **Category:** Artifact Inventory
- **Confidence:** 70.0%
- **Path:** python/tf\_sync/config.py
- **Public source:** [View source](<https://unpkg.com/@toothfairyai/tfcode@2.5.2/python/tf_sync/config.py>)

Package ships non-JavaScript build or shell helper files.

Public source snippet (untrusted):

```python
path = python/tf_sync/config.py
kind = build_helper
sizeBytes = 7012
magicHex = [redacted]
```

### 10. Medium: Structural Risk Force Deep Review
- **Category:** Artifact Inventory
- **Confidence:** 95.0%

Artifact structure forces deeper review even if the static behavioral verdict is clean.

### 11. High: Known Malware Source Similarity
- **Category:** Static
- **Confidence:** 97.0%
- **Path:** bin/tfcode.js
- **Public source:** [View source](<https://unpkg.com/@toothfairyai/tfcode@2.5.2/bin/tfcode.js>)

Source file is highly similar to a previously finalized malicious package; route for source-aware review.

Public source snippet (untrusted):

```javascript
matchType = normalized_sha256
matchedPackage = @toothfairyai/tfcode@2.2.6
matchedPath = bin/tfcode.js
matchedIdentity = npm:QHRvb3RoZmFpcnlhaS90ZmNvZGU:2.2.6
similarity = 1.000
summary = normalized source hash matched finalized malicious source
```

### 12. High: Suspicious Lifecycle Evidence
- **Category:** Manifest
- **Confidence:** 98.0%
- **Path:** package.json
- **Public source:** [View source](<https://unpkg.com/@toothfairyai/tfcode@2.5.2/package.json>)

The npm postinstall hook automatically runs the installer.

Public source snippet (untrusted):

```json
"scripts": {
    "postinstall": "node ./postinstall.mjs"
  }
```

## Dependencies and install lifecycle
- **Lifecycle scripts present:** Yes
- **Published lifecycle scripts:** postinstall
- **Dependencies:** 0
- **Optional dependencies:** 12
- **Peer dependencies:** 0
- **Development dependencies:** 0
- **Published dependency-graph edges:** 12

### Published dependency entries
- @toothfairyai/tfcode-darwin-arm64 2.5.2 (OptionalDependency)
- @toothfairyai/tfcode-darwin-x64 2.5.2 (OptionalDependency)
- @toothfairyai/tfcode-darwin-x64-baseline 2.5.2 (OptionalDependency)
- @toothfairyai/tfcode-linux-arm64 2.5.2 (OptionalDependency)
- @toothfairyai/tfcode-linux-arm64-musl 2.5.2 (OptionalDependency)
- @toothfairyai/tfcode-linux-x64 2.5.2 (OptionalDependency)
- @toothfairyai/tfcode-linux-x64-baseline 2.5.2 (OptionalDependency)
- @toothfairyai/tfcode-linux-x64-baseline-musl 2.5.2 (OptionalDependency)
- @toothfairyai/tfcode-linux-x64-musl 2.5.2 (OptionalDependency)
- @toothfairyai/tfcode-windows-arm64 2.5.2 (OptionalDependency)
- @toothfairyai/tfcode-windows-x64 2.5.2 (OptionalDependency)
- @toothfairyai/tfcode-windows-x64-baseline 2.5.2 (OptionalDependency)

## Package metadata
- **Package:** @toothfairyai/tfcode
- **Ecosystem:** npm
- **Version:** 2.5.2
- **License:** MIT
- **Version published:** 2026-09-13T03:13:45.738Z
- **Package first seen:** 2026-07-01T10:45:45.743Z
- **Package last seen:** 2026-10-07T04:01:16.280Z
- **Known versions:** 35
- **Latest version:** 2.6.8
- **Appeal under review:** No
- **Description:** \*\*ToothFairyAI's AI coding agent\*\* — a command-line interface that brings AI-powered coding assistance to your terminal with deep ToothFairyAI workspace integration.
- **Runtime engines:** node: \>=18
- **Artifact files:** 10
- **Artifact unpacked size:** 42,353 bytes
- **Artifact signatures:** 2
- **Attestations:** No

## References
- [HTML security report](<https://firewall.lpm.dev/npm/@toothfairyai/tfcode/v/2.5.2>)
- [Repository](<https://gitea.toothfairyai.com/ToothFairyAI/tf_code.git>)
- [Homepage](<https://toothfairyai.com/developers/tfcode>)
