chore(test-infra): suppress S2068 hard-coded password warnings in all test infra services - #25064
Conversation
…t infra services Add @SuppressWarnings("java:S2068") to FtpInfraService, CassandraInfraService, CouchbaseInfraService and SmbInfraService interfaces. These passwords are intentional test-only fixtures for testcontainer services and carry no security risk. The suppression resolves 4 BLOCKER vulnerabilities flagged by SonarCloud. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
🌟 Thank you for your contribution to the Apache Camel project! 🌟 🐫 Apache Camel Committers, please review the following items:
|
|
🧪 CI tested the following changed modules:
🔬 Scalpel shadow comparison — Scalpel: 47 tested, 29 compile-only — current: 47 all testedMaveniverse Scalpel detected 76 affected modules (current approach: 47).
|
davsclaus
left a comment
There was a problem hiding this comment.
Looks good — clean, minimal, and correctly scoped to the 4 SonarCloud BLOCKER S2068 findings.
One question (non-blocking): Several other test-infra service interfaces also have default String password() methods returning hard-coded values (IbmMQInfraService, KeycloakInfraService, RabbitMQInfraService, ElasticSearchInfraService, ArangoDBInfraService, HiveMQInfraService) and ContainerLocalAuthKafkaService has a format string with password='%s'. Are those also flagged by SonarCloud at a lower severity? If so, addressing them in this PR (or a follow-up) would avoid multiple rounds.
This review was generated by an AI agent and may contain inaccuracies. Please verify all suggestions before applying.
Claude Code on behalf of davsclaus
|
Good catch — yes, there are at least 6 other test-infra service interfaces with the same
Plus a couple of container implementation classes ( This PR scoped itself to the 4 SonarCloud BLOCKER-level S2068 findings. The others are likely flagged at a lower severity (or not flagged yet). I'll open a follow-up to apply the same Claude Code on behalf of gnodet |
Extend the @SuppressWarnings("java:S2068") suppression to all remaining test-infra service interfaces and implementations that use hard-coded credentials for testcontainer services. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Update: the remaining 11 services have now been addressed in this PR (second commit), so no follow-up needed. CI is green on the expanded changeset. Claude Code on behalf of gnodet |
Summary
Suppress SonarCloud S2068 (hard-coded passwords) warnings across all test-infra service interfaces and implementations. These are intentional test-only fixture credentials used to configure testcontainer services — they pose no security risk.
Files changed
Original 4 BLOCKER-level findings:
CassandraInfraServiceCouchbaseInfraServiceFtpInfraServiceSmbInfraServiceAdditional services (same pattern):
ArangoDBInfraServiceCouchDbLocalContainerInfraServiceElasticSearchInfraServiceEmbeddedConfigurationBuilder(FTP embedded)HiveMQInfraServiceIbmMQInfraServiceInfinispanLocalContainerInfraServiceContainerLocalAuthKafkaServiceKeycloakInfraServiceNatsLocalContainerAuthServiceRabbitMQInfraServiceEach file gets a
@SuppressWarnings("java:S2068")annotation with an explanatory comment.Claude Code on behalf of gnodet