mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-10-29 12:45:55 +01:00
Keep management bounded by responsible users, scoped grants, current trust, and existing execution policy. Preserve human authentication handoffs and delegated gateway token authority. Co-Authored-By: Paperclip <noreply@paperclip.ing>
10 lines
916 B
TypeScript
10 lines
916 B
TypeScript
export function runnerApiSensitiveResponse(method: string, path: string): boolean {
|
|
if (/(\/apps\/connect$|\/email\/connections$|setup-secret|\/github\/(setup|identity\/start)|\/slack\/resume|start-authorization|finalize-oauth-access|\/oauth\/|\/registration|\/managed\/authorize|\/install$|\/login|\/setup-token-login-sessions|\/local\/attempts)/.test(path)) return true;
|
|
if (/\/secrets\/\{[^}]+\}\/value$/.test(path)) return true;
|
|
return /^\/api\/tool-gateway\/sessions(?:\/|$)/.test(path)
|
|
|| /^\/api\/companies\/\{[^}]+\}\/exports?(?:\/|$)/.test(path)
|
|
|| (method === "POST" && /^\/api\/routines\/\{[^}]+\}\/triggers$/.test(path))
|
|
|| (method === "POST" && /^\/api\/routines\/\{[^}]+\}\/revisions\/\{[^}]+\}\/restore$/.test(path))
|
|
|| /\/(keys|board-api-keys|credentials|invites|join-requests|gateway-tokens|tokens|token|rotate-secret|terminal-session-token|claim-api-key)(\/|$)/.test(path);
|
|
}
|