feat: ssh pam exec and sftp#5825
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 SummaryThis PR improves PAM session terminal replay to support SSH PAM exec and SFTP session types by detecting whether terminal input is echoed in output and adjusting which event types are displayed accordingly. When input is echoed (interactive PTY sessions), only output events are shown to avoid duplication; when input is not echoed (exec/SFTP), both input and output events are included. Key changes:
Two issues identified:
Confidence Score: 4/5Safe to merge with a minor logic concern in the echo-detection heuristic that could cause input events to be hidden in edge cases. The change is a well-scoped frontend utility improvement. Neither consumer of aggregateTerminalEvents uses the eventType field, so the hardcoded 'output' is harmless. The dead fallback is benign. The false-positive risk in the substring echo check is real but limited to short, common command names and unlikely to cause user-visible problems in most PAM exec sessions. No security, data-loss, or breaking API concerns. frontend/src/pages/pam/PamSessionsByIDPage/components/terminal-utils.ts — echo detection heuristic at lines 58–61. Important Files Changed
Reviews (1): Last reviewed commit: "feat: show ssh pam exec and sftp" | Re-trigger Greptile |
Context
This PR makes it so that SSH PAM exec and sftp are displayed in session logs
Relevant PR: Infisical/cli#161
Screenshots
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).