Files
clean-architecture-backend-…/config/spotbugs/exclude.xml
T
DongHyeonka cbfa776270 build!: 시험 classpath·이미지 고정·카탈로그·API surface 입력을 정본대로 맞춘다
문제:
- ca.spring-library가 모든 spring leaf(30)의 testImplementation에
  spring-boot-starter-webmvc-test를 넣어, MockMvc를 쓰지 않는 23 leaf가 Tomcat을
  시험 classpath에 resolve하고 lock했다.
- container-images.properties 머리말은 「digest로 고정」이라는데 postgres-17·18이
  tag만이었다. 머리말은 「쓰는 lane만 다시 돈다」고 했지만 파일 전체가 모든 Test
  task의 입력이라 이미지 하나만 바꿔도 모든 lane이 다시 돈다. postgres-16-4는
  아무도 읽지 않았다.
- libs.versions.toml에 아무도 읽지 않는 칸이 있었다(라이브러리 9, 버전 4,
  루트에 적용하지 않는 플러그인 4).
- config/spotbugs/exclude.xml에 없는 클래스의 항목이 있었다(exclude-test.xml에
  이미 있다).
- notification의 API surface가 상대 경로로 application-notification 소스를
  가리켰고, ApiSurface 플러그인은 없는 추가 root를 말없이 건너뛰어 승인 update가
  줄어든 표면을 기록할 수 있었다.
- verify-mongodb-platform.sh가 고르는 클래스가 없는 :app-bootstrap:test
  --tests '*CleanArchitectureTest'를 불러 늘 실패했고, 이미지 기록이 카탈로그와
  다른 tag였다.

고친 것:
- 규약은 spring-boot-starter-test만 준다. 시험이 실제로 쓰는 것을 leaf가 직접
  선언한다. MockMvc를 쓰는 web·web-advanced·web-fileserver·web-notification·
  app-bootstrap은 webmvc-test starter, graphql은 TestRestTemplate의
  spring-boot-resttestclient, durable-operation은 WebApplicationContextRunner의
  spring-web, 시험이 JSON을 읽는 objectstorage·persistence-jpa·persistence-mongo·
  notification-platform은 jackson-databind, redis-runtime은 jackson-annotations
  (compileOnly, 본 코드와 같은 이유)다. 모든 Java source set을 한 빌드에서 컴파일해
  빠진 곳이 없음을 확인하고 lockfile을 다시 만들었다(Tomcat·webmvc 시험 자동설정이
  빠짐). graphql·persistence-mongo AGENTS의 허용·시험 목록을 같이 고쳤다.
- postgres 17·18을 desktop runner에서 받은 digest로 고정했다(17.11, 18.6). 목록을
  읽을 때 digest 없는 값을 GradleException으로 거절한다(ContainerImageCatalogTest).
  머리말을 실제 캐시 동작으로 고쳤고 postgres-16-4를 지웠다. persistence-jpa
  release registry의 PostgreSQL tag는 아무도 읽지 않아 지우고, 이미지는 카탈로그가
  정한다고 적었다.
- 카탈로그의 미사용 칸을 지우고 머리말을 지금 쓰임에 맞췄다.
- 죽은 spotbugs 항목을 지웠다.
- notification은 project(':application-notification')로 root를 잡고, 없는 추가
  root는 설정 단계에서 실패한다(ApiSurfaceConventionTest).
- mongo 스크립트는 :app-bootstrap:architectureTest를 부르고, 이미지 기록은
  카탈로그 mongo-8 값을 읽는다.
- graphql build.gradle에 앞 커밋의 document-contract lane을 함께 둔다. 저장소 루트
  (ca.repository.root)와 읽는 registry 파일은 그 lane만 받고, 시험은 그 속성으로만
  루트를 읽는다(cwd에서 거슬러 찾지 않는다).
버린 대안: 이미지마다 쓰는 lane을 선언해 입력을 나누기 — lane 수십 개에 키
목록을 다시 적어야 하고 빠뜨리면 캐시가 거짓 통과한다.

검증: 아래 PR 본문(desktop resolveAndLockAll·build-logic test·모든 source set 컴파일·
leaf check).

