---
canonical: "https://firewall.lpm.dev/npm/balena-cli/v/25.2.8"
markdown: "https://firewall.lpm.dev/npm/balena-cli/v/25.2.8.md"
package: "balena-cli"
report_status: "published"
title: "balena-cli@25.2.8 npm security report"
verdict: "suspicious"
version: "25.2.8"
---

# balena-cli@25.2.8 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
**Flagged — allowed with a warning** — Allowed by default policy, but 17 finding(s) warrant review before installing.

- **Verdict:** Suspicious
- **Product-default install policy:** Warn
- **Firewall policy:** Telemetry warning (can be blocked)
- **Public report status:** Published
- **Threat category:** Telemetry
- **Selected version:** 25.2.8
- **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: suspicious; recommendation: downgrade to warn. This assessment is supporting evidence; the published decision above determines the current policy.

The package performs default runtime reporting that associates a cached balena username with command usage and Sentry error reporting. The opt-outs reduce the risk, but the source does not establish clear disclosure, so this is suspicious telemetry rather than malicious exfiltration.

## Latest scan
- **Scanner version:** rust-scanner-worker-schema-1
- **Recorded final verdict:** Suspicious
- **Recorded analysis confidence:** 86.0%
- **Started:** 2026-11-02T23:01:36.253Z
- **Finished:** 2026-11-02T23:02:26.442Z
- **Download time:** 1009 ms
- **Static scan time:** 1821 ms
- **AI review time:** 47358 ms
- **Total time:** 50189 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:** Default runtime reporting sends command and account-identifying details to Sentry and balena analytics; no malicious behavior was identified.

- **Trigger:** Normal CLI startup and command execution, unless disabled with BALENARC\_NO\_SENTRY or BALENARC\_NO\_ANALYTICS.

- **Impact:** The vendor and its error-reporting service receive the user’s balena username and command usage during routine CLI use.

- **Evidence paths:** build/events.js, build/hooks/prerun.js, build/app.js

- **Review source:** ai\_review

- **Reviewed:** 2026-11-02T23:02:26.442Z

### AI review details

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

- **Mechanism:** The CLI adds the command signature and cached balena username to Sentry’s scope and sends an analytics event containing the username, command signature, package and runtime details to the configured balena analytics endpoint.

- **Rationale:** The package performs default runtime reporting that associates a cached balena username with command usage and Sentry error reporting. The opt-outs reduce the risk, but the source does not establish clear disclosure, so this is suspicious telemetry rather than malicious exfiltration.

- **Network endpoints:** https://data.${balenaUrl}/amplitude/2/httpapi, config.sentryDsn

### Review decision

- **Verdict:** Suspicious

- **Confidence:** 86.0%

- **Recommended action:** downgrade\_to\_warn

- **Intent class:** Dangerous Capability

- **False-positive risk:** Medium

