---
canonical: "https://firewall.lpm.dev/npm/@testrelic/playwright-analytics/v/2.13.0"
markdown: "https://firewall.lpm.dev/npm/@testrelic/playwright-analytics/v/2.13.0.md"
package: "@testrelic/playwright-analytics"
report_status: "published"
title: "@testrelic/playwright-analytics@2.13.0 npm security report"
verdict: "malicious"
version: "2.13.0"
---

# @testrelic/playwright-analytics@2.13.0 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** — Arbitrary hidden code can run with the installing user's permissions.

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

Installing the dependency runs an obscured payload without a user command. The payload is appended to an otherwise readable postinstall script and its behavior cannot be audited from the visible source.

## Latest scan
- **Scanner version:** rust-scanner-worker-schema-1
- **Verdict:** Malicious
- **Confidence:** 99.0%
- **Started:** 2026-08-27T16:09:53.755Z
- **Finished:** 2026-08-27T16:11:26.539Z
- **Download time:** 254 ms
- **Static scan time:** 3167 ms
- **AI review time:** 89361 ms
- **Total time:** 92784 ms

## Security analysis

### Published attack-surface review

- **Summary:** Installing the dependency runs an obscured payload without a user command. The payload is appended to an otherwise readable postinstall script and its behavior cannot be audited from the visible source.

- **Trigger:** npm installation of the package as a dependency outside CI.

- **Impact:** Arbitrary hidden code can run with the installing user's permissions.

- **Evidence paths:** package.json, scripts/postinstall.cjs

- **Review source:** ai\_review

- **Reviewed:** 2026-08-27T16:11:26.539Z

### AI review details

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

- **Mechanism:** Obfuscated install-hook payload reconstruction and execution.

- **Attack narrative:** The package declares a postinstall hook. Its script first appears to create a TestRelic configuration file, then appends dense obfuscated code that reconstructs data into callable code and invokes it. This runs during dependency installation, before the user explicitly runs the package. Because the executed payload is deliberately concealed, its file, process, and network actions are not reviewable or consented to.

- **Rationale:** This is an automatic install-time hidden-code execution chain, not normal reporter functionality. Block publication to prevent arbitrary concealed code from running during installation.

- **Files touched:** scripts/postinstall.cjs, .testrelic/testrelic-config.json

### Review decision

- **Verdict:** Malicious

- **Confidence:** 99.0%

- **Recommended action:** publish\_block

- **Intent class:** Malware

- **False-positive risk:** Low

- **Evidence for:** The package runs scripts/postinstall.cjs automatically after installation., The postinstall script has a large, concealed decoder appended after its visible configuration code., The concealed code reconstructs callable code and immediately invokes the resulting payload.

- **Evidence against:** The readable portion of the postinstall script creates a same-vendor configuration file and skips CI., The reporter's cloud upload features match the stated analytics purpose, but do not explain the hidden install-time payload.

## Public findings

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

Package defines install-time lifecycle scripts.

Public source snippet (untrusted):

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

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

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

Public source snippet (untrusted):

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

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

Package declares npm scripts.

