Back to skill

Security audit

pactflow

Security checks for vulnerabilities and agentic risk

Overview

This PactFlow skill is mostly purpose-aligned, but it asks users to wire in powerful workspace tools and persistent credentials with weak safety guidance.

Review before installing. Use this only for users who need PactFlow/Pact Broker administration or CI integration. Pin MCP and CLI package versions, avoid pipe-to-shell installers, use least-privilege and preferably short-lived tokens, keep credentials out of project files and shell profiles when possible, and require explicit confirmation before deleting resources or creating/executing webhooks or secrets.

Vulnerability Patterns
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
Findings (3)

T03 · Remote Payload Retrieval and Execution

Error
Location
references/pact-implementations.md:407
Finding

Unverified Remote Installer Scripts Are Executed Directly

Content
View full analysis

Vulnerability Details

File Location: references/pact-implementations.md, lines 407–414
Vulnerability Type: Remote payload retrieval and immediate execution
Risk Level: Critical

Vulnerable Code

bash
# Linux/macOS/WSL (recommended: Unified CLI)
curl -fsSL https://raw.githubusercontent.com/pact-foundation/pact-cli/main/install.sh | sh

# Homebrew (macOS/Linux)
brew tap pact-foundation/tap
brew install pact-foundation/tap/pact

# Windows (PowerShell)
iwr -useb https://raw.githubusercontent.com/pact-foundation/pact-cli/main/install.ps1 | iex

Technical Analysis

The Unix command pipes content retrieved from a mutable GitHub branch directly into a shell. The PowerShell equivalent downloads a remote script and immediately passes it to Invoke-Expression. Neither path pins the installer to a reviewed commit or release, verifies a cryptographic checksum, validates a signature, or provides an inspection step.

Although the URL belongs to an organization associated with Pact, repository ownership does not eliminate supply-chain risk. Compromise of the repository, maintainer account, default branch, release process, or dependency infrastructure could change the effective payload after this Skill has been audited.

This behavior is not the minimum privilege necessary to install the CLI. A versioned package or separately downloaded and verified release artifact would accomplish the same task without executing mutable network content directly.

Attack Path

  1. An attacker compromises the upstream repository, a maintainer account, or another part of the content-delivery chain.
  2. The attacker modifies install.sh or install.ps1 on the mutable main branch.
  3. A user follows the Skill's recommended installation command.
  4. curl | sh or iwr | iex executes the modified payload without prior review.
  5. The payload runs with all permissions available to the invoking user and can access that ...[truncated 618 chars]
Remediation
View remediation

Remediation Suggestions

  1. Remove both direct execution patterns:
    • curl ... | sh
    • iwr ... | iex
  2. Prefer a trusted package manager with an explicitly pinned version.
  3. If a standalone installer is required:
    • Download a release artifact from a versioned release URL.
    • Pin the release version or immutable commit.
    • Verify a vendor-published SHA-256 checksum or cryptographic signature.
    • Save the script to disk rather than piping it directly to an interpreter.
    • Allow the user to inspect the downloaded script before execution.
    • Run it without administrator privileges unless a specific privileged operation is required.
  4. Document the expected files and directories that installation will modify.
  5. Avoid presenting remote-script execution as the recommended installation method.

T08 · Insecure Dependencies

Error
Location
references/mcp-setup.md:81
Finding

Unpinned MCP Packages Execute with Pact Broker Credentials

Content
View full analysis

Vulnerability Details

File Location: references/mcp-setup.md, lines 81–109; repeated at lines 118–189, 220, 243, and 254–259
Vulnerability Type: Mutable third-party dependency execution with sensitive environment variables
Risk Level: High

Vulnerable Code

json
{
  "mcpServers": {
    "smartbear": {
      "command": "npx",
      "args": ["-y", "@smartbear/mcp@latest"],
      "env": {
        "PACT_BROKER_BASE_URL": "https://yourorg.pactflow.io",
        "PACT_BROKER_TOKEN": "your-api-token"
      }
    }
  }
}
json
{
  "mcpServers": {
    "smartbear": {
      "command": "npx",
      "args": ["-y", "@smartbear/mcp@latest"],
      "env": {
        "PACT_BROKER_BASE_URL": "https://your-self-hosted-broker.example.com",
        "PACT_BROKER_USERNAME": "your-username",
        "PACT_BROKER_PASSWORD": "your-password"
      }
    }
  }
}

The guide also recommends executing unpinned packages through the inspector:

bash
npx @modelcontextprotocol/inspector npx @smartbear/mcp@latest

Technical Analysis

