-
Notifications
You must be signed in to change notification settings - Fork 12
Description
Background
This issue is specific to the infisical agent command and its template rendering pipeline.
Docs also state that the secret template function returns a single secret object with keys: Key, WorkspaceId, Value, SecretPath, Type, ID, and Comment.(https://infisical.com/docs/integrations/platforms/infisical-agent#secret).
In agent templates, listSecrets/secret is used to render secrets into files. Some templates need id/comment for debugging and traceability.
Actual behavior
listSecrets/secret returns secrets without id/comment (and sometimes secretPath for imports), even though the raw secrets API includes them.
Expected behavior
listSecrets should include id/comment/secretPath in the returned objects to match API payload and enable template access.
Repro steps
- Create a secret with a comment.
- Use an agent template with {{ range (secret "<PROJECT_ID>" "" "/") }}{{ .ID }}{{ .Comment }}{{ end }}
- Run agent and check output file.
- ID/Comment are empty.
Impact
Templates that rely on metadata cannot work without switching to per-secret calls.
Possible fix
Map id/comment/secretPath when converting raw secrets to SingleEnvironmentVariable in the CLI.
I plan to submit a PR to address this.