Skip to content

docs(npm): document Socket integrations - #11268

Merged
jdx merged 3 commits into
mainfrom
codex/docs-socket-aube
Jul 24, 2026
Merged

jdx merged 3 commits into
mainfrom
codex/docs-socket-aube

Conversation

@jdx

@jdx jdx commented Jul 24, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • document using Socket's Bun-compatible security scanner with mise's embedded aube installer
  • explain the synthetic-project module-resolution caveat and absolute wrapper setup
  • document wrapping npm tool installs with Socket Firewall and clarify Socket's upstream support boundary

Validation

  • mise run docs:build
  • mise run lint-fix
  • pre-commit mise run lint

Note

Low Risk
Documentation-only change to the npm backend guide; no runtime or install behavior changes.

Overview
Adds a Socket security section to the npm backend docs, covering two integration paths for npm: tools installed via mise.

The Bun-compatible security scanner path documents enabling Socket through embedded aube via AUBE_SECURITY_SCANNER (with MISE_NPM_PACKAGE_MANAGER=aube), when the scan runs, fail-closed behavior, the synthetic-project module-resolution caveat and absolute scanner.mjs wrapper pattern, Node.js 22.6+, and relevant env vars.

The Socket Firewall path documents wrapping mise with sfw, notes proxy/CA behavior through aube-registry, and states that Socket’s upstream docs target npm/yarn/pnpm—not mise/aube—so interoperability is not guaranteed.

Reviewed by Cursor Bugbot for commit 728765a. Bugbot is set up for automated code reviews on this repo. Configure here.

Summary by CodeRabbit

  • Documentation
    • Added new “Socket security” guidance for using Socket with npm: tools installed via mise, including a Bun-compatible security scanner workflow that blocks installs on fatal findings.
    • Documented scanner setup requirements, including environment/config expectations and Node.js version guidance.
    • Added “Socket Firewall” documentation, explaining how it forwards proxy and certificate authority settings (e.g., HTTP_PROXY, HTTPS_PROXY, NO_PROXY, NODE_EXTRA_CA_CERTS).

@coderabbitai

coderabbitai Bot commented Jul 24, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Adds npm backend documentation for Socket’s Bun-compatible security scanner and Socket Firewall integrations, including configuration, execution timing, credential handling, and proxy or CA settings.

Changes

npm Socket security documentation

Layer / File(s) Summary
Document Socket security integrations
docs/dev-tools/backends/npm.md
Adds guidance for configuring the Socket Security Scanner through AUBE_SECURITY_SCANNER and using Socket Firewall through sfw, including scanner timing and network settings.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Poem

I’m a bunny with docs in my paws,
Hopping through scanners and firewall laws.
npm tools now know where to go,
With safer paths in the setup flow.
Hop hop hooray—security grows!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the PR’s main change: documenting Socket integrations for npm workflows.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@greptile-apps

greptile-apps Bot commented Jul 24, 2026 •

Copy link
Copy Markdown
Contributor

Greptile Summary

Adds npm backend documentation for integrating Socket through aube’s Bun-compatible scanner or Socket Firewall.

  • Documents scanner configuration, module resolution, failure behavior, and runtime requirements.
  • Provides Socket Firewall wrapper examples and describes proxy, CA, and upstream-support considerations.

Confidence Score: 5/5

The documentation-only change appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
docs/dev-tools/backends/npm.md Adds documentation-only guidance for two Socket integration approaches without modifying runtime behavior.