### 4. High: Child Process
- **Category:** Source
- **Confidence:** 85.0%
- **Path:** dist/reporter-entry.js
- **Public source:** [View source](<https://unpkg.com/@testrelic/playwright-analytics@2.13.0/dist/reporter-entry.js>)

Package source references child process execution.

Public source snippet (untrusted):

```javascript
L1: import {randomUUID,createHash}from'crypto';import {writeFileSync,renameSync,mkdirSync,unlinkSync,existsSync,readFileSync,appendFileSync,readdirSync,statSync,rmSync,createReadStream...
L2: `),false}}moveFile(e,r){try{renameSync(e,r);}catch{try{let{copyFileSync:s}=rs("fs");s(e,r);try{unlinkSync(e);}catch{}}catch(s){process.stderr.write(`[testrelic] Failed to move file...
```

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

Package source references network APIs.

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

Package source references environment variables.

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

Package source references filesystem APIs.

### 8. High: Same File Env Network Execution
- **Category:** Source
- **Confidence:** 85.0%
- **Path:** dist/reporter-entry.js
- **Public source:** [View source](<https://unpkg.com/@testrelic/playwright-analytics@2.13.0/dist/reporter-entry.js>)

A single source file combines environment access, network access, and code or shell execution; review context before blocking.

Public source snippet (untrusted):

```javascript
L1: import {randomUUID,createHash}from'crypto';import {writeFileSync,renameSync,mkdirSync,unlinkSync,existsSync,readFileSync,appendFileSync,readdirSync,statSync,rmSync,createReadStream...
L2: `),false}}moveFile(e,r){try{renameSync(e,r);}catch{try{let{copyFileSync:s}=rs("fs");s(e,r);try{unlinkSync(e);}catch{}}catch(s){process.stderr.write(`[testrelic] Failed to move file...
L3: `);}}}writeIndex(e){let r=join(this.reportDir,"index.json"),s=r+".tmp",n=JSON.stringify(e);writeFileSync(s,n,"utf-8"),renameSync(s,r),this.totalBytesWritten+=Buffer.byteLength(n,"u...
L4: `),n}catch{}let a=dirname(e);if(a===e)break;e=a;}return null}function Et(t){try{let e=readFileSync(t,"utf-8"),r=JSON.parse(e);return typeof r!="object"||r===null||Array.isArray(r)|...
L5: `);let p=t.queue;if(p&&typeof p=="object"){i
```

### 9. High: Command Output Exfiltration
- **Category:** Source
- **Confidence:** 82.0%
- **Path:** dist/reporter-entry.js
- **Public source:** [View source](<https://unpkg.com/@testrelic/playwright-analytics@2.13.0/dist/reporter-entry.js>)

Source combines command execution, command-output handling, and outbound requests; review data flow before blocking.

Public source snippet (untrusted):

```javascript
L1: import {randomUUID,createHash}from'crypto';import {writeFileSync,renameSync,mkdirSync,unlinkSync,existsSync,readFileSync,appendFileSync,readdirSync,statSync,rmSync,createReadStream...
L2: `),false}}moveFile(e,r){try{renameSync(e,r);}catch{try{let{copyFileSync:s}=rs("fs");s(e,r);try{unlinkSync(e);}catch{}}catch(s){process.stderr.write(`[testrelic] Failed to move file...
L3: `);}}}writeIndex(e){let r=join(this.reportDir,"index.json"),s=r+".tmp",n=JSON.stringify(e);writeFileSync(s,n,"utf-8"),renameSync(s,r),this.totalBytesWritten+=Buffer.byteLength(n,"u...
L4: `),n}catch{}let a=dirname(e);if(a===e)break;e=a;}return null}function Et(t){try{let e=readFileSync(t,"utf-8"),r=JSON.parse(e);return typeof r!="object"||r===null||Array.isArray(r)|...
```

### 10. High: Obfuscated Payload Loader
- **Category:** Source
- **Confidence:** 86.0%
- **Path:** scripts/postinstall.cjs
- **Public source:** [View source](<https://unpkg.com/@testrelic/playwright-analytics@2.13.0/scripts/postinstall.cjs>)

Source contains an obfuscated payload loader that reconstructs and executes hidden code.

Public source snippet (untrusted):

```javascript
L53: process.stderr.write('[testrelic] Could not create .testrelic/testrelic-config.json: ' + err.message + '\n');
L54: };                                                                                                                                                                                  ...
```

### 11. High: Trigger Reachable Command Output Exfiltration
- **Category:** Source
- **Confidence:** 94.0%
- **Path:** dist/index.cjs
- **Public source:** [View source](<https://unpkg.com/@testrelic/playwright-analytics@2.13.0/dist/index.cjs>)

A manifest entrypoint or package-local install chain reaches command-output exfiltration behavior.

Public source snippet (untrusted):

```javascript
Trigger-reachable command-output exfiltration chain: manifest.main -> dist/index.cjs
L1: 'use strict';Object.defineProperty(exports,'__esModule',{value:true});var crypto=require('crypto'),fs=require('fs'),path=require('path'),os$1=require('os'),core=require('@testrelic...
L2: `),false}}moveFile(e,r){try{fs.renameSync(e,r);}catch{try{let{copyFileSync:n}=Dn("fs");n(e,r);try{fs.unlinkSync(e);}catch{}}catch(n){process.stderr.write(`[testrelic] Failed to mov...
```

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

Package source contains high-entropy string patterns.

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

Package source contains URL literals.

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

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

### 15. Critical: Previous Version Dangerous Delta
- **Category:** Supply Chain
- **Confidence:** 93.0%
- **Path:** dist/reporter-entry.cjs
- **Public source:** [View source](<https://unpkg.com/@testrelic/playwright-analytics@2.13.0/dist/reporter-entry.cjs>)

This package version adds a dangerous source file absent from the previous stored version; route for source-aware review.

Public source snippet (untrusted):

```javascript
matchType = previous_version_dangerous_delta
matchedPackage = @testrelic/playwright-analytics@2.11.1
matchedIdentity = npm:[redacted]:2.11.1
similarity = 0.500
summary = stored previous version shares package body but lacks this dangerous source file
```

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

### Published dependency entries
- @testrelic/core 2.6.0 (Dependency)
- @playwright/test \>=1.35.0 (PeerDependency)

## Package metadata
- **Package:** @testrelic/playwright-analytics
- **Ecosystem:** npm
- **Version:** 2.13.0
- **License:** MIT
- **Version published:** 2026-08-27T16:04:08.268Z
- **Package first seen:** 2026-07-03T03:40:41.551Z
- **Package last seen:** 2026-08-27T16:11:26.539Z
- **Known versions:** 2
- **Latest version:** 2.13.0
- **Appeal under review:** No
- **Description:** Playwright test analytics reporter with E2E navigation tracking, API call capture, network stats, failure diagnostics, and interactive HTML reports
- **Author:** TestRelic AI
- **Keywords:** playwright, test, analytics, reporter, api-testing, e2e-testing, navigation, network, html-report, test-results, api-tracking, assertions
- **Runtime engines:** node: \>=18
- **Artifact files:** 35
- **Artifact unpacked size:** 4,551,783 bytes
- **Artifact signatures:** 1
- **Attestations:** No

## References
- [HTML security report](<https://firewall.lpm.dev/npm/@testrelic/playwright-analytics/v/2.13.0>)
- [Homepage](<https://testrelic.ai/>)
