Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix(agiloft): address PR review feedback
- Add HTTPS enforcement guard to agiloftLogin to prevent plaintext credential transit
- Add null guard on data.output in attach_file transformResponse
- Change empty AgiloftSavedSearchParams interface to type alias

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
  • Loading branch information
waleedlatif1 and claude committed Apr 13, 2026
commit a83585847365cd3aa4cc10c544fbbf01caa29654
8 changes: 4 additions & 4 deletions apps/sim/tools/agiloft/attach_file.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,10 @@ export const agiloftAttachFileTool: ToolConfig<AgiloftAttachFileParams, AgiloftA
return {
success: true,
output: {
recordId: data.output.recordId ?? '',
fieldName: data.output.fieldName ?? '',
fileName: data.output.fileName ?? '',
totalAttachments: data.output.totalAttachments ?? 0,
recordId: data.output?.recordId ?? '',
fieldName: data.output?.fieldName ?? '',
fileName: data.output?.fileName ?? '',
totalAttachments: data.output?.totalAttachments ?? 0,
},
Comment thread
waleedlatif1 marked this conversation as resolved.
}
},
Expand Down
2 changes: 1 addition & 1 deletion apps/sim/tools/agiloft/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export interface AgiloftSelectRecordsParams extends AgiloftBaseParams {
where: string
}

export interface AgiloftSavedSearchParams extends AgiloftBaseParams {}
export type AgiloftSavedSearchParams = AgiloftBaseParams

export interface AgiloftAttachmentInfoParams extends AgiloftBaseParams {
recordId: string
Expand Down
5 changes: 5 additions & 0 deletions apps/sim/tools/agiloft/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ interface AgiloftRequestConfig {
*/
async function agiloftLogin(params: AgiloftBaseParams): Promise<string> {
const base = params.instanceUrl.replace(/\/$/, '')

if (!base.startsWith('https://')) {
throw new Error('Agiloft instanceUrl must use HTTPS to protect credentials')
}

const kb = encodeURIComponent(params.knowledgeBase)
const login = encodeURIComponent(params.login)
const password = encodeURIComponent(params.password)
Expand Down
Loading