Skip to content

chore: security A and coverage above 90% on SonarCloud - #35

Merged
hongjs merged 1 commit into
mainfrom
chore/sonar-coverage-security
Aug 23, 2026
Merged

hongjs merged 1 commit into
mainfrom
chore/sonar-coverage-security

Conversation

@hongjs

@hongjs hongjs commented Aug 23, 2026

Copy link
Copy Markdown
Owner

Security: the one open vulnerability was publish_nuget.yml expanding ${{ secrets.NUGET_TOKEN }} inside the run block - the same finding fixed in sonarcloud.yml by #34. The token now reaches the script through env.

Coverage: the library was at 99%; the 89.9% overall came from the API project, where OrderRepository and Order had no test at all and ProductRepository.SyncDataThenCommit's catch never ran. OrderRepositoryTest sends the FK / DateOnly entity the benchmarks use through every repository method against MySQL; EfCoreTest gains the commit-path failure.

Maintainability (the 10 new issues from #34): the ON / SET / ON DUPLICATE KEY UPDATE loops in BulkCommand become two helpers built on string.Join, column selection moves out of the update and merge generators so each drops below the complexity limit, the TODO and commented-out FieldsToUpdate block leave BulkOption (the design now lives in docs/roadmap.md, not yet committed), EdgeCaseTest uses static readonly arrays, and two members nothing read - ColumnInfo.IsKey, BatchData.SuccessCount - are removed along with a redundant OpenAsync in ExecuteBatchDataAsync. Generated SQL is unchanged: every exact-string assertion in BulkCommandTest still passes.

Tests: 61 -> 68.

Claude-Session: https://claude.ai/code/session_01E63oHuiKenf9H6tcgvDXVG

Security: the one open vulnerability was publish_nuget.yml expanding
${{ secrets.NUGET_TOKEN }} inside the run block - the same finding fixed in
sonarcloud.yml by #34. The token now reaches the script through env.

Coverage: the library was at 99%; the 89.9% overall came from the API
project, where OrderRepository and Order had no test at all and
ProductRepository.SyncDataThenCommit's catch never ran. OrderRepositoryTest
sends the FK / DateOnly entity the benchmarks use through every repository
method against MySQL; EfCoreTest gains the commit-path failure.

Maintainability (the 10 new issues from #34): the ON / SET / ON DUPLICATE
KEY UPDATE loops in BulkCommand become two helpers built on string.Join,
column selection moves out of the update and merge generators so each drops
below the complexity limit, the TODO and commented-out FieldsToUpdate block
leave BulkOption (the design now lives in docs/roadmap.md, not yet
committed), EdgeCaseTest uses static readonly arrays, and two members
nothing read - ColumnInfo.IsKey, BatchData.SuccessCount - are removed along
with a redundant OpenAsync in ExecuteBatchDataAsync. Generated SQL is
unchanged: every exact-string assertion in BulkCommandTest still passes.

Tests: 61 -> 68.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E63oHuiKenf9H6tcgvDXVG
@sonarqubecloud

Copy link
Copy Markdown

@hongjs
hongjs merged commit 97b6232 into main Aug 23, 2026
6 checks passed
@hongjs
hongjs deleted the chore/sonar-coverage-security branch August 23, 2026 05:21
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