Compare commits

...

1 Commits

Author SHA1 Message Date
fullstack-engineer 77998c76f7 fix(channels): remove duplicate EncryptSensitiveFields call in Create
Block internal-flavored paths / Block forbidden paths (pull_request) Successful in 22s
Harness Replays / detect-changes (pull_request) Successful in 22s
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 21s
qa-review / approved (pull_request) Successful in 22s
CI / Detect changes (pull_request) Successful in 1m0s
security-review / approved (pull_request) Successful in 24s
E2E API Smoke Test / detect-changes (pull_request) Successful in 1m3s
Handlers Postgres Integration / detect-changes (pull_request) Successful in 58s
Runtime PR-Built Compatibility / detect-changes (pull_request) Successful in 48s
lint-required-no-paths / lint-required-no-paths (pull_request) Successful in 1m27s
Harness Replays / Harness Replays (pull_request) Successful in 13s
CI / Canvas (Next.js) (pull_request) Successful in 16s
CI / Shellcheck (E2E scripts) (pull_request) Successful in 15s
CI / Python Lint & Test (pull_request) Successful in 21s
Runtime PR-Built Compatibility / PR-built wheel + import smoke (pull_request) Successful in 13s
CI / Platform (Go) (pull_request) Failing after 2m43s
Handlers Postgres Integration / Handlers Postgres Integration (pull_request) Failing after 2m39s
E2E API Smoke Test / E2E API Smoke Test (pull_request) Failing after 2m55s
CI / Canvas Deploy Reminder (pull_request) Has been skipped
CI / all-required (pull_request) Successful in 14s
gate-check-v3 / gate-check (pull_request) Successful in 31s
sop-tier-check / tier-check (pull_request) Successful in 36s
sop-checklist / all-items-acked (pull_request) [info tier:low] acked: 0/7 — missing: comprehensive-testing, local-postgres-e2e, staging-smoke, +4
audit-force-merge / audit (pull_request) Has been skipped
The Create handler called EncryptSensitiveFields twice (copy-paste error
introduced during the OFFSEC-010 conflict resolution at commit 58882381).

The second call is harmless — EncryptSensitiveFields is idempotent and
skips values already prefixed with "ec1:" — but it wastes CPU and signals
a copy-paste bug. Remove it.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-15 01:18:22 +00:00
@@ -149,15 +149,6 @@ func (h *ChannelHandler) Create(c *gin.Context) {
return
}
// #319: encrypt sensitive fields (bot_token, webhook_secret) before
// persisting so a DB read/backup leak can't recover the credentials.
// Validation above ran against plaintext; storage is ciphertext.
if err := channels.EncryptSensitiveFields(body.Config); err != nil {
log.Printf("Channels: encrypt config failed for workspace %s: %v", workspaceID, err)
c.JSON(http.StatusInternalServerError, gin.H{"error": "encrypt failed"})
return
}
configJSON, _ := json.Marshal(body.Config)
allowedJSON, _ := json.Marshal(body.AllowedUsers)
enabled := true