feat: enable coded action apps for SF [ACTN-11690] - #704
feat: enable coded action apps for SF [ACTN-11690]#704Sandeepan-Ghosh-0312 wants to merge 5 commits into
Conversation
Review summaryOne security issue found in both changed files.
The fix is to parse the URL and check the hostname with a leading dot so only genuine subdomains match. Inline suggestions posted on both files:
|
016d9c7 to
b7af7b3
Compare
Review summaryNew finding posted this run:
The two existing open threads on the production-code security bug (host-token-request.ts:13 and coded-action-app-service.ts:188) remain open and unchanged; not re-raised here. |
b7af7b3 to
5c88db6
Compare
Review summaryOne new finding posted this run:
The three existing open threads on production-code and test security (host-token-request.ts, coded-action-app-service.ts, host-token-request.test.ts) remain open; not re-raised here. The production fixes in both service files are correct. |
|
… manager mock The mock used origin.endsWith(suffix) on the raw origin string, the same pattern this PR replaced in production code — it would trust a look-alike registrable domain such as https://evil-uipath.com. Parse the URL and compare the hostname so the mock matches isValidHostOrigin. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Review summaryOne new finding posted this run:
All four previously-resolved threads were confirmed addressed in code — no threads unresolved. |
The catch in isValidOrigin swallowed the URL parse failure silently, so a malformed basedomain left no trace in the runtime console. Emit a console.warn, matching the companion isValidHostOrigin. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Review summaryOne new finding posted this run:
|
The catch discarded the error, so the warning didn't say why the origin URL failed to parse. Bind it and pass it to console.warn, matching isValidOrigin; update the assertion for the third argument. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
✅ No issues found. Checked for bugs and CLAUDE.md compliance. |
Host origins are customer-configurable in some environments (e.g. Service Fabric) and follow no generic pattern, so a domain allowlist cannot express which origins are legitimate. Remove the checks entirely: - delete isValidHostOrigin and TRUSTED_HOST_DOMAINS from host-token-request - rename trustedEmbeddingOrigin to hostEmbeddingOrigin, now derived from isHostEmbedded and embeddingOrigin alone - drop the pre-listener trust guard and the sendMessageToParent check in ActionCenterTokenManager, keeping only the basedomain presence check - delete isValidOrigin from CodedActionAppService; completeTask, getTask and sendMessageToParent now require only that basedomain is present Origin pinning is unchanged: every request is sent to basedomain and only messages whose event.origin matches it are accepted. Tests updated to assert a non-uipath.com customer origin is used as given, replacing the untrusted origin rejection cases. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
✅ No issues found. Checked for bugs and CLAUDE.md compliance. |



Removing basedomain check to include Dedicated and SF environments