Reviews (3): Last reviewed commit: "docs(npm): clarify Socket CA handling" | Re-trigger Greptile

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/dev-tools/backends/npm.md`:
- Around line 60-69: Update the scanner example to explicitly select the
embedded aube installer, such as by setting npm.package_manager=aube alongside
AUBE_SECURITY_SCANNER, so the documented install always uses scanner-enabled
aube rather than falling back to npm under the default auto setting.
- Around line 103-105: Update the documentation around the mise npm metadata
client and embedded aube installer to state that proxy settings are handled at
the firewall layer, but remove them from the claim that NODE_EXTRA_CA_CERTS
configures those components. Scope NODE_EXTRA_CA_CERTS to the Node-based Socket
scanner subprocess, and document npm.shell_out as the npm-specific option when
mise/aube TLS trust depends on npm configuration.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Central YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro Plus

Run ID: 79c0f33e-bd09-4749-8052-7a3a3c5efaab

📥 Commits

Reviewing files that changed from the base of the PR and between 211cc09 and 08d2877.

📒 Files selected for processing (1)
  • docs/dev-tools/backends/npm.md

Comment thread docs/dev-tools/backends/npm.md
Comment thread docs/dev-tools/backends/npm.md Outdated
Comment on lines +103 to +105
This works at the network layer. Mise's npm metadata client and embedded aube
installer honor the `HTTP_PROXY`, `HTTPS_PROXY`, `NO_PROXY`, and
`NODE_EXTRA_CA_CERTS` configuration injected by the firewall. Socket currently

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
rg -n -C4 'NODE_EXTRA_CA_CERTS|cafile|strict-ssl|HTTP_PROXY|HTTPS_PROXY|NO_PROXY' src

Repository: jdx/mise

Length of output: 742


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== candidate files =="
fd -a 'npm.md|npm.rs|.*aube.*|aube' . | sed 's#^\./##' | head -200

echo
echo "== docs context =="
sed -n '80,125p' docs/dev-tools/backends/npm.md 2>/dev/null || true

echo
echo "== code search backend/npm and aube references =="
rg -n -C3 'NODE_EXTRA_CA_CERTS|cafile|TLS|TLS_CONFIG|reqwest|rustls|proxy|ca |certificate|aube|Aube|npm|npm view|HTTP_PROXY|HTTPS_PROXY|NO_PROXY' src docs -S | head -300

echo
echo "== npm.rs outline around proxy/config =="
ast-grep outline src/backend/npm.rs --match 'npm' --view expanded 2>/dev/null || true

Repository: jdx/mise

Length of output: 17662


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== npm metadata/client config usage =="
sed -n '1,140p' src/backend/npm.rs
sed -n '140,560p' src/backend/npm.rs | sed -n '1,120p'
rg -n -C5 'NODE_EXTRA_CA_CERTS|HTTP_PROXY|HTTPS_PROXY|NO_PROXY|cafile|npm_config_cafile|npm_config_ca|registry\.npmjs|metadata|npm_view|list_remote' src/backend/npm.rs src -S
echo
echo "== npm crate deps/package files that may define npm/lib npm view implementation =="
rg -n '"npm"|npm' Cargo.toml Cargo.lock -C5 | head -200
echo
echo "== aube provider docs and code =="
sed -n '1,220p' src/deps/providers/aube.rs
cat registry/aube.toml
rg -n -C4 'ca|tls|proxy|HTTP_PROXY|HTTPS_PROXY|NODE_EXTRA_CA_CERTS|registry|certificate|cafile|strict-ssl' src/deps/providers/aube.rs registry/aube.toml docs -S

echo
echo "== package files =="
fd -a '(Cargo\.lock|Cargo\.toml|package\.json|pnpm-lock\.yaml|npm-aube|aube)' . | sed 's#^\./##' | head -200

Repository: jdx/mise

Length of output: 50365


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== npm_registry.rs =="
sed -n '1,180p' src/backend/npm_registry.rs

echo
echo "== aube provider env/client setup =="
sed -n '1,180p' src/deps/providers/aube.rs

echo
echo "== focused env var searches =="
for p in src/backend/npm.rs src/backend/npm_registry.rs src/deps/providers/aube.rs; do
  echo "--- $p"
  rg -n -C3 'NODE_EXTRA_CA_CERTS|HTTP_PROXY|HTTPS_PROXY|NO_PROXY|cafile|ca_url|ca-file|strict-ssl|set_ca|rustls|native-certs|proxy|reqwest|RegistryClient|Aube' "$p" || true
done

echo
echo "== docs aube registry references =="
rg -n -C3 'aube|NODE_EXTRA_CA_CERTS|cafile|strict-ssl|HTTP_PROXY|HTTPS_PROXY|NO_PROXY' registry docs -S || true

Repository: jdx/mise

Length of output: 29099


🌐 Web query:

nodejs NODE_EXTRA_CA_CERTS reads on startup documentation

💡 Result:

The environment variable NODE_EXTRA_CA_CERTS is read by Node.js only when the process is first launched [1][2]. Because it is processed during the initial startup sequence, changes made to process.env.NODE_EXTRA_CA_CERTS at runtime have no effect on the current process [1][2]. When set, this variable directs Node.js to extend the well-known "root" Certificate Authorities (CAs) with additional certificates provided in the specified file [1][2]. The target file must contain one or more trusted certificates in PEM format [1][2]. Important behavioral notes from official documentation include: - Warnings: If the specified file is missing or malformed, Node.js will emit a warning exactly once using process.emitWarning, but will otherwise ignore any errors [1][2]. - Scope: The extra certificates are not used if the ca options property is explicitly specified for a TLS or HTTPS client or server [1][2]. - Security Restrictions: This environment variable is ignored if the Node.js process is running as setuid root or has Linux file capabilities set [1][2]. - Initialization: Because the variable is read at startup, setting it within a Node.js --env-file will not work, as the environment variable is read before the --env-file is parsed and loaded [3].

Citations:


Scope NODE_EXTRA_CA_CERTS to the Socket scanner only.

NODE_EXTRA_CA_CERTS is consumed by Node when it starts, so it does not configure mise’s Rust npm registry client or embedded aube. Mention proxy handling at the firewall layer, then limit this variable to the Node subprocess such as the Socket scanner; for mise/aube, document the npm-only option (npm.shell_out) if TLS CA trust depends on npm-specific config.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/dev-tools/backends/npm.md` around lines 103 - 105, Update the
documentation around the mise npm metadata client and embedded aube installer to
state that proxy settings are handled at the firewall layer, but remove them
from the claim that NODE_EXTRA_CA_CERTS configures those components. Scope
NODE_EXTRA_CA_CERTS to the Node-based Socket scanner subprocess, and document
npm.shell_out as the npm-specific option when mise/aube TLS trust depends on npm
configuration.

