improvement(inputs): sanitize trigger inputs better#3047
Merged
icecrasher321 merged 1 commit intostagingfrom Jan 28, 2026
Merged
improvement(inputs): sanitize trigger inputs better#3047icecrasher321 merged 1 commit intostagingfrom
icecrasher321 merged 1 commit intostagingfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
Greptile OverviewGreptile SummaryImproved log sanitization by filtering out UI-only and system fields from trigger block inputs. The
Confidence Score: 5/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant BE as BlockExecutor
participant R as VariableResolver
participant SIF as sanitizeInputsForLog
participant BL as BlockLog
participant NF as normalize functions
Note over BE: Block execution starts
BE->>R: resolveInputs(ctx, nodeId, params, block)
R-->>BE: resolvedInputs (raw)
Note over BE: Sanitize inputs before logging
BE->>SIF: sanitizeInputsForLog(resolvedInputs)
alt Filter system fields
SIF->>SIF: Check if key in SYSTEM_SUBBLOCK_IDS
Note over SIF: Skip: triggerCredentials, webhookUrlDisplay,<br/>samplePayload, setupScript, scheduleInfo, etc.
SIF->>SIF: Check if key === 'triggerMode'
Note over SIF: Skip: triggerMode (internal flag)
end
alt Sanitize inputFormat
SIF->>NF: sanitizeInputFormat(value)
NF-->>SIF: Array without 'collapsed' UI state
end
alt Sanitize tools
SIF->>NF: sanitizeTools(value)
NF-->>SIF: Array without 'isExpanded' UI state
end
alt Parse JSON strings
SIF->>SIF: Check isJSONString(value)
SIF->>SIF: JSON.parse(value.trim())
Note over SIF: Keep original on parse error
end
SIF-->>BE: sanitized inputs
BE->>BL: blockLog.input = sanitized inputs
Note over BL: Only logs relevant data,<br/>excludes UI/system fields
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Sanitize Trigger Inputs to remove system / UI fields from the logs.
Type of Change
Testing
Tested manually
Checklist