Skip to content

ProcessBuilder.environment() returns a modifiable map - #300

Closed
mernst wants to merge 1 commit into
typetools:masterfrom
mernst:process-builder-environment-modifiable
Closed

mernst wants to merge 1 commit into
typetools:masterfrom
mernst:process-builder-environment-modifiable

Conversation

@mernst

@mernst mernst commented Oct 3, 2026

Copy link
Copy Markdown
Member

No description provided.

@coderabbitai

coderabbitai Bot commented Oct 3, 2026

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: typetools/jdk/.coderabbit.yaml
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 5daed82c-3a94-4c8c-9966-2e10e26bdaca
📥 Commits

Reviewing files that changed from the base of the PR and between 3c7ab3a and 446b5d7.

📒 Files selected for processing (1)
  • src/java.base/share/classes/java/lang/ProcessBuilder.java

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

ProcessBuilder.environment() now has the @Modifiable return annotation. The method body is unchanged. The related imports were reordered.

Suggested reviewers: yukiyang31

Priority: ⬇️ Low

Change: Bug fix

Merge Risk: ⚪ Minimal · up to 446b5

The annotation accurately describes the existing API behavior, with no runtime changes or actionable merge risk remaining.

Security Architecture Review

Security architecture risk: ⚪ Minimal · up to 446b5

The annotation describes an already-modifiable environment map. It does not grant new process-execution authority, expose the parent environment for modification, or weaken existing permission checks.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • observed — The mutable environment is initialized from a clone for each builder, not by exposing the parent environment's backing map. Its existing downstream scope is child-process configuration on Unix and Windows.

Trust Boundaries and Controls

  • observed — When a SecurityManager is present, environment access retains the getenv.* permission check and process creation retains checkExec. The annotation neither replaces these controls nor creates a new authority transition.
🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files.
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@mernst mernst closed this Oct 3, 2026
@mernst
mernst deleted the process-builder-environment-modifiable branch October 3, 2026 18:14
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