BREAKING CHANGE: ca.spring-library가 시험 classpath에 spring-boot-starter-webmvc-test를
넣지 않는다. MockMvc·TestRestTemplate·Jackson을 그 starter로 받던 파생 leaf는 의존을
직접 선언해야 시험이 컴파일된다. 카탈로그의 digest 없는 이미지와 없는 API surface 추가
root는 설정 단계에서 실패한다. version catalog의 미사용 칸을 지웠다. 할 일은
docs/upgrade/2026-11-round9-build.md다.

Refs: RR9-04-06, RR9-04-11, RR9-04-12, RR9-04-13, RR9-04-14, RR9-04-15, RR9-04-16
2026-11-13 06:34:32 +09:00

376 lines
25 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<!--
feature-static-analysis-quality-contract D3/D4 — SpotBugs + FindSecBugs exclude filter.
SpotBugs (D3) and FindSecBugs (D4, via spotbugsPlugins) analyse bytecode. Inter-procedural
taint analysis has known limits (FindSecBugs false positives) and generated code carries
patterns the source author never wrote. Add ONLY confirmed false positives here, each as a
narrowly-scoped <Match> — never a blanket bug-pattern exclusion across all sources.
Reference: https://github.com/spotbugs/spotbugs / https://find-sec-bugs.github.io/
-->
<FindBugsFilter>
<!-- Generated sources (MapStruct / annotation processors): exclude from analysis. -->
<Match>
<Source name="~.*[\\/]generated[\\/].*"/>
</Match>
<!-- SPRING_CSRF_PROTECTION_DISABLED on the two production chains is intentional: the API chain
and the actuator chain authenticate a stateless JWT bearer token (no session cookies, no
ambient credential a browser would attach), so CSRF protection has nothing to protect.
FindSecBugs flags it for classic cookie-session web apps; it is a false positive here.
Named classes, not `~.*SecurityConfig`: that pattern would also match an HTTP Basic chain,
for which this reason is false — a browser re-sends Basic credentials on its own — and would
hide a Basic chain's CSRF exposure (review 2026-11-03 RR-07-05). -->
<Match>
<Bug pattern="SPRING_CSRF_PROTECTION_DISABLED"/>
<Or>
<Class name="dev.caskeleton.adapter.inbound.web.auth.SecurityConfig"/>
<Class name="dev.caskeleton.composition.runtime.management.security.ManagementSecurityConfig"/>
</Or>
</Match>
<!-- Test-only real-HTTP GraphQL qualification uses explicit Authorization headers and disables
CSRF only inside its nested test application so it can isolate auth/CORS/error-boundary
behavior. It is not imported or component-scanned by production. Keep the exception exact
to the nested fixture class; any other CSRF disable remains reportable. -->
<Match>
<Bug pattern="SPRING_CSRF_PROTECTION_DISABLED"/>
<Class name="dev.caskeleton.adapter.inbound.graphql.GraphqlHttpBoundaryQualificationTest$TestSecurityConfiguration"/>
</Match>
<!-- Provider notification callbacks are inbound webhooks: an external provider POSTs to
/internal/notification/callbacks/**, so it can never carry a CSRF token, and the chain is
SESSION-STATELESS with no ambient cookie auth for CSRF to protect. Authenticity comes from
the provider signature the callback package verifies (a failure raises
CallbackValidationException -> 400), not from permitAll(). Scoped to this exact
configuration class; any other CSRF disable remains reportable. -->
<Match>
<Bug pattern="SPRING_CSRF_PROTECTION_DISABLED"/>
<Class name="dev.caskeleton.adapter.inbound.web.notification.platform.callback.CallbackMvcSecurityConfiguration"/>
</Match>
<!-- Test-only violation fixture intentionally calls unsafe Jackson default typing so
architecture tests can prove the boundary rule catches it. Production and non-fixture
test classes remain covered by SECUJDES. -->
<Match>
<Bug code="SECUJDES"/>
<Source name="DefaultTypingFixture.java"/>
</Match>
<!-- =========================================================================================
Confidence MEDIUM (review 2026-11-01 08-07). Everything below was added when the report
level went from HIGH to MEDIUM. Each entry was judged against the code it names; defects
were fixed in the code instead of listed here. Counts are in QualityConventionsPlugin.
========================================================================================= -->
<!-- EI_EXPOSE_REP / EI_EXPOSE_REP2, pattern 1 of 4 — references that are not values.
SpotBugs calls any field "mutable" whose type has a set/add/remove/delete/write-shaped
method, and asks for a copy whenever one is stored from a parameter or returned. For a
field that holds a collaborator (a port, a repository, an EntityManager, a MeterRegistry,
an executor, a template, a settings bean), a handle (a channel, a future, a reflected
Method, an exception kept as a cause) or a nested setter-bound settings object, sharing the
reference is the design: constructor injection stores collaborators, and a copy would be a
different collaborator. The check stays on for the types where a copy IS the remedy —
collections, arrays, Date, ByteBuffer and JSON trees — so a value type that keeps a
caller's list or array is still reported. SpotBugs field types are exact names, not
patterns: an array of any other element type is not re-checked by this list. -->
<Match>
<Bug pattern="EI_EXPOSE_REP,EI_EXPOSE_REP2"/>
<Not>
<Or>
<Field type="java.util.Collection"/>
<Field type="java.util.List"/>
<Field type="java.util.Set"/>
<Field type="java.util.SortedSet"/>
<Field type="java.util.NavigableSet"/>
<Field type="java.util.Queue"/>
<Field type="java.util.Deque"/>
<Field type="java.util.Map"/>
<Field type="java.util.SortedMap"/>
<Field type="java.util.NavigableMap"/>
<Field type="java.util.ArrayList"/>
<Field type="java.util.LinkedList"/>
<Field type="java.util.HashSet"/>
<Field type="java.util.LinkedHashSet"/>
<Field type="java.util.TreeSet"/>
<Field type="java.util.EnumSet"/>
<Field type="java.util.HashMap"/>
<Field type="java.util.LinkedHashMap"/>
<Field type="java.util.TreeMap"/>
<Field type="java.util.EnumMap"/>
<Field type="java.util.Date"/>
<Field type="java.nio.ByteBuffer"/>
<Field type="byte[]"/>
<Field type="char[]"/>
<Field type="short[]"/>
<Field type="int[]"/>
<Field type="long[]"/>
<Field type="float[]"/>
<Field type="double[]"/>
<Field type="boolean[]"/>
<Field type="java.lang.Object[]"/>
<Field type="java.lang.String[]"/>
<Field type="tools.jackson.databind.JsonNode"/>
<Field type="tools.jackson.databind.node.ObjectNode"/>
<Field type="tools.jackson.databind.node.ArrayNode"/>
<Field type="com.fasterxml.jackson.databind.JsonNode"/>
<Field type="com.fasterxml.jackson.databind.node.ObjectNode"/>
<Field type="com.fasterxml.jackson.databind.node.ArrayNode"/>
</Or>
</Not>
</Match>
<!-- EI pattern 2 of 4 — transport DTOs. A request or response body under adapter.inbound is
built per request by Jackson (or by a mapper for the response), handed to one mapper or one
serializer, and dropped; the command or domain type it maps to owns the copy and the
invariants (AGENTS.md: inbound DTOs never cross into the cores), so no instance outlives
the request. BulkEnvelope is the shared response envelope with the same lifetime. -->
<Match>
<Bug pattern="EI_EXPOSE_REP,EI_EXPOSE_REP2"/>
<Or>
<Class name="~dev\.caskeleton\.(.*\.)?adapter\.inbound\..*(Request|Response)"/>
<Class name="dev.caskeleton.shared.response.BulkEnvelope"/>
</Or>
</Match>
<!-- EI pattern 3 of 4 — settings binding carriers. Setter-bound @ConfigurationProperties
JavaBeans are mutable by contract (a public setter opens more than the getter does), and
the constructor-bound records listed here have no invariant of their own: each is read
once at startup by the factory that compiles it into the runtime type, and that factory
copies (HttpClientProfileFactory and DynamicTargetAutoConfiguration Set.copyOf every list;
RedisRuntimeAutoConfiguration validates and maps; FileserverStartupValidator reads the
ancestors once). A settings record that validates a collection in its own constructor
copies it there instead (FileserverPlatformSettings.Security). -->
<Match>
<Bug pattern="EI_EXPOSE_REP,EI_EXPOSE_REP2"/>
<Or>
<Class name="dev.caskeleton.adapter.outbound.cache.redis.capability.RedisCapabilitySettings$Cache"/>
<Class name="dev.caskeleton.adapter.outbound.cache.redis.capability.RedisCapabilitySettings$RateLimit"/>
<Class name="dev.caskeleton.adapter.outbound.cache.redis.runtime.config.RedisRuntimeSettings"/>
<Class name="dev.caskeleton.adapter.outbound.cache.redis.runtime.config.RedisRuntimeSettings$Sentinel"/>
<Class name="dev.caskeleton.adapter.outbound.httpclient.autoconfigure.HttpClientPlatformSettings$ClientSettings"/>
<Class name="dev.caskeleton.adapter.outbound.httpclient.autoconfigure.HttpClientPlatformSettings$DynamicTargetSettings"/>
<Class name="dev.caskeleton.adapter.outbound.httpclient.autoconfigure.HttpClientPlatformSettings$Response"/>
<Class name="dev.caskeleton.adapter.outbound.httpclient.autoconfigure.HttpClientPlatformSettings$Authentication"/>
<Class name="dev.caskeleton.adapter.outbound.httpclient.autoconfigure.HttpClientPlatformSettings$Tls"/>
<Class name="dev.caskeleton.adapter.outbound.fileserver.platform.autoconfigure.FileserverPlatformSettings$Storage"/>
</Or>
</Match>
<!-- EI pattern 4 of 4 — the collection is already an unmodifiable copy. Each field below is
assigned an unmodifiable collection at construction (List/Set/Map.copyOf,
Collectors.toUnmodifiable*, Stream.toList, Collections.unmodifiable* over a fresh copy),
but through a branch, a stream or a private constructor fed by a copying factory, which
SpotBugs does not follow; it recognises only a field assigned straight from copyOf. Listed
by class and field, so another collection added to the same class is still reported. -->
<Match>
<Bug pattern="EI_EXPOSE_REP,EI_EXPOSE_REP2"/>
<Or>
<And><Class name="dev.caskeleton.adapter.inbound.graphql.pagination.GraphQlCursorPayload"/><Field name="keyset"/></And>
<And><Class name="dev.caskeleton.adapter.inbound.graphql.runtime.GraphQlExecutionRequest"/><Field name="variables"/></And>
<And><Class name="dev.caskeleton.adapter.inbound.web.authz.RolePermissionPolicy"/><Field name="rolePermissions"/></And>
<And><Class name="dev.caskeleton.adapter.outbound.httpclient.api.operation.HttpOperation"/><Field name="headers"/></And>
<And><Class name="dev.caskeleton.adapter.outbound.httpclient.profile.ResponseLimits"/><Field name="allowedContentTypes"/></And>
<And><Class name="dev.caskeleton.adapter.outbound.notification.platform.autoconfigure.NotificationPlatformSecretsConfig$NotificationSecretsSettings"/><Field name="historicalKeys"/></And>
<And><Class name="dev.caskeleton.adapter.outbound.notification.platform.callback.ProviderCallbackVerificationRequest"/><Field name="headers"/></And>
<And><Class name="dev.caskeleton.adapter.outbound.objectstorage.config.ObjectStorageCapabilitySettings"/><Field name="~providers|destinations"/></And>
<And><Class name="dev.caskeleton.adapter.outbound.persistence.postgresql.PostgreSqlSqlStateErrorMapping"/><Field name="~MAPPINGS|COMMIT_OUTCOME_UNKNOWN"/></And>
<And><Class name="dev.caskeleton.adapter.outbound.persistence.security.DatabaseRolePolicy"/><Field name="allowedRoles"/></And>
<And><Class name="dev.caskeleton.adapter.outbound.persistence.security.SearchPathPolicy"/><Field name="allowedSchemas"/></And>
<And><Class name="dev.caskeleton.adapter.outbound.mongo.query.MongoQueryPolicy"/><Field name="fields"/></And>
<And><Class name="dev.caskeleton.adapter.outbound.mongo.schema.manifest.MongoManifestRegistry"/><Field name="byCollection"/></And>
<And><Class name="dev.caskeleton.adapter.outbound.cache.redis.sdk.api.RedisCapabilities"/><Field name="available"/></And>
<And><Class name="dev.caskeleton.application.security.AuthorizationPrincipal"/><Field name="roles"/></And>
<And><Class name="dev.caskeleton.application.objectstorage.request.ObjectPublishRequest"/><Field name="capabilityRequirements"/></And>
<And><Class name="dev.caskeleton.application.objectstorage.request.ObjectStageRequest"/><Field name="capabilityRequirements"/></And>
</Or>
</Match>
<!-- EI, single sites with an array. RawProtocolKeyword implements Lettuce's ProtocolKeyword,
whose getBytes() Lettuce calls once per encoded command and only reads (Lettuce's own
CommandType returns its array the same way); a clone per command would allocate on the
hot path for nothing. -->
<Match>
<Bug pattern="EI_EXPOSE_REP"/>
<Class name="dev.caskeleton.adapter.outbound.cache.redis.sdk.lettuce.operations.LettuceRedisCommandGateway$RawProtocolKeyword"/>
<Method name="getBytes"/>
</Match>
<!-- CT_CONSTRUCTOR_THROW (finalizer attack: a subclass's finalize() keeps a half-built object).
A final class cannot be attacked this way, and every class that could be made final was.
These three groups must stay subclassable. -->
<!-- CT group 1 — CGLIB proxies. @RequiresPermission is enforced by a method-security advisor,
and Spring Boot proxies with CGLIB, which subclasses the bean
(RequiresPermissionProxyabilityTest fails the build if such a class is final). The
Annotation matcher covers every class annotated at class level, including ones added
later. A class that annotates only some methods is proxied all the same but is not matched
here; name it when one appears. A @Configuration class is CGLIB-subclassed for its @Bean
methods for the same reason. -->
<Match>
<Bug pattern="CT_CONSTRUCTOR_THROW"/>
<Or>
<Annotation name="dev.caskeleton.application.security.RequiresPermission"/>
<Annotation name="org.springframework.context.annotation.Configuration"/>
</Or>
</Match>
<!-- CT group 2 — designed for extension. Exception hierarchy roots (HttpClientException,
JpaPersistenceException, RedisOperationException and FileserverException each have
subclasses), ClientRuntime (BlockingClientRuntime extends it) and the abstract
JpaRepositoryFragmentSupport, which service repository fragments extend. -->
<Match>
<Bug pattern="CT_CONSTRUCTOR_THROW"/>
<Or>
<Class name="dev.caskeleton.adapter.outbound.httpclient.api.error.HttpClientException"/>
<Class name="dev.caskeleton.adapter.outbound.persistence.api.error.JpaPersistenceException"/>
<Class name="dev.caskeleton.adapter.outbound.cache.redis.sdk.api.error.RedisOperationException"/>
<Class name="dev.caskeleton.application.fileserver.api.error.FileserverException"/>
<Class name="dev.caskeleton.adapter.outbound.httpclient.profile.ClientRuntime"/>
<Class name="dev.caskeleton.adapter.outbound.persistence.springdata.JpaRepositoryFragmentSupport"/>
</Or>
</Match>
<!-- FindSecBugs REDOS, one Match per constructor or static initialiser. Every pattern flagged
is "segment (separator segment)*" where the separator is a character the segment class
cannot contain ('.', '-', ';', or a class of those), so each input splits exactly one way
and backtracking is linear, not exponential. The application-core values
also check the length (at most 64-256 characters) before the pattern runs; JsonPathName and SafeSortField
match developer-declared paths; the SNS host comes from a URI host. -->
<Match>
<Bug pattern="REDOS"/>
<Or>
<And><Class name="dev.caskeleton.adapter.outbound.notification.platform.provider.ses.SnsSignatureVerifier"/><Method name="&lt;clinit&gt;"/></And>
<And><Class name="dev.caskeleton.adapter.outbound.persistence.postgresql.json.JsonPathName"/><Method name="&lt;clinit&gt;"/></And>
<And><Class name="dev.caskeleton.adapter.outbound.persistence.springdata.SafeSortField"/><Method name="&lt;clinit&gt;"/></And>
<And><Class name="dev.caskeleton.application.messaging.contract.ContractDescriptor"/><Method name="&lt;init&gt;"/></And>
<And><Class name="dev.caskeleton.application.messaging.contract.ContractId"/><Method name="&lt;init&gt;"/></And>
<And><Class name="dev.caskeleton.application.messaging.contract.LogicalDestinationId"/><Method name="&lt;init&gt;"/></And>
<And><Class name="dev.caskeleton.application.messaging.contract.SchemaResourceId"/><Method name="&lt;init&gt;"/></And>
<And><Class name="dev.caskeleton.application.messaging.event.AggregateIdentity"/><Method name="&lt;init&gt;"/></And>
</Or>
</Match>
<!-- FindSecBugs UNSAFE_HASH_EQUALS asks for a constant-time compare so that timing cannot leak a
secret digest. None of these digests is a secret: content SHA-256 the uploader supplied or
can compute (ContentPublishVerification, MetadataPointerContentPublisher,
FinalizeUploadApplicationUseCase), an integrity digest of the record's own policy snapshot
(ObjectOperationRecord), idempotency request/response digests the caller's own replay
produces (PostgreSqlIdempotencyStore), and a configured worker identity used as a lease
owner (PosterImageUploadIntent). A comparison that leaks what the caller already knows leaks nothing. -->
<Match>
<Bug pattern="UNSAFE_HASH_EQUALS"/>
<Or>
<And><Class name="dev.caskeleton.adapter.outbound.fileserver.platform.local.ContentPublishVerification"/><Method name="verifyStaged"/></And>
<And><Class name="dev.caskeleton.adapter.outbound.fileserver.platform.local.MetadataPointerContentPublisher"/><Method name="publish"/></And>
<And><Class name="dev.caskeleton.adapter.outbound.objectstorage.control.ObjectOperationRecord"/><Method name="&lt;init&gt;"/></And>
<And><Class name="dev.caskeleton.adapter.outbound.persistence.idempotency.postgresql.PostgreSqlIdempotencyStore"/><Method name="~complete|replayVerdict"/></And>
<And><Class name="dev.caskeleton.application.fileserver.upload.FinalizeUploadApplicationUseCase"/><Method name="requireClientDigestMatches"/></And>
</Or>
</Match>
<!-- SQL_INJECTION_SPRING_JDBC: the query is PostgreSqlIdempotencyStore.ACTIVE_CAPABILITY_SQL, a
constant handed to the guard's package-private constructor; nothing else constructs it. -->
<Match>
<Bug pattern="SQL_INJECTION_SPRING_JDBC"/>
<Class name="dev.caskeleton.adapter.outbound.persistence.idempotency.postgresql.IdempotencyCapabilityGuard"/>
<Method name="requireActiveCapability"/>
</Match>
<!-- XSS_SERVLET: reject() writes a fixed JSON body built from a constant message and an enum
code, as application/json; nothing from the request reaches it (the comment there says the
refused body is exactly what must not be echoed). -->
<Match>
<Bug pattern="XSS_SERVLET"/>
<Class name="dev.caskeleton.adapter.inbound.graphql.runtime.servlet.GraphQlRequestBodyLimitFilter"/>
<Method name="reject"/>
</Match>
<!-- WEAK_MESSAGE_DIGEST_SHA1: an opaque compare-and-set token, not an integrity check. It must
equal what Redis computes inside Lua (redis.sha1hex) so that compare + replace stays one
atomic script; any other digest would break the comparison. -->
<Match>
<Bug pattern="WEAK_MESSAGE_DIGEST_SHA1"/>
<Class name="dev.caskeleton.adapter.outbound.cache.redis.cache.RedisCacheRegionAdapter"/>
<Method name="observationOf"/>
</Match>
<!-- PREDICTABLE_RANDOM: log sampling (SamplingTurboFilter.decide) and retry jitter
(HttpClientProfileAutoConfiguration.jitterRandom) only
need spread, not unpredictability; nothing security-relevant is derived from any of these
values. Knowing the next jitter tells a caller when a retry lands, which the retry policy
already bounds. SecureRandom would read as a security requirement that is not there. -->
<Match>
<Bug pattern="PREDICTABLE_RANDOM"/>
<Or>
<And><Class name="dev.caskeleton.adapter.outbound.httpclient.autoconfigure.HttpClientProfileAutoConfiguration"/><Method name="jitterRandom"/></And>
<And><Class name="dev.caskeleton.bootstrap.logging.SamplingTurboFilter"/><Method name="decide"/></And>
</Or>
</Match>
<!-- NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE where the null cannot happen at this call site.
The four activation post-processors call BindResult.orElse(List.of()): Spring annotates the
return @Nullable because it returns the argument, and the argument here is never null.
LocalOrphanScan calls Path.getParent() on paths it built as children of the storage root
(content root, quarantine path), which always have a parent. The two double reads of a
nullable getter that did exist (GlobalExceptionHandler and
WebSocketInboundAuthorizationInterceptor) were changed to read once instead. -->
<Match>
<Bug pattern="NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE"/>
<Or>
<And><Class name="dev.caskeleton.adapter.inbound.graphql.autoconfigure.GraphQlActivationEnvironmentPostProcessor"/><Method name="excludeTheFrameworkAutoConfigurations"/></And>
<And><Class name="dev.caskeleton.adapter.outbound.notification.platform.autoconfigure.NotificationActivationEnvironmentPostProcessor"/><Method name="postProcessEnvironment"/></And>
<And><Class name="dev.caskeleton.adapter.outbound.persistence.startup.JpaActivationEnvironmentPostProcessor"/><Method name="postProcessEnvironment"/></And>
<And><Class name="dev.caskeleton.adapter.outbound.mongo.MongoDefaultsEnvironmentPostProcessor"/><Method name="postProcessEnvironment"/></And>
<And><Class name="dev.caskeleton.adapter.outbound.fileserver.platform.local.LocalOrphanScan"/><Method name="~contentPath|quarantinePath|retireToQuarantine"/></And>
</Or>
</Match>
<!-- RV_RETURN_VALUE_IGNORED_BAD_PRACTICE on BlockingQueue.offer. TransferBufferPool.release
drops a buffer when the pool is already full: borrow() allocates past capacity rather than
block, so the surplus is meant to be garbage. BodySubscriber.onError has already recorded
the failure through fail(), which wakes the consumer; END is a courtesy that a full queue
can safely refuse. -->
<Match>
<Bug pattern="RV_RETURN_VALUE_IGNORED_BAD_PRACTICE"/>
<Or>
<And><Class name="dev.caskeleton.adapter.outbound.fileserver.platform.local.TransferBufferPool"/><Method name="release"/></And>
<And><Class name="dev.caskeleton.adapter.outbound.objectstorage.s3.S3AsyncResponseBodyBridge$BodySubscriber"/><Method name="onError"/></And>
</Or>
</Match>
<!-- MS_EXPOSE_REP on a static that is already immutable: a Jackson 3 ObjectMapper cannot be
reconfigured after build() (NotificationJsonMapper). -->
<Match>
<Bug pattern="MS_EXPOSE_REP"/>
<Or>
<And><Class name="dev.caskeleton.adapter.outbound.notification.platform.template.NotificationJsonMapper"/><Method name="mapper"/></And>
</Or>
</Match>
<!-- DLS_DEAD_LOCAL_STORE: `Future<Boolean> unused = request.abort(...)` is Error Prone's
documented way to discard a Future on purpose (FutureReturnValueIgnored); the two tools
disagree and the code satisfies the one that fails the compile. -->
<Match>
<Bug pattern="DLS_DEAD_LOCAL_STORE"/>
<Class name="dev.caskeleton.adapter.outbound.httpclient.http3.JettyHttp3TransportProvider"/>
<Method name="abortAtDeadline"/>
</Match>
<!-- The servlet error-dispatch controller (re-review 2026-11-03 RR-02-02) must answer for any
HTTP method: the original request's method is whatever failed, and the container forwards it
unchanged to /error. CSRF protection guards a state change made with ambient credentials;
this method makes none — it writes a fixed failure envelope, with nothing from the request in
it. A direct request to /error is answered as an unknown route and still goes through the
authentication chain (a token under the JWT chain, which keeps CSRF off because it carries
no ambient credential). Exact to the one method (review 2026-11-04 RR2-04-06). -->
<Match>
<Bug pattern="SPRING_CSRF_UNRESTRICTED_REQUEST_MAPPING"/>
<Class name="dev.caskeleton.adapter.inbound.web.error.EnvelopeErrorController"/>
<Method name="error"/>
</Match>
</FindBugsFilter>