fix!: 재리뷰가 찾은 결함과 색인에서 빠졌던 발견 5건을 고친다
문제: 성숙도 리뷰 수정을 다시 읽은 재리뷰(Critical 0, 회귀 0)가 Important 27건·Minor 41건을 찾았다. 수정이 새로 만든 결함이 많았다. @SystemInvoked가 권한 규칙의 탈출구가 됐고, 데모 계정 거부가 정확히 prod일 때만 걸렸고, outbox 순서 번호가 업그레이드 때 뒤로 갔고, GraphQL union 아래 복잡도가 0이었고, 서블릿 오류 응답이 success:true로 나갔고, 호출자 deadline이 breaker를 열었다. 원래 리뷰 색인이 06 영역 발견 5건(06-10~14)을 빠뜨려 그동안 처리되지 않았다. 방법: 영역별 7묶음이 test-driven-development 절차로 실패 테스트를 먼저 쓰고 고쳤다. 결정은 재리뷰 README 4절에 적었다: 순서 번호는 V21이 기록한 전역 floor부터, 데모 계정은 local·test·demo 허용 목록, @SystemInvoked bean은 기동 실패, complete 단계 실패는 IDEMPOTENCY_COMPLETION_UNKNOWN(결과 불명), 캐시 조건부 쓰기는 별도 SCRIPT lane, strict lane 정책은 build cache 입력, 끝나지 않는 재시도 행은 원인 코드·지표·PARKED 절차. 레지스트리가 선언만 하고 아무 코드도 내보내지 않던 redis.capability.* 지표 6개는 빼고 runbook을 실제 지표(redis.lane.*) 기준으로 고쳤다. 위험·한계: V21을 V22 없이 직접 고쳤다(어느 배포에도 아직 없음). 이 브랜치의 V21을 적용한 개발 DB는 다시 만들어야 한다. 서블릿 오류 디스패치를 보안 체인이 허용한다. 발행·저장소 포트 시그니처가 바뀌어 파생 서비스 코드가 깨진다. prod에서 fixture-로 시작하는 설정값은 기동을 막는다. httpclient failure-injection lane의 main 단계 중복 실행은 이전 결정대로 남겼다. 실제 CI runner 실행은 확인하지 못했다. 검증: ci, mainCheck, :integrationCheck, -p optional-platforms ci integrationCheck performanceCheck, :performanceCheck, :releaseCheck (-PgitRevision), verify-compose-profile-contracts(18 lane) 통과. 첫 실행의 실패 2건(FindSecBugs 1, sample 동시 생성 테스트의 v4 event id)은 고친 뒤 ci·integrationCheck·mainCheck를 다시 돌려 통과했다. Refs: docs/reviews/2026-11-03-rereview/README.md 3·4·6·7절 BREAKING CHANGE: outbox 발행 포트와 저장소 포트 시그니처, 순서 번호 첫 값(V21 floor 다음), 샘플 데모 계정 프로필 허용 목록, 새 오류 코드 IDEMPOTENCY_COMPLETION_UNKNOWN, prod의 fixture- 값 거부, 기동 rule은 static·의존 없음이어야 한다.
This commit is contained in:
@@ -795,6 +795,6 @@
|
||||
"redis"
|
||||
],
|
||||
"$vendorComment": "expectedPersistenceVendor is the vendor the application must report, not the one the lane started: info.capabilities.persistence-jpa.vendor while JPA is on, none while it is off. A reported postgresql is the database the queries go to, because the JPA module refuses to start when the selected vendor is postgresql and the datasource it reaches is not PostgreSQL (JpaDataSourceProfileValidator). local-jpa passed for a while against H2 while a PostgreSQL container it never touched sat beside it, because application-local.yml pins an in-memory URL that outranks the lane's environment.",
|
||||
"$redisComment": "The lanes that switch Redis on authenticate the way a deployment does. Their Redis loads infra/redis-sdk/acl/all-accounts.acl, which turns the passwordless default user off, and the application connects as the two named accounts that file provisions: ca-skeleton-application for ordinary commands and ca-skeleton-application-advanced for registered scripts. Both references use the secret://<account>@environment/<variable> form; without the account part the client authenticates as the disabled default user. The two REDIS_LANE_* values are that file's fixture passwords (infra/redis-sdk/acl/README.md), not deployment credentials, and deliberately carry no APP_ prefix: they are not application settings, only what these references point at. APP_REDIS_NAMESPACE_ENVIRONMENT is prod because the fixture accounts are fenced to ~prod:*, the namespace every other test against that file uses; under the default local namespace the first key a capability wrote would be refused with NOPERM after startup had reported healthy. Before this the lanes declared anonymous-access-accepted against an open Redis, and the two startup warnings that trade prints (no credential, no advanced account) failed their startup-is-silent check — which is right, because in production both are risks. scripts/verify-compose-profile-contracts.sh check 7 holds a Redis lane's references, passwords and namespace to the account lines of the file its Redis actually mounts.",
|
||||
"$redisComment": "The lanes that switch Redis on authenticate the way a deployment does. Their Redis loads infra/redis-sdk/acl/lane-fixture-accounts.acl, which turns the passwordless default user off, and the application connects as the two named accounts that file provisions: ca-skeleton-application for ordinary commands and ca-skeleton-application-advanced for registered scripts. Both references use the secret://<account>@environment/<variable> form; without the account part the client authenticates as the disabled default user. The two REDIS_LANE_* values are that file's fixture passwords (infra/redis-sdk/acl/README.md), not deployment credentials, and deliberately carry no APP_ prefix: they are not application settings, only what these references point at. APP_REDIS_NAMESPACE_ENVIRONMENT is prod because the fixture accounts are fenced to ~prod:*, the namespace every other test against that file uses; under the default local namespace the first key a capability wrote would be refused with NOPERM after startup had reported healthy. Before this the lanes declared anonymous-access-accepted against an open Redis, and the two startup warnings that trade prints (no credential, no advanced account) failed their startup-is-silent check — which is right, because in production both are risks. scripts/verify-compose-profile-contracts.sh check 7 holds a Redis lane's references, passwords and namespace to the account lines of the file its Redis actually mounts.",
|
||||
"$flywayComment": "SPRING_FLYWAY_LOCATIONS is deliberately absent. Seven lanes listed every capability stream there, and it could never have worked: the db/migration/jpa/* streams each declare a V1, so one Flyway instance over all of them fails with 'Found more than one migration with version 1'. Each stream is its own stream with its own history table by design. The setting was inert until Wave 2 stopped PostgreSqlPersistenceConfig from overriding spring.flyway.locations, and the lanes passed while their own configuration was being discarded. Applying a capability stream needs a Flyway execution per stream — the operator sequence PostgreSqlNotificationPersistenceUnitIntegrationTest and FileserverRoundTripContractTest both perform in their fixtures — and that is what the notification lanes still need."
|
||||
}
|
||||
|
||||
@@ -16,14 +16,37 @@
|
||||
<Source name="~.*[\\/]generated[\\/].*"/>
|
||||
</Match>
|
||||
|
||||
<!-- SPRING_CSRF_PROTECTION_DISABLED on the SecurityConfig classes is intentional: this is a
|
||||
stateless JWT bearer-token API (no session cookies / no ambient cookie auth), so CSRF
|
||||
protection is deliberately disabled per the security baseline. FindSecBugs flags it for
|
||||
classic cookie-session web apps; it is a false positive here. Scoped to *SecurityConfig
|
||||
so a CSRF-disable anywhere else would still be reported. -->
|
||||
<!-- 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 also matched the sample's HTTP Basic
|
||||
chain, for which this reason is false — a browser re-sends Basic credentials on its own —
|
||||
and would have hidden a copied Basic chain's CSRF exposure (review 2026-11-03 RR-07-05). -->
|
||||
<Match>
|
||||
<Bug pattern="SPRING_CSRF_PROTECTION_DISABLED"/>
|
||||
<Class name="~.*SecurityConfig"/>
|
||||
<Or>
|
||||
<Class name="dev.caskeleton.adapter.inbound.web.auth.SecurityConfig"/>
|
||||
<Class name="dev.caskeleton.composition.runtime.management.security.ManagementSecurityConfig"/>
|
||||
</Or>
|
||||
</Match>
|
||||
|
||||
<!-- The sample's demo chain (HTTP Basic) disables CSRF for a reason that holds only for it: the
|
||||
demo accounts are public — each password is the account name and the sample README prints
|
||||
both — so a forged request can do nothing an attacker cannot do directly, and the sample
|
||||
refuses to start unless a demo profile (local, test, demo) is active
|
||||
(SampleDemoAccountsProductionGuard). A copy that puts real accounts behind HTTP Basic is
|
||||
not this class and is reported. -->
|
||||
<Match>
|
||||
<Bug pattern="SPRING_CSRF_PROTECTION_DISABLED"/>
|
||||
<Class name="dev.caskeleton.sample.portfolio.bootstrap.security.SampleDemoSecurityConfig"/>
|
||||
</Match>
|
||||
|
||||
<!-- The sample's actuator chain authenticates nobody (permitAll, stateless): with no credential
|
||||
at all there is no authority for a cross-site request to borrow. -->
|
||||
<Match>
|
||||
<Bug pattern="SPRING_CSRF_PROTECTION_DISABLED"/>
|
||||
<Class name="dev.caskeleton.sample.portfolio.bootstrap.management.SampleManagementSecurityConfig"/>
|
||||
</Match>
|
||||
|
||||
<!-- Test-only real-HTTP GraphQL qualification uses explicit Authorization headers and disables
|
||||
@@ -448,4 +471,15 @@
|
||||
<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. Only DispatcherType.ERROR reaches it — the security chains permit the
|
||||
error dispatch and nothing else, so a direct request to /error meets the normal chain (and
|
||||
its CSRF rules). It writes a failure envelope and changes no state. Exact to the one method. -->
|
||||
<Match>
|
||||
<Bug pattern="SPRING_CSRF_UNRESTRICTED_REQUEST_MAPPING"/>
|
||||
<Class name="dev.caskeleton.adapter.inbound.web.error.EnvelopeErrorController"/>
|
||||
<Method name="error"/>
|
||||
</Match>
|
||||
|
||||
</FindBugsFilter>
|
||||
|
||||
Reference in New Issue
Block a user