Skip to content

fix(security): reject URL injection in Qualtrics datacenter and Piped… - #3912

Open
AnkitSegment wants to merge 1 commit into
mainfrom
fix/url-injection-qualtrics-pipedrive-v2
Open

fix(security): reject URL injection in Qualtrics datacenter and Piped…#3912
AnkitSegment wants to merge 1 commit into
mainfrom
fix/url-injection-qualtrics-pipedrive-v2

Conversation

@AnkitSegment

Copy link
Copy Markdown
Contributor

A summary of your pull request, including the what change you're making and why.

Validates that user-supplied datacenter (Qualtrics) and domain (Pipedrive) fields contain only alphanumeric characters and hyphens before interpolating them into API base URLs. Without this check, an attacker-controlled value could redirect requests — including bearer tokens and API keys — to an arbitrary host. Fixes SECOPS-25215 (Qualtrics) and SECOPS-25240 (Pipedrive).

Testing

Include any additional information about the testing you have completed to
ensure your changes behave as expected. For a speedy review, please check
any of the tasks you completed below during your testing.

  • Added unit tests for new functionality
  • Tested end-to-end using the local server
  • [If destination is already live] Tested for backward compatibility of destination. Note: New required fields are a breaking change.
  • [Segmenters] Tested in the staging environment
  • [Segmenters] [If applicable for this change] Tested for regression with Hadron.

Security Review

Please ensure sensitive data is properly protected in your integration.

  • Reviewed all field definitions for sensitive data (API keys, tokens, passwords, client secrets) and confirmed they use type: 'password'

New Destination Checklist

  • Extracted all action API versions to verioning-info.ts file. example

…rive domain settings

Validates that user-supplied datacenter (Qualtrics) and domain (Pipedrive)
fields contain only alphanumeric characters and hyphens before interpolating
them into API base URLs. Without this check, an attacker-controlled value
could redirect requests — including bearer tokens and API keys — to an
arbitrary host. Fixes SECOPS-25215 (Qualtrics) and SECOPS-25240 (Pipedrive).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 30, 2026 05:41
@AnkitSegment
AnkitSegment requested a review from a team as a code owner July 30, 2026 05:41
@github-actions
github-actions Bot requested review from arnav777dev and nk1107 July 30, 2026 05:42

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.

Adds input validation to prevent URL injection via user-controlled subdomain components used to construct Qualtrics and Pipedrive API base URLs (SECOPS-25215 / SECOPS-25240).

Changes:

  • Validate datacenter (Qualtrics) to allow only alphanumeric characters and hyphens before building the base URL.
  • Validate domain (Pipedrive) to allow only alphanumeric characters and hyphens before making API requests.
  • Add unit tests covering common URL-injection payload patterns (/, ?, @).

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
packages/destination-actions/src/destinations/qualtrics/qualtricsApiClient.ts Rejects unsafe datacenter strings before interpolating into Qualtrics base URL.
packages/destination-actions/src/destinations/qualtrics/tests/index.test.ts Adds tests ensuring injected datacenter values are rejected.
packages/destination-actions/src/destinations/pipedrive/utils.ts Introduces validateDomain to reject unsafe domain strings before URL construction.
packages/destination-actions/src/destinations/pipedrive/pipedriveApi/pipedrive-client.ts Calls validateDomain when constructing the Pipedrive client.
packages/destination-actions/src/destinations/pipedrive/index.ts Calls validateDomain during testAuthentication before issuing the request.
packages/destination-actions/src/destinations/pipedrive/createUpdatePerson/tests/index.test.ts Adds tests ensuring injected domain values are rejected.

await expect(testDestination.testAuthentication(authData)).rejects.toThrowError(/401/)
})

it('throw error when datacenter contains URL injection characters', async () => {
await expect(testDestination.testAuthentication(authData)).rejects.toThrowError(/Invalid datacenter ID/)
})

it('throw error when datacenter contains @ injection', async () => {
const PERSON_ID = 33333

describe('Pipedrive domain validation', () => {
it('should throw when domain contains URL injection characters', async () => {
).rejects.toThrowError(/Invalid domain/)
})

it('should throw when domain contains @ injection', async () => {
Comment on lines +5 to +11
export function validateDomain(domain: string): void {
if (!/^[a-zA-Z0-9-]+$/.test(domain)) {
throw new InvalidAuthenticationError(
'Invalid domain. Domain must contain only alphanumeric characters and hyphens.'
)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants