fix(cli): resolve project ID from workspace config - #348
Conversation
|
| Filename | Overview |
|---|---|
| packages/util/secrets.go | Adds machine-identity workspace fallback correctly, but suppresses actionable errors from reading or parsing the workspace configuration. |
| packages/util/secrets_test.go | Covers explicit project-ID precedence and successful fallback from a workspace configuration directory. |
Reviews (1): Last reviewed commit: "fix(cli): resolve project ID from worksp..." | Re-trigger Greptile
| if err == nil { | ||
| params.WorkspaceId = workspaceID | ||
| } |
There was a problem hiding this comment.
Workspace errors lose diagnostics
When .infisical.json is malformed, unreadable, or absent from the configured directory, this branch discards the configuration error and exits with Project ID is required when using machine identity, concealing the problem the user must correct.
Knowledge Base Used: Secrets Management
Description 📣
Fixes #284.
When machine-identity authentication is used without
--projectIdorINFISICAL_PROJECT_ID, resolve the project ID from.infisical.jsonbefore rejecting the request. Explicit project IDs retain precedence over the workspace configuration.No new dependencies.
Type ✨
Tests 🛠️
go test ./packages/util go build ./...The regression tests cover explicit project-ID precedence and fallback to
workspaceIdfrom the configured.infisical.json.