fix(util): map ID and comment fields in secret transformation#104
fix(util): map ID and comment fields in secret transformation#104YewFence wants to merge 1 commit intoInfisical:mainfrom
Conversation
Update `GetPlainTextSecretsViaServiceToken`, `GetPlainTextSecretsV3`, and `InjectRawImportedSecret` to explicitly map `ID`, `Comment`, and `SecretPath` fields from raw secrets. Previously, these metadata fields were omitted during the transformation to `models.SingleEnvironmentVariable`. This commit ensures complete data propagation and improves code readability by formatting struct initializations across multiple lines.
Greptile SummaryThis PR fixes a data loss issue in the agent secret listing flow by mapping missing metadata fields (ID, Comment, SecretPath) when converting raw secrets to Confidence Score: 5/5
|
Greptile found no issues!From now on, if a review finishes and we haven't found any issues, we will not post anything, but you can confirm that we reviewed your changes in the status check section. This feature can be toggled off in your Code Review Settings by deselecting "Create a status check for each PR". |
Map
ID,Comment, andSecretPathwhen converting raw secrets tomodels.SingleEnvironmentVariablein the agent secret listing flow.Description 📣
Problem: Agent template
secret/listSecretsdropsid,comment, and sometimessecretPath, despite the raw secrets API including them.Solution: Map
ID,Comment, andSecretPathfrom raw secrets when converting tomodels.SingleEnvironmentVariable.Changes: Update
GetPlainTextSecretsViaServiceToken,GetPlainTextSecretsV3, andInjectRawImportedSecretto include these fields in the transformed output.Fixes #103
Type ✨
Tests 🛠️