Skip to content

Commit

Permalink
Exclude JAVA_TOOL_OPTIONS from environment variables by default (#2210
Browse files Browse the repository at this point in the history
)

* sort excluded env vars alphabetically

* Add JAVA_TOOL_OPTIONS to ignored env vars

* changelog
  • Loading branch information
t4lz authored Jan 29, 2024
1 parent 79ffbe7 commit 3c4f4dc
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 24 deletions.
1 change: 1 addition & 0 deletions changelog.d/+excl-java-env-var.changed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
`JAVA_TOOL_OPTIONS` is excluded by default from the environment variables that are fetched from the target.
49 changes: 25 additions & 24 deletions mirrord/agent/src/env.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,37 +27,38 @@ impl EnvFilter {

let exclude = {
let mut exclude = vec![
WildMatch::new("PATH"),
WildMatch::new("BUNDLER_ORIG_BUNDLER_ORIG_MANPATH"),
WildMatch::new("BUNDLER_ORIG_BUNDLER_VERSION"),
WildMatch::new("BUNDLER_ORIG_BUNDLE_BIN_PATH"),
WildMatch::new("BUNDLER_ORIG_BUNDLE_GEMFILE"),
WildMatch::new("BUNDLER_ORIG_GEM_HOME"),
WildMatch::new("BUNDLER_ORIG_MANPATH"),
WildMatch::new("BUNDLER_ORIG_PATH"),
WildMatch::new("BUNDLER_ORIG_RB_USER_INSTALL"),
WildMatch::new("BUNDLER_ORIG_RUBYLIB"),
WildMatch::new("BUNDLER_ORIG_RUBYOPT"),
WildMatch::new("BUNDLER_VERSION"),
WildMatch::new("BUNDLE_APP_CONFIG"),
WildMatch::new("BUNDLE_BIN_PATH"),
WildMatch::new("BUNDLE_FORCE_RUBY_PLATFORM"),
WildMatch::new("BUNDLE_GEMFILE"),
WildMatch::new("BUNDLE_GEM_PATH"),
WildMatch::new("BUNDLE_PATH"),
WildMatch::new("CLASSPATH"),
WildMatch::new("GEM_HOME"),
WildMatch::new("GEM_PATH"),
WildMatch::new("HOME"),
WildMatch::new("HOMEPATH"),
WildMatch::new("CLASSPATH"),
WildMatch::new("JAVA_EXE"),
WildMatch::new("JAVA_HOME"),
WildMatch::new("PYTHONPATH"),
WildMatch::new("RUST_LOG"),
WildMatch::new("_JAVA_OPTIONS"),
WildMatch::new("GEM_HOME"),
WildMatch::new("GEM_PATH"),
WildMatch::new("BUNDLE_PATH"),
WildMatch::new("BUNDLE_BIN_PATH"),
WildMatch::new("BUNDLE_GEM_PATH"),
WildMatch::new("JAVA_TOOL_OPTIONS"),
WildMatch::new("PATH"),
WildMatch::new("PWD"),
WildMatch::new("BUNDLER_ORIG_GEM_HOME"),
WildMatch::new("BUNDLE_GEMFILE"),
WildMatch::new("PYTHONPATH"),
WildMatch::new("RUBYLIB"),
WildMatch::new("BUNDLER_VERSION"),
WildMatch::new("RUBYOPT"),
WildMatch::new("BUNDLER_ORIG_BUNDLER_VERSION"),
WildMatch::new("BUNDLER_ORIG_BUNDLER_ORIG_MANPATH"),
WildMatch::new("BUNDLER_ORIG_PATH"),
WildMatch::new("BUNDLE_APP_CONFIG"),
WildMatch::new("BUNDLER_ORIG_RUBYOPT"),
WildMatch::new("BUNDLER_ORIG_MANPATH"),
WildMatch::new("BUNDLER_ORIG_BUNDLE_GEMFILE"),
WildMatch::new("BUNDLER_ORIG_RUBYLIB"),
WildMatch::new("BUNDLER_ORIG_RB_USER_INSTALL"),
WildMatch::new("BUNDLE_FORCE_RUBY_PLATFORM"),
WildMatch::new("BUNDLER_ORIG_BUNDLE_BIN_PATH"),
WildMatch::new("RUST_LOG"),
WildMatch::new("_JAVA_OPTIONS"),
];

for selector in &filter_env_vars {
Expand Down

0 comments on commit 3c4f4dc

Please sign in to comment.