The persistent MCP configuration uses @latest, causing package resolution to select a mutable release whenever the MCP server starts. The -y option suppresses the normal installation confirmation. The inspector command is also unpinned.

The executed MCP process receives a Pact Broker token or username/password directly through its environment. The Skill instructs users to create a read/write token, meaning a compromised package release may receive substantial workspace authority.

There is no evidence in the audited files that the current @smartbear/mcp package is malicious. The vulnerability is that a future compromised or unexpectedly changed package can execute automatically with sensitive credentials and without a fresh review. This creates a high-impact supply-chain boundary.

Attack Path

  1. An attacker compromises the npm p ...[truncated 1353 chars]
Remediation
View remediation

Remediation Suggestions

  1. Replace @smartbear/mcp@latest with an explicitly reviewed version, such as @smartbear/mcp@x.y.z.
  2. Pin the MCP inspector package as well.
  3. Use a lockfile and package-manager integrity metadata where the MCP client supports them.
  4. Review release notes and package provenance before upgrading.
  5. Do not allow persistent clients to update and execute new dependency versions automatically.
  6. Use a dedicated, least-privilege broker token rather than a broadly privileged read/write credential.
  7. Separate read-only and administrative credentials, enabling destructive, webhook, and secret operations only when required.
  8. Prefer short-lived tokens and establish rotation and revocation procedures.
  9. Constrain the MCP process with operating-system sandboxing, filesystem restrictions, and outbound network controls where practical.

T09 · Insecure Skill Coding Practices

Warning
Location
references/mcp-setup.md:52
Finding

Broker Credentials Are Stored in Plaintext Shell and Editor Configuration

Content
View full analysis

Vulnerability Details

File Location: references/mcp-setup.md, lines 52–66, 81–109, 118–150, and 159–189
Vulnerability Type: Plaintext persistence of long-lived credentials
Risk Level: Medium

Vulnerable Code

The guide recommends storing credentials in shell profile files:

bash
export PACT_BROKER_BASE_URL="https://yourorg.pactflow.io"
export PACT_BROKER_TOKEN="your-api-token"
bash
export PACT_BROKER_BASE_URL="https://your-self-hosted-broker.example.com"
export PACT_BROKER_USERNAME="your-username"
export PACT_BROKER_PASSWORD="your-password"

It also embeds credentials directly in project or editor MCP configuration:

json
{
  "servers": {
    "smartbear": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "@smartbear/mcp@latest"],
      "env": {
        "PACT_BROKER_BASE_URL": "https://yourorg.pactflow.io",
        "PACT_BROKER_TOKEN": "your-api-token"
      }
    }
  }
}
json
{
  "mcpServers": {
    "smartbear": {
      "command": "npx",
      "args": ["-y", "@smartbear/mcp@latest"],
      "env": {
        "PACT_BROKER_BASE_URL": "https://your-self-hosted-broker.example.com",
        "PACT_BROKER_USERNAME": "your-username",
        "PACT_BROKER_PASSWORD": "your-password"
      }
    }
  }
}

Technical Analysis

Shell profiles and JSON configuration files store the supplied token or password as recoverable plaintext. Project-level files such as .vscode/mcp.json and .cursor/mcp.json are especially risky because they may be committed to source control. Global editor configuration and shell profiles may also be exposed through local malware, other processes running under the user account, backups, support archives, or accidental file sharing.

The guide specifically instructs users to create a read/write token. Persisting such a credential increases the impact of any disclosure and exceeds the ...[truncated 1501 chars]

Remediation
View remediation

Remediation Suggestions

  1. Do not recommend placing operational tokens or passwords directly in project configuration or shell profile files.
  2. Retrieve credentials at runtime from an OS keychain, enterprise secret manager, or the MCP client's protected secret facility.
  3. Ensure .vscode/mcp.json, .cursor/mcp.json, and other credential-bearing local configuration files are excluded through .gitignore.
  4. Provide a checked-in template containing variable references or placeholders only.
  5. Apply restrictive filesystem permissions to unavoidable local secret files.
  6. Use dedicated, short-lived, least-privilege tokens.
  7. Separate read-only tokens from credentials capable of publishing, deleting resources, managing secrets, or creating webhooks.
  8. Document credential rotation, revocation, and repository-history cleanup procedures.
  9. Add secret scanning to local pre-commit hooks and CI pipelines.
  10. Warn users not to include configuration files or environment dumps in logs, screenshots, or support bundles.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
Findings (39)

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 91)May include surrounding context.

md
- `references/pact-broker-setup.md` — Pact Broker setup checklist, full CLI reference, webhook debugging, troubleshooting

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 109)May include surrounding context.