@github-actions

Copy link
Copy Markdown
Contributor

Hyperfine Performance

mise x -- echo

Command Mean [ms] Min [ms] Max [ms] Relative
mise-2026.7.12 x -- echo 20.3 ± 2.6 18.0 34.7 1.00
mise x -- echo 21.5 ± 1.5 19.6 29.2 1.06 ± 0.15

mise env

Command Mean [ms] Min [ms] Max [ms] Relative
mise-2026.7.12 env 18.7 ± 0.8 17.2 22.0 1.00
mise env 20.9 ± 1.9 18.5 47.2 1.11 ± 0.11
⚠️ Inconclusive: env measured 11% slower, but hyperfine reported statistical outliers.

mise hook-env

Command Mean [ms] Min [ms] Max [ms] Relative
mise-2026.7.12 hook-env 25.7 ± 10.9 17.8 77.0 1.20 ± 0.51
mise hook-env 21.5 ± 1.0 19.1 25.9 1.00
✅ Performance improvement for hook-env is 20%

mise ls

Command Mean [ms] Min [ms] Max [ms] Relative
mise-2026.7.12 ls 16.7 ± 0.7 15.4 20.5 1.00
mise ls 18.5 ± 1.0 16.8 23.1 1.11 ± 0.08
⚠️ Inconclusive: ls measured 11% slower, but the relative uncertainty overlaps the 10% threshold.

xtasks/test/perf

Command mise-2026.7.12 mise Variance
install (cached) 161ms 176ms -8%
ls (cached) 63ms 64ms -1%
bin-paths (cached) 65ms 67ms -2%
task-ls (cached) 133ms 137ms -2%

@jdx
jdx enabled auto-merge (squash) July 24, 2026 17:13
@jdx
jdx merged commit 1fb5e3b into main Jul 24, 2026
35 checks passed
@jdx
jdx deleted the codex/docs-socket-aube branch July 24, 2026 17:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant