-
Notifications
You must be signed in to change notification settings - Fork 0
fix(native): trim native image reachability #44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
ayagmar
wants to merge
4
commits into
master
Choose a base branch
from
autoresearch/native-image-size-20260313
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
e5ae32c
fix(native): trim native image reachability
ayagmar 0f0398f
keep native-size win by building with a security-properties overlay t…
ayagmar dcdd8af
replace the included JDK security overlay with a minimal full java.se…
ayagmar 227a636
drop keystore.type.compat from the minimal native java.security repla…
ayagmar File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| security.provider.1=SUN | ||
| security.provider.2=SunRsaSign | ||
| security.provider.3=SunEC | ||
| security.provider.4=SunJSSE | ||
| security.provider.5=SunJCE | ||
| security.provider.6=SunJGSS | ||
| security.provider.7=SunSASL | ||
| security.provider.8=XMLDSig | ||
| security.provider.9=SunPCSC | ||
| security.provider.10=JdkSASL | ||
| security.provider.11=SunPKCS11 | ||
| keystore.type=pkcs12 | ||
| ssl.KeyManagerFactory.algorithm=SunX509 | ||
| ssl.TrustManagerFactory.algorithm=PKIX | ||
| securerandom.source=file:/dev/random | ||
| securerandom.strongAlgorithms=NativePRNGBlocking:SUN,DRBG:SUN | ||
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
44 changes: 44 additions & 0 deletions
44
src/main/java/dev/ayagmar/quarkusforge/cli/CliCommandLineFactory.java
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| package dev.ayagmar.quarkusforge.cli; | ||
|
|
||
| import picocli.CommandLine; | ||
|
|
||
| final class CliCommandLineFactory { | ||
| private CliCommandLineFactory() {} | ||
|
|
||
| static <T extends HeadlessRunner> CommandLine create(T command) { | ||
| CommandLine commandLine = new CommandLine(command); | ||
| addRequestOptionsMixin(commandLine, command); | ||
|
|
||
| GenerateCommand generateCommand = new GenerateCommand(command); | ||
| CommandLine generateCommandLine = new CommandLine(generateCommand); | ||
| generateCommandLine.addMixin("requestOptions", generateCommand.requestOptions()); | ||
| commandLine.addSubcommand("generate", generateCommandLine); | ||
|
|
||
| commandLine.getCommandSpec().version(CliVersionProvider.resolveVersion()); | ||
| commandLine.setExecutionStrategy( | ||
| parseResult -> { | ||
| recordMatchedRequestOptions(parseResult); | ||
| return new CommandLine.RunLast().execute(parseResult); | ||
| }); | ||
| return commandLine; | ||
| } | ||
|
|
||
| private static void addRequestOptionsMixin(CommandLine commandLine, HeadlessRunner command) { | ||
| if (command instanceof QuarkusForgeCli quarkusForgeCli) { | ||
| commandLine.addMixin("requestOptions", quarkusForgeCli.requestOptions()); | ||
| } | ||
| } | ||
|
|
||
| private static void recordMatchedRequestOptions(CommandLine.ParseResult parseResult) { | ||
| for (CommandLine.ParseResult current = parseResult; | ||
| current != null; | ||
| current = current.subcommand()) { | ||
| Object userObject = current.commandSpec().userObject(); | ||
| if (userObject instanceof QuarkusForgeCli quarkusForgeCli) { | ||
| quarkusForgeCli.requestOptions().recordMatchedOptions(current); | ||
| } else if (userObject instanceof GenerateCommand generateCommand) { | ||
| generateCommand.requestOptions().recordMatchedOptions(current); | ||
| } | ||
| } | ||
| } | ||
| } | ||
|
coderabbitai[bot] marked this conversation as resolved.
|
||
31 changes: 1 addition & 30 deletions
31
src/main/java/dev/ayagmar/quarkusforge/cli/CliVersionProvider.java
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Repository: ayagmar/quarkus-forge
Length of output: 376
🏁 Script executed:
Repository: ayagmar/quarkus-forge
Length of output: 1510
Add
jdk.tls.disabledAlgorithmsandjdk.certpath.disabledAlgorithmsto the security configuration.The custom security properties file replaces JDK defaults entirely when set via
-Djava.security.properties. Without explicitly disabling weak algorithms (MD5, SHA1withRSA, TLSv1, TLSv1.1), the native image will accept deprecated protocols and signatures. These restrictions must be added to this configuration file to prevent use of insecure algorithms.🤖 Prompt for AI Agents