Conversation
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
Greptile OverviewGreptile Summary
Confidence Score: 3/5
Important Files Changed
|
| secretVersions: secretRawSchema | ||
| .omit({ secretValue: true }) | ||
| .extend({ |
There was a problem hiding this comment.
Breaking API schema
The v1 dashboard response schema now requires isRedacted, redactedAt, and redactedByUserId on every secretVersions element (no .optional()), which will break older server responses and any clients expecting the prior shape if this endpoint can return versions without these fields (e.g., pre-migration rows, older data paths).
Fix: mark these fields optional in the schema (and/or ensure all producers always include them) to keep v1 API backwards-compatible.
| skipMultilineEncoding: z.boolean().nullable().optional(), | ||
| tags: z.array(z.string()).nullable().optional(), | ||
| metadata: z.unknown().nullable().optional(), | ||
| secretValue: z.string() | ||
| secretValue: z.string(), | ||
| isRedacted: z.boolean(), | ||
| redactedAt: z.date().nullable(), |
There was a problem hiding this comment.
Schema now requires fields
secretVersionSchema and secretResourceChangeSchema now require isRedacted/redactedAt/redactedByUserId. If older commits or older stored commit payloads don’t include these fields, parsing will fail at runtime when viewing commit details.
Fix: make these fields optional with sensible defaults (e.g. isRedacted: z.boolean().optional().default(false)) to preserve backward compatibility with existing commit records.
Additional Comments (4)
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Fix: only set
Fix: replace this with a non-regex split/join (e.g.
The route response is declared as Fix: explicitly map/strip the returned |
Context
Added support for redacting secret value versions. We update the actual secret value in-place of the secret version, and mark it as redacted. This is done to combat secret spill and avoid storing secret values elsewhere than just the latest secret version.
This PR also incldues a fix for the automatic updating of secret references not incrementing secret versions correctly.
Steps to verify the change
Type
Checklist
type(scope): short description(scope is optional, e.g.,fix: prevent crash on syncorfix(api): handle null response).