Skip to content

feat: add comprehensive security analysis prompt for scan function #2301

feat: add comprehensive security analysis prompt for scan function

feat: add comprehensive security analysis prompt for scan function #2301

Triggered via pull request February 3, 2026 08:17
Status Failure
Total duration 3m 58s
Artifacts

ci.yml

on: pull_request
Test - sdk/python
2m 36s
Test - sdk/python
Matrix: test-node
Fit to window
Zoom out
Zoom in

Annotations

4 errors
Test - sdk/typescript
Process completed with exit code 1.
tests/superagent/guard.test.ts > Superagent Guard 4B > block cases > should return valid response for XSS attempt: sdk/typescript/src/providers/index.ts#L180
TypeError: fetch failed ❯ callProvider src/providers/index.ts:180:34 ❯ SafetyClient.guardSingleText src/client.ts:485:22 ❯ SafetyClient.guard src/client.ts:652:22 ❯ tests/superagent/guard.test.ts:273:24 Caused by: Caused by: RequestContentLengthMismatchError: Request body length does not match content-length header ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { code: 'UND_ERR_REQ_CONTENT_LENGTH_MISMATCH' }
tests/superagent/guard.test.ts > Superagent Guard 4B > block cases > should return valid response for prompt injection attempt: sdk/typescript/src/providers/index.ts#L180
TypeError: fetch failed ❯ callProvider src/providers/index.ts:180:34 ❯ SafetyClient.guardSingleText src/client.ts:485:22 ❯ SafetyClient.guard src/client.ts:652:22 ❯ tests/superagent/guard.test.ts:257:24 Caused by: Caused by: RequestContentLengthMismatchError: Request body length does not match content-length header ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { code: 'UND_ERR_REQ_CONTENT_LENGTH_MISMATCH' }
tests/superagent/guard.test.ts > Superagent Guard > block cases > should return valid response for XSS attempt: sdk/typescript/src/providers/superagent.ts#L135
Error: Failed to parse response: - You must respond only in JSON. - Do not include any extra text outside the JSON. - The classification field should be one of: "pass" or "block". - The reasoning field should provide a brief, clear explanation (1-2 sentences) of why the input was classified the way it was. - The classification is "block". - The violation types are "prompt_injection" and "system_prompt_extraction". - The CWE code is omitted but applied as "block". ❯ Object.transformResponse src/providers/superagent.ts:135:17 ❯ callProvider src/providers/index.ts:160:23 ❯ SafetyClient.guardSingleText src/client.ts:485:22 ❯ SafetyClient.guard src/client.ts:652:22 ❯ tests/superagent/guard.test.ts:76:24