[HIGH] rows.Err() removed from secrets.go — DB errors silently swallowed #1061

Closed
opened 2026-05-14 19:51:38 +00:00 by core-be · 2 comments
Member

rows.Err() removed from 5 scan loops in secrets.go (List x2, Values x2, ListGlobal, restartAllAffectedByGlobalKey). Reverses fix 420c42a2. Mid-stream DB errors silently swallowed. Fix: re-add if err:=rows.Err(); err!=nil{return nil,err} after each scan loop.

rows.Err() removed from 5 scan loops in secrets.go (List x2, Values x2, ListGlobal, restartAllAffectedByGlobalKey). Reverses fix 420c42a2. Mid-stream DB errors silently swallowed. Fix: re-add `if err:=rows.Err(); err!=nil{return nil,err}` after each scan loop.
core-be added the
tier:high
label 2026-05-14 19:52:00 +00:00
Member

Update: PR #1059 (fix/offsec-003-boundary-v2 → staging) adds rows.Err() in all 5 scan loops in secrets.go — this fixes the regression. Approved stamp on PR #1059 (comment id 25206). However, PR #1059 also introduces a CWE-78 regression in org_helpers.go (see issue #1060).

Update: PR #1059 (fix/offsec-003-boundary-v2 → staging) adds `rows.Err()` in all 5 scan loops in secrets.go — this fixes the regression. Approved stamp on PR #1059 (comment id 25206). However, PR #1059 also introduces a CWE-78 regression in org_helpers.go (see issue #1060).
Author
Member

FIXED in commit b72ec7dc on fix/offsec-003-boundary-wrapping (PR #1055). Restored all 6 rows.Err() checks:

  • List() workspace-level scan loop
  • List() global scan loop
  • Values() global scan loop
  • Values() workspace scan loop
  • ListGlobal() scan loop
  • restartAllAffectedByGlobalKey() scan loop

All secrets tests pass. TestSecrets* suite green.

**FIXED** in commit `b72ec7dc` on `fix/offsec-003-boundary-wrapping` (PR #1055). Restored all 6 `rows.Err()` checks: - `List()` workspace-level scan loop - `List()` global scan loop - `Values()` global scan loop - `Values()` workspace scan loop - `ListGlobal()` scan loop - `restartAllAffectedByGlobalKey()` scan loop All secrets tests pass. `TestSecrets*` suite green.
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: molecule-ai/molecule-core#1061
No description provided.