md
- `references/pact-broker-advanced.md` — consumer version selectors, pending/WIP pacts, branches, deployments, webhooks

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 224)May include surrounding context.

md
- `references/pact-broker-advanced.md` — consumer version selectors, pending/WIP pacts, branches, deployments, webhooks

Chaining Abuse

High
Category
Tool Misuse
Confidence
98% confidence
Finding

The shell pipeline | sh chains untrusted network output directly into command execution, eliminating any opportunity for inspection before running. In documentation for developer tooling, this is especially risky because users are likely to execute it verbatim on workstations or CI runners, where compromise could expose credentials, source code, or build infrastructure.

Content

Scanner excerpt · references/pact-implementations.md (reported line 407)May include surrounding context.

bash
# Linux/macOS/WSL (recommended: Unified CLI)
curl -fsSL https://raw.githubusercontent.com/pact-foundation/pact-cli/main/install.sh | sh

# Homebrew (macOS/Linux)
brew tap pact-foundation/tap

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
95% confidence
Finding

Webhook configuration and manual execution allow the agent to create or trigger outbound HTTP requests, which is outside the normal scope of a contract-testing assistant. This creates opportunities for SSRF-like behavior, data exfiltration, unauthorized integration changes, and unexpected side effects in downstream systems.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

Secret creation, update, retrieval, and deletion are not necessary for ordinary PactFlow contract-testing guidance and give the skill access to highly sensitive material. If misused through prompt injection, user confusion, or over-broad agent autonomy, this capability could expose credentials, enable lateral movement, or modify webhook authentication used for external integrations.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The trigger guidance is excessively broad and includes generic phrases like 'safe to deploy?', 'consumer test', and 'OpenAPI contract', which can cause the skill to activate in contexts unrelated to PactFlow. Over-broad invocation increases the chance the agent will surface or use powerful workspace-management and deployment tools when the user intended a general discussion, creating unnecessary exposure to sensitive operations.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The skill advertises create/update/delete capabilities for pacticipants, branches, and environments without any adjacent warning that these are destructive or state-changing actions. In an agent setting, that omission can normalize unsafe tool use and lead to accidental deletion or mutation of production workspace metadata if the skill is invoked in error or the user request is ambiguous.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The skill exposes secret-management operations such as listing, creating, updating, and deleting secrets without emphasizing their sensitivity or restricting when they should be used. Because secrets are high-value assets, normalizing these operations without guardrails increases the risk of accidental disclosure, unauthorized rotation, or destructive changes that can break integrations and compromise connected systems.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The documentation tells users to place long-lived broker tokens and passwords into shell profiles and desktop/editor config files, but does not warn that these locations may be readable by other local users, captured in backups, committed accidentally, or exposed through support bundles. Since these credentials grant access to PactFlow or a Pact Broker, poor secret handling can lead to unauthorized access and data exposure.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
90% confidence
Finding

The VS Code instructions place credentials in .vscode/mcp.json under the project root, creating a persistence risk because project-local files are easily committed, shared, synced, or inspected by other tooling. In the context of a contract-testing broker integration, this can expose API tokens or broker passwords to collaborators or attackers with repository access.

Content

Scanner excerpt · references/mcp-setup.md (reported line 118)May include surrounding context.

md
### VS Code (with Copilot or Claude extension)

Create or edit `.vscode/mcp.json` in your project root:

**PactFlow Cloud (token):**

Rp1

Medium
Category
MCP Rug Pull
Confidence
96% confidence
Finding

The command runs @smartbear/mcp through npx without an exact version, so users will execute the latest published package at runtime. Because this package is meant to handle broker credentials and interact with external systems, an unexpected upstream package change or compromise could result in credential theft or arbitrary code execution.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
96% confidence
Finding

The command runs @smartbear/mcp through npx without an exact version, so users will execute the latest published package at runtime. Because this package is meant to handle broker credentials and interact with external systems, an unexpected upstream package change or compromise could result in credential theft or arbitrary code execution.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
95% confidence
Finding

The global-install/troubleshooting guidance still relies on unpinned npx @smartbear/mcp@latest, which preserves the same supply-chain risk as other examples. Users following troubleshooting steps are especially likely to run commands quickly without scrutiny, increasing exposure to a malicious or compromised release.

Content

No source excerpt is available for this finding.

Whitespace Padding

Medium
Category
Prompt Injection
Confidence
70% confidence
Finding

Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.

Content

Scanner excerpt · references/pact-broker-advanced.md (reported line 21)May include surrounding context.

md
### Selector properties

