pr / ci (pull_request) Successful in 4m0s
앞 커밋에서 패키지를 dev.cakit.grpc로 바꿨다. 배포 좌표(group)와 문서는 아직 com.hyeonworks.grpc였다. - gradle.properties libraryGroup = dev.cakit.grpc(모든 모듈과 SBOM artifact의 group) - README 받는 법(exclusiveContent 필터 dev.cakit), AGENTS.md, CHANGELOG 옮기는 법, problem-statement, release.md, family AGENTS.md 둘 - SpotBugs 제외에서 템플릿 클래스(@RequiresPermission)를 가리키던 줄을 지웠다. 이 repo에는 그런 bean이 없다 남긴 것: Gitea 주소 git.learn.hyeonworks.com(서버 주소), 기록 ADR-GRPC-002 본문의 「예전에는 hyeonworks」(기록 본문은 고치지 않는다). 검증: git grep -i hyeonworks에서 위 둘만 남는다. 빌드 게이트는 desktop (이 PR 본문).
171 lines
9.6 KiB
XML
171 lines
9.6 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>
|
|
<!-- =========================================================================================
|
|
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>
|
|
<!-- 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. A @Configuration class is CGLIB-subclassed for its @Bean
|
|
methods, so it must stay subclassable. (The template's copy also names its
|
|
@RequiresPermission beans here; this library has none.) -->
|
|
<Match>
|
|
<Bug pattern="CT_CONSTRUCTOR_THROW" />
|
|
<Or>
|
|
<Annotation name="org.springframework.context.annotation.Configuration" />
|
|
</Or>
|
|
</Match>
|
|
<!-- CT group 2 — designed for extension. Exception hierarchy roots (HttpClientException,
|
|
JpaPersistenceException, RedisOperationException, FileserverException and the optional
|
|
gRPC build's GrpcPlatformException, which GrpcDeadlineExceededException extends, 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.cakit.grpc.api.error.GrpcPlatformException" />
|
|
</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 and messaging values
|
|
also check the length (at most 64-256 characters) before the pattern runs, and so do the
|
|
gRPC identifiers (GrpcIdentifiers.requireBounded, 256); JsonPathName and SafeSortField
|
|
match developer-declared paths; the SNS host comes from a URI host. -->
|
|
<Match>
|
|
<Bug pattern="REDOS" />
|
|
<Or>
|
|
<And>
|
|
<Class name="dev.cakit.grpc.core.GrpcChannelProfileName" />
|
|
<Method name="<clinit>" />
|
|
</And>
|
|
<And>
|
|
<Class name="dev.cakit.grpc.core.GrpcServiceName" />
|
|
<Method name="<clinit>" />
|
|
</And>
|
|
</Or>
|
|
</Match>
|
|
<!-- FindSecBugs REDOS, the "x([class]*x)?" shape: GrpcMetadataKey.CANONICAL and
|
|
GrpcResolverSafetyPolicy.AUTHORITY. The only unbounded quantifier sits in a group that
|
|
repeats at most once, so a failing match gives back one character at a time from a single
|
|
star — n steps, not 2^n. Measured with java.util.regex on 1k/10k/100k-unit inputs built to
|
|
fail late ("a.a"... + "!"): time grows tenfold per tenfold input, 300k characters in under
|
|
7 ms. The metadata key is also capped at 64 characters before the pattern runs; the
|
|
resolver authority has no cap, and a linear match costs no more than reading the update. -->
|
|
<Match>
|
|
<Bug pattern="REDOS" />
|
|
<Or>
|
|
<And>
|
|
<Class name="dev.cakit.grpc.api.context.GrpcMetadataKey" />
|
|
<Method name="<clinit>" />
|
|
</And>
|
|
<And>
|
|
<Class name="dev.cakit.grpc.advanced.discovery.GrpcResolverSafetyPolicy" />
|
|
<Method name="<clinit>" />
|
|
</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), and the gRPC channel profile fingerprints that
|
|
GrpcPlatformSnapshotService.driftAgainstRelease compares between two snapshots it was
|
|
handed — a configuration hash, published in the snapshot itself, compared offline with no
|
|
caller to time it. A comparison that leaks what the caller already knows leaks nothing. -->
|
|
<Match>
|
|
<Bug pattern="UNSAFE_HASH_EQUALS" />
|
|
<Or>
|
|
<And>
|
|
<Class name="dev.cakit.grpc.admin.GrpcPlatformSnapshotService" />
|
|
<Method name="~lambda\$driftAgainstRelease\$\d+" />
|
|
</And>
|
|
</Or>
|
|
</Match>
|
|
<!-- COMMAND_INJECTION: GrpcTlsTestMaterial.runKeytool starts the running JDK's own keytool
|
|
(java.home/bin) through ProcessBuilder with an argument list — no shell, so no argument is
|
|
parsed as a command. Its callers pass fixed flags, paths of a temporary directory the
|
|
fixture created, and the hostname a test names for its certificate. It lives in
|
|
grpc-testkit, which no production leaf depends on. -->
|
|
<Match>
|
|
<Bug pattern="COMMAND_INJECTION" />
|
|
<Class name="dev.cakit.grpc.testkit.netty.GrpcTlsTestMaterial" />
|
|
<Method name="runKeytool" />
|
|
</Match>
|
|
</FindBugsFilter>
|