Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .jules/sentinel.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
## 2026-07-22 - Prevent Leaking Sensitive Info in Error Responses\n**Vulnerability:** Redacted error messages used `%w` to wrap errors which still leaked sensitive info through the underlying error object.\n**Learning:** When applying string redactors (like `redaction.ErrorMessage`), the original error shouldn't be wrapped. Instead, it must be stringified with `%s` before redacting so that only the safe redacted text persists.\n**Prevention:** Avoid `%w` when formatting errors that contain secrets prior to redacting.
4 changes: 2 additions & 2 deletions internal/cli/trust.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ func runTrust(args []string, stdout io.Writer, stderr io.Writer, deps appDeps) i
func trustCurrentDir(stdout io.Writer, stderr io.Writer, deps appDeps) int {
cwd, err := deps.getwd()
if err != nil {
return writeAppError(stderr, redaction.ErrorMessage(fmt.Errorf("resolve workspace: %w", err), redaction.Options{}), exitCrash)
return writeAppError(stderr, redaction.ErrorMessage(fmt.Errorf("resolve workspace: %s", err), redaction.Options{}), exitCrash)
}
if err := workspacetrust.Trust(cwd); err != nil {
return writeAppError(stderr, redaction.ErrorMessage(err, redaction.Options{}), exitCrash)
Expand Down Expand Up @@ -86,7 +86,7 @@ func trustRemove(args []string, stdout io.Writer, stderr io.Writer, deps appDeps
case 0:
cwd, err := deps.getwd()
if err != nil {
return writeAppError(stderr, redaction.ErrorMessage(fmt.Errorf("resolve workspace: %w", err), redaction.Options{}), exitCrash)
return writeAppError(stderr, redaction.ErrorMessage(fmt.Errorf("resolve workspace: %s", err), redaction.Options{}), exitCrash)
}
target = cwd
case 1:
Expand Down
Loading