| Property                   | Description                                                                                                                              |
| -------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
| `mainBranch: true`         | Latest pact for the configured `mainBranch` of each consumer. Requires consumer has set `mainBranch` property.                           |
| `branch: "<name>"`         | Latest pact from a specific branch of each consumer.                                                                                     |

Whitespace Padding

Medium
Category
Prompt Injection
Confidence
70% confidence
Finding

Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.

Content

Scanner excerpt · references/pact-broker-advanced.md (reported line 24)May include surrounding context.

md
| Property                   | Description                                                                                                                              |
| -------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
| `mainBranch: true`         | Latest pact for the configured `mainBranch` of each consumer. Requires consumer has set `mainBranch` property.                           |
| `branch: "<name>"`         | Latest pact from a specific branch of each consumer.                                                                                     |
| `matchingBranch: true`     | Latest pact from any consumer branch with the same name as the current provider branch. Used for coordinated feature branch development. |
| `fallbackBranch: "<name>"` | Fallback if specified `branch` doesn't exist. Discouraged — use two separate selectors instead.                                          |
| `deployedOrReleased: true` | All consumer versions currently deployed OR released and supported in any environment.                                                   |

Whitespace Padding

Medium
Category
Prompt Injection
Confidence
70% confidence
Finding

Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.

Content

Scanner excerpt · references/pact-broker-advanced.md (reported line 33)May include surrounding context.

md
| `environment: "<name>"`    | Further qualifies `deployed` or `released` — only versions in a specific environment.                                                    |
| `tag: "<name>"`            | Legacy: consumer versions with a specific tag. Still supported; prefer `branch`.                                                         |
| `latest: true`             | Used with `tag` — returns the latest version with that tag only.                                                                         |
| `consumer: "<name>"`       | Applies a selector to a specific consumer only.                                                                                          |

### Recommended selectors

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · references/pact-broker-advanced.md (reported line 304)May include surrounding context.

md
provider: "UserService"    # optional: scope to specific provider
  request:
    method: "POST"
    url: "https://api.github.com/repos/example/provider/actions/workflows/pact.yml/dispatches"
    headers: { "Authorization": "Bearer ${pactbroker.githubToken}" }
    body: { "ref": "main", "inputs": { "pact_url": "${pactbroker.pactUrl}" } }

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · references/pact-broker-setup.md (reported line 378)May include surrounding context.

md
provider: "UserService"    # optional: scope to specific provider
  request:
    method: "POST"
    url: "https://api.github.com/repos/example/provider/actions/workflows/pact.yml/dispatches"
    headers: { "Authorization": "Bearer ${pactbroker.githubToken}" }
    body: { "ref": "main", "inputs": { "pact_url": "${pactbroker.pactUrl}" } }

Rp1

Medium
Category
MCP Rug Pull
Confidence
95% confidence
Finding

The documentation recommends pulling a Docker image using the mutable :latest tag, which makes builds non-reproducible and exposes users to supply-chain risk if the tag is retargeted or unexpectedly changed upstream. In CI/CD and security-sensitive tooling, this can result in silently running an unreviewed image version.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · references/pact-broker-setup.md (reported line 228)May include surrounding context.

Webhooks

bash
# Create a webhook (tip: build curl command first, then adapt)
pact-broker create-webhook \
  "https://ci.example.com/api/builds" \
  --request POST \

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The markdown presents shell and PowerShell install commands that fetch remote code and execute it directly, without any warning about trust, review, or integrity verification. In a skill intended to guide users on Pact tooling, this increases the chance that users copy-paste unsafe installation flows, exposing them to supply-chain compromise if the upstream script or transport path is ever abused.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
75% confidence
Finding

Docker image references without a specific tag (:latest is implicit) or digest (@sha256:...) can be silently replaced by a malicious image.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
75% confidence
Finding

Docker image references without a specific tag (:latest is implicit) or digest (@sha256:...) can be silently replaced by a malicious image.

Content

No source excerpt is available for this finding.

Whitespace Padding

Medium
Category
Prompt Injection
Confidence
70% confidence
Finding

Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.

Content

Scanner excerpt · references/pact-plugins.md (reported line 42)May include surrounding context.

md
## Available Plugins

| Plugin                                                                                 | Type            | Language | Support             |
| -------------------------------------------------------------------------------------- | --------------- | -------- | ------------------- |
| [`pact-protobuf-plugin`](https://github.com/pactflow/pact-protobuf-plugin)             | Protobuf + gRPC | Rust     | Official (PactFlow) |
| [`pact-csv-plugin`](https://github.com/pact-foundation/pact-plugins/tree/main/plugins) | CSV content     | Rust     | Official            |