Skip to content

Fix bundled environment/network safety finding - #389

Merged
goldmar merged 2 commits into
mainfrom
agent/review-oca-env-network-finding
Aug 1, 2026
Merged

Fix bundled environment/network safety finding#389
goldmar merged 2 commits into
mainfrom
agent/review-oca-env-network-finding

Conversation

@goldmar

@goldmar goldmar commented Aug 1, 2026

Copy link
Copy Markdown
Owner

Summary

  • isolate npm registry release metadata fetching in a network-only generated chunk
  • keep environment-dependent orchestration out of that network-capable chunk
  • remove the env-harvesting scanner exception so any recurrence fails the packed-plugin security gate

Root cause

The scanner finding was a bundle-level false positive rather than an observed secret dataflow: dist/index.js combined unrelated process.env reads with the auto-update service's fixed public npm registry request. Keeping both capabilities in one generated file made that distinction impossible for the file-level scanner.

Impact

Auto-update discovery continues to query the same fixed npm registry endpoint with the same timeout and response validation. The generated npm client chunk has network access but no environment access; environment-aware chunks have no direct network send.

Validation

  • pnpm test:file tests/auto-update.test.ts tests/plugin-security-check.test.ts
  • pnpm verify
  • pnpm check-plugin-security
  • pnpm audit --prod
  • git diff --check
  • inspected pnpm pack contents for dist/index.js and all required chunks

@github-actions

github-actions Bot commented Aug 1, 2026

Copy link
Copy Markdown

Bundle Size Report

Runtime file Size
dist/chunks/agent-pr.js 0.6 KB
dist/chunks/chunk.js 110.1 KB
dist/chunks/npm-release-client.js 0.2 KB
dist/index.js 417.8 KB
Total 528.8 KB
Limit Status
600.0 KB ✅ Within limit

Complete bundle is within the 600.0 KB limit.

@goldmar

goldmar commented Aug 1, 2026

Copy link
Copy Markdown
Owner Author

🔄 New commits pushed

8 new commits (+330 / -106)

Latest commits:

3bcbe76 fix(security): isolate npm release network access (Mark Goldenstein)
df5b343 chore(deps-dev): bump @types/node from 26.1.1 to 26.1.2 (#387) (dependabot[bot])
4946683 chore(deps): bump @anthropic-ai/claude-agent-sdk from 0.3.217 to 0.3.220 (#386) (dependabot[bot])
51b004a fix(opencode): report persisted session cost (#383) (Torrey Leonard)
b5c3f4a ci: scan fork pull requests with CodeQL (#385) (Mark)
...and 3 more commits


🤖 openclaw-code-agent

@goldmar
goldmar marked this pull request as ready for review August 1, 2026 20:53
@goldmar

goldmar commented Aug 1, 2026

Copy link
Copy Markdown
Owner Author

@codex review this

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3bcbe766c3

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread package.json
@goldmar

goldmar commented Aug 1, 2026

Copy link
Copy Markdown
Owner Author

@codex review again

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Breezy!

Reviewed commit: 90fd203c6c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@goldmar
goldmar merged commit 378cf53 into main Aug 1, 2026
10 checks passed
@goldmar
goldmar deleted the agent/review-oca-env-network-finding branch August 1, 2026 23:21
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