Skip to content

Remove commons-validator, replace its sole usage with guava's InetAddresses.isInetAddress - #464

Open
krzysztof-tobola wants to merge 1 commit into
spiffe:mainfrom
krzysztof-tobola:remove-commons-validator
Open

krzysztof-tobola wants to merge 1 commit into
spiffe:mainfrom
krzysztof-tobola:remove-commons-validator

Conversation

@krzysztof-tobola

Copy link
Copy Markdown

This is a proposal to remove commons-validator dependency and declare Guava explicitly in java-spiffe-core.
This is because of unmaintained transitional dependencies that cause security scanners to raise alerts.

  • The commons-validator InetAddressValidator.getInstance().isValid(..) in Address.validateTcpAddress is replaced with Guava's InetAddresses.isInetAddress(..).

  • The following dependencies are removed:

    +--- commons-validator:commons-validator:1.11.0
    |    +--- commons-beanutils:commons-beanutils:1.11.0
    |    |    +--- commons-logging:commons-logging:1.3.5 -> 1.4.0
    |    |    \--- commons-collections:commons-collections:3.2.2
    |    +--- commons-digester:commons-digester:2.1
    |    +--- commons-logging:commons-logging:1.4.0
    |    \--- commons-collections:commons-collections:3.2.2
    

No public API change. Address validation logic should remain intact, both methods check for a literal IPv4/IPv6 address without a DNS lookup, and reject hostnames, all test cases still pass.

Published POMs change: all three modules drop commons-validator, and java-spiffe-core gains com.google.guava:guava:33.6.0-jre at runtime scope.

…resses.isInetAddress

Signed-off-by: Krzysztof Tobola <krzysztof.tobola@gmail.com>
@krzysztof-tobola
krzysztof-tobola marked this pull request as ready for review September 16, 2026 08:26
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