- **Evidence for warning:** The CLI attaches the command name and cached balena username to Sentry’s reporting scope by default; \`BALENARC\_NO\_SENTRY\` disables it., The prerun hook calls command tracking for CLI commands, so reporting is triggered during normal command use., The analytics event includes the username and command signature, along with package version, platform, architecture, Node version, and the configured balena URL.

- **Evidence against:** The package’s postinstall hook applies local patches; no patch directories are shipped in the snapshot., SSH key upload and deployment behavior are tied to explicit CLI commands and their intended balenaCloud features., The compose parser dependency downloads its binary from its own GitHub release path.

## Affected versions and remediation

This report applies to balena-cli@25.2.8.

- Review the evidence and your use of balena-cli@25.2.8 before allowing it. Restrict the permissions described in this report.
- Choose an independently verified alternative or release. This report does not establish that other versions are safe.

## Public findings

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

Package defines install-time lifecycle scripts.

Public source snippet (untrusted):

```json
scripts.postinstall = node patches/apply-patches.js
```

### 2. Low: Non Install Lifecycle Scripts
- **Category:** Manifest
- **Confidence:** 80.0%

Package declares lifecycle scripts that are not normally run for registry tarball installs.

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

Package declares npm scripts.

### 4. Medium: Secret Pattern
- **Category:** Secrets
- **Confidence:** 75.0%
- **Path:** oclif.manifest.json
- **Public source:** [View source](<https://unpkg.com/balena-cli@25.2.8/oclif.manifest.json>)

Package contains a possible secret pattern.

Public source snippet (untrusted):

```json
patternName = generic_password
severity = medium
line = 121
```

### 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: Sandbox Evasion Gated Capability
- **Category:** Source
- **Confidence:** 84.0%
- **Path:** build/utils/sudo.js
- **Public source:** [View source](<https://unpkg.com/balena-cli@25.2.8/build/utils/sudo.js>)

Source gates dangerous network, credential, or execution behavior behind CI, host, platform, time, or geo fingerprint checks.

Public source snippet (untrusted):

```javascript
L3: exports.executeWithPrivileges = executeWithPrivileges;
L4: const child_process_1 = require("child_process");
L5: const lazy_1 = require("./lazy");
L6: async function executeWithPrivileges(command, stderr, isCLIcmd = true) {
L7: const isElevated = await (await Promise.resolve().then(() => require('is-elevated')))();
...
L9: const opts = {
L10: env: process.env,
L11: stdio: ['inherit', 'inherit', stderr ? 'pipe' : 'inherit'],
...
L21: const escapedCmd = await shellEscape(command);
L22: if (process.platform === 'win32') {
L23: await windosuExec(escapedCmd, stderr);
...
L52: Error: unable to elevate privileges. Please run the command prompt as an Administrator:
```

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

Package source contains high-entropy string patterns.

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

Package source contains URL literals.

### 11. Medium: Ships Build Helper
- **Category:** Artifact Inventory
- **Confidence:** 70.0%
- **Path:** bin/dev.cmd
- **Public source:** [View source](<https://unpkg.com/balena-cli@25.2.8/bin/dev.cmd>)

Package ships non-JavaScript build or shell helper files.

Public source snippet (untrusted):

```text
path = bin/dev.cmd
kind = build_helper
sizeBytes = 31
magicHex = [redacted]
```

### 12. 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.

### 13. High: Semantic Analysis Limited
- **Category:** Scanner Coverage
- **Confidence:** 100.0%
- **Path:** build/commands/deploy/index.js\#virtual:string-array:round1
- **Public source:** [View source](<https://unpkg.com/balena-cli@25.2.8/build/commands/deploy/index.js%23virtual%3Astring-array%3Around1>)

A bounded semantic-analysis stage reached its safety limit; remaining detectors completed, but this package requires AI review.

Public source snippet (untrusted):

```text
stage = ast_semantic_analysis; reason = ast_parse_error; limitedFiles = 7
```

### 14. Medium: Secret Pattern
- **Category:** Secrets
- **Confidence:** 75.0%
- **Path:** oclif.manifest.json
- **Public source:** [View source](<https://unpkg.com/balena-cli@25.2.8/oclif.manifest.json>)

Hardcoded password in oclif.manifest.json

Public source snippet (untrusted):

```json
patternName = generic_password
severity = medium
line = 772
```

### 15. Medium: Secret Pattern
- **Category:** Secrets
- **Confidence:** 75.0%
- **Path:** oclif.manifest.json
- **Public source:** [View source](<https://unpkg.com/balena-cli@25.2.8/oclif.manifest.json>)

Hardcoded password in oclif.manifest.json

Public source snippet (untrusted):

```json
patternName = generic_password
severity = medium
line = 3857
```

### 16. Medium: Secret Pattern
- **Category:** Secrets
- **Confidence:** 75.0%
- **Path:** build/utils/messages.js
- **Public source:** [View source](<https://unpkg.com/balena-cli@25.2.8/build/utils/messages.js>)

Hardcoded password in build/utils/messages.js

Public source snippet (untrusted):

```javascript
patternName = generic_password
severity = medium
line = 48
```

### 17. Medium: Secret Pattern
- **Category:** Secrets
- **Confidence:** 75.0%
- **Path:** src/utils/messages.ts
- **Public source:** [View source](<https://unpkg.com/balena-cli@25.2.8/src/utils/messages.ts>)

Hardcoded password in src/utils/messages.ts

Public source snippet (untrusted):

```typescript
patternName = generic_password
severity = medium
line = 80
```

## Dependencies and install lifecycle
- **Lifecycle scripts present:** Yes
- **Published lifecycle scripts:** postinstall, prepare, prepublishOnly
- **Dependencies:** 77
- **Optional dependencies:** 1
- **Peer dependencies:** 0
- **Development dependencies:** 66
- **Published dependency-graph edges:** 78

### Published dependency entries
- @balena/compose ^8.0.4 (Dependency)
- @balena/compose-parser ^0.2.6 (Dependency)
- @balena/dockerignore ^1.0.2 (Dependency)
- @balena/env-parsing ^1.1.8 (Dependency)
- @balena/es-version ^1.0.1 (Dependency)
- @oclif/core ^4.5.6 (Dependency)
- @oclif/plugin-autocomplete ^3.2.34 (Dependency)
- @oclif/plugin-update ^4.7.14 (Dependency)
- @oclif/plugin-version ^2.2.32 (Dependency)
- @sentry/node ^10.17.0 (Dependency)
- balena-config-json ^4.2.7 (Dependency)
- balena-device-init ^8.2.1 (Dependency)
- balena-errors ^4.7.3 (Dependency)
- balena-image-fs ^7.6.0 (Dependency)
- balena-preload ^19.0.0 (Dependency)
- balena-sdk ^23.1.13 (Dependency)
- balena-semver ^4.0.0 (Dependency)
- balena-settings-client ^6.0.0 (Dependency)
- balena-settings-storage ^8.1.0 (Dependency)
- body-parser ^2.0.0 (Dependency)
- bonjour-service ^1.2.1 (Dependency)
- chokidar ^3.5.2 (Dependency)
- cli-truncate ^2.1.0 (Dependency)
- color-hash ^1.1.1 (Dependency)
- common-tags ^1.7.2 (Dependency)
- date-fns ^4.1.0 (Dependency)
- denymount ^2.3.0 (Dependency)
- docker-modem ^5.0.6 (Dependency)
- docker-progress ^5.4.0 (Dependency)
- dockerode ^4.0.5 (Dependency)
- ejs ^3.1.6 (Dependency)
- etcher-sdk ^10.0.0 (Dependency)
- express ^4.22.1 (Dependency)
- fast-boot2 ^1.1.4 (Dependency)
- fast-levenshtein ^3.0.0 (Dependency)
- filenamify ^4.3.0 (Dependency)
- glob ^7.2.0 (Dependency)
- global-agent ^2.2.0 (Dependency)
- global-tunnel-ng ^2.1.1 (Dependency)
- got ^11.8.3 (Dependency)
- humanize 0.0.9 (Dependency)
- indent-string ^4.0.0 (Dependency)
- inquirer ^7.3.3 (Dependency)
- is-elevated ^3.0.0 (Dependency)
- is-root ^2.1.0 (Dependency)
- js-yaml ^4.1.0 (Dependency)
- JSONStream ^1.0.3 (Dependency)
- jwt-decode ^3.1.2 (Dependency)
- livepush ^3.5.2 (Dependency)
- lodash ^4.17.21 (Dependency)
- mime ^2.4.6 (Dependency)
- ndjson ^2.0.0 (Dependency)
- node-cleanup ^2.1.2 (Dependency)
- node-unzip-2 ^0.2.8 (Dependency)
- open ^7.1.0 (Dependency)
- patch-package ^8.0.0 (Dependency)
- prettyjson ^1.2.5 (Dependency)
- progress-stream ^2.0.0 (Dependency)
- reconfix ^1.0.2 (Dependency)
- resin-cli-form ^5.0.0 (Dependency)
- resin-cli-visuals ^4.0.1 (Dependency)
- resin-doodles ^0.2.2 (Dependency)
- resin-stream-logger ^0.1.2 (Dependency)
- semver ^7.3.5 (Dependency)
- shell-escape ^0.2.0 (Dependency)
- split ^1.0.1 (Dependency)
- stream-to-promise ^2.2.0 (Dependency)
- string-width ^4.2.3 (Dependency)
- strip-ansi-stream ^1.0.0 (Dependency)
- tar-stream ^2.1.3 (Dependency)
- tar-utils ^3.0.3 (Dependency)
- through2 ^2.0.3 (Dependency)
- tmp ^0.2.1 (Dependency)
- typed-error ^3.2.1 (Dependency)
- update-notifier ^5.1.0 (Dependency)
- which ^2.0.2 (Dependency)
- window-size ^1.1.0 (Dependency)
- windosu ^0.3.0 (OptionalDependency)

## Package metadata
- **Package:** balena-cli
- **Ecosystem:** npm
- **Version:** 25.2.8
- **License:** Apache-2.0
- **Version published:** 2026-11-02T22:57:29.232Z
- **Package first seen:** 2026-07-01T22:13:21.940Z
- **Package last seen:** 2026-11-03T00:25:33.059Z
- **Known versions:** 6
- **Latest version:** 25.2.9
- **Appeal under review:** No
- **Description:** The official balena Command Line Interface
- **Author:** Balena Ltd.
- **Maintainers:** balena.io
- **Keywords:** balena, balena.io, balenaCloud, balenaOS, resin, resin.io, git
- **Runtime engines:** node: \>=24.11.0 \<25
- **Artifact files:** 613
- **Artifact unpacked size:** 3,468,322 bytes
- **Artifact signatures:** 2
- **Attestations:** Yes
- **Provenance:** https://slsa.dev/provenance/v1

## References
- [HTML security report](<https://firewall.lpm.dev/npm/balena-cli/v/25.2.8>)
- [Repository](<https://github.com/balena-io/balena-cli>)
- [Issues](<https://github.com/balena-io/balena-cli/issues>)
