Repository navigation
Bump htmlunit 2.70.0 - #54
Merged
Merged
Conversation
maximthomas
pushed a commit
to maximthomas/OpenIG
that referenced
this pull request
Jul 2, 2024
vharseko
added a commit
that referenced
this pull request
Oct 22, 2026
Closes the two open `medium` Java code scanning alerts (#8, #9) and, on the way, note #54. | Alert | Rule | Location | Change | |---|---|---|---| | #8 | `java/local-temp-file-or-directory-information-disclosure` | `Script.java` | The inline Groovy script cache directory was created with `File.createTempFile()` → `delete()` → `mkdir()`: umask permissions (typically `0755`, readable by other local users) plus a TOCTOU window between delete and mkdir. The cached scripts are the `source` of route configs, which may embed credentials. Now created with `Files.createTempDirectory()` (atomic, `0700`); the script files with `Files.createTempFile()` (`0600`); `FileWriter` in try-with-resources. Also closes note #54 (`java/ignored-error-status-of-call` on the removed `mkdir()`). | | #9 | `java/log-injection` | `MQ_IBM.java`, `MQ_Kafka.java` | The consumed message is written to the log as-is; a body containing line breaks could forge log lines. Besides the flagged trace line, the body also reaches the `INFO` log (the shipped root level) when the root handler is not set yet — the consumers start with the heap, so messages already queued at startup take that branch. `MQ_Kafka` has the same two sinks; its trace line prints the consumed record with its `String` key. All four now go through `MQLog.forLog()`, which replaces line breaks. | | — | not flagged | `MQ_IBM.java` | The debug dump of the connection factory settings printed every property, including `XMSC_PASSWORD`. The password value is now masked (`MQ_IBM.settingForLog()`). | Tests added: - `ScriptTest`: `shouldCreateInlineScriptCacheDirectoryReadableByOwnerOnly` and `shouldCreateInlineScriptFileReadableByOwnerOnly` — both failed before the fix with `GROUP_READ, GROUP_EXECUTE, OTHERS_READ, OTHERS_EXECUTE` present. They tell the fix from umask-derived permissions only under a group/other-readable umask such as the default `022`, and are skipped on non-POSIX file systems (the Windows runners in the build matrix). - `MQLogTest`: pins `MQLog.forLog()` and `MQ_IBM.settingForLog()` — with either helper body reverted to returning its input, its test fails. The handlers themselves are not exercised: `MQ_IBMTest` runs in the suite, but without a live IBM MQ broker (see the `docker run` comment in it) it only goes through the connection-failure paths and asserts nothing. `MQ_IBM.java` and `MQ_Kafka.java` had no license header; both were created in 2021 by 3A Systems, so a CDDL header with `Copyright 2021-2026 3A Systems, LLC.` is added.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.