fix: harden doctor PATH checks and attribute cloud events by OS user

Doctor now verifies every installed package manager against the shim
directory, and system-install validation only requires a safe parent
directory. Cloud sync records username/uid on invocation context for
multi-user hosts sharing one endpoint.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Sahilb315
2026-07-13 23:12:02 +05:30
co-authored by Cursor
parent 1c9b16f1fa
commit b1aa217011
10 changed files with 132 additions and 78 deletions
+2
View File
@@ -154,4 +154,6 @@ func TestCloudSinkSetsInvocationContextOnSessionComplete(t *testing.T) {
require.NotNil(t, invCtx, "session complete event must have invocation context")
assert.Contains(t, invCtx.GetCommand(), "npm")
assert.NotEmpty(t, invCtx.GetWorkingDirectory())
assert.NotEmpty(t, invCtx.GetUsername())
assert.NotEmpty(t, invCtx.GetUsernameUid())
}