Back to skill

Security audit

quality-test-implementation

Security checks for vulnerabilities and agentic risk

Overview

This skill is a disclosed code-quality and test-coverage workflow whose repository changes and test-tool commands fit its stated purpose.

Install this only when you want an agent to make broad quality, dependency, test, documentation, and commit changes in a repository. Prefer running it on a feature branch in a disposable or isolated development environment, and pin or locally scope the optional pip and .NET tool installs where practical.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (2)

T08 · Insecure Dependencies

Warning
Location
references/coverage-python.md:8
Finding

Unpinned Python Development Dependencies

Content
View full analysis

Vulnerability Details

File Location: references/coverage-python.md, lines 8-10
Vulnerability Type: Unpinned third-party development dependencies
Risk Level: Medium

Vulnerable Code:

bash
python -m pip install pytest pytest-cov coverage
# optional type checking
python -m pip install mypy

Technical Analysis

The documented installation commands do not constrain package versions or verify package hashes. Consequently, package resolution depends on the mutable state of the configured Python package index at installation time.

Package installation and subsequent execution of pytest, coverage plugins, and mypy allow downloaded package code to run with the privileges of the invoking user. If an upstream package, release process, registry account, package index, or package-resolution configuration is compromised, a malicious release could be selected without any change to the audited skill.

This is a supply-chain weakness rather than evidence that the currently named packages are malicious.

Attack Path

  1. An attacker compromises a relevant package publisher, distribution channel, configured package index, or dependency-resolution path.
  2. The attacker publishes a malicious release that satisfies the unconstrained installation request.
  3. A user follows the documented prerequisite commands.
  4. pip resolves and installs the attacker-controlled release.
  5. Malicious package code executes during installation, plugin discovery, test execution, coverage collection, or type checking.
  6. The payload acts with the privileges and environmental access of the user running the audit.

Impact Assessment

Successful exploitation could provide code execution under the invoking user's account. The accessible scope may include the target repository, source code, test data, environment variables, user-writable files, and credentials exposed to the audit process. It does not directly grant elevated ...[truncated 112 chars]

Remediation
View remediation

Remediation Suggestions

  • Pin every tool to a reviewed version, for example by using exact == constraints.
  • Maintain a locked requirements file generated by a dependency-locking tool.
  • Require package hashes with pip --require-hashes where practical.
  • Install tools inside a dedicated virtual environment rather than the user's global Python environment.
  • Use only an approved package index over authenticated TLS, and disable unintended extra indexes.
  • Scan and periodically update pinned dependencies through a controlled review process.
  • Run testing and analysis in an isolated container with minimal filesystem access, no production credentials, and restricted network connectivity.

T08 · Insecure Dependencies

Warning
Location
references/coverage-dotnet.md:11
Finding

Unpinned Global .NET Tool Installation

Content
View full analysis

Vulnerability Details

File Location: references/coverage-dotnet.md, lines 11 and 42
Vulnerability Type: Unpinned globally installed third-party tools
Risk Level: Medium

Vulnerable Code:

bash
dotnet tool install --global coverlet.console
bash
# install once
dotnet tool install --global dotnet-reportgenerator-globaltool

Technical Analysis

These commands install mutable latest versions of third-party tools without an explicit version constraint or integrity verification. They also use --global, extending the installation beyond the audited repository and making the selected executables available to later shell sessions for the same user.

A compromised package publisher, NuGet feed, registry account, or newly published malicious version could therefore change the code installed by these instructions after the skill itself has been reviewed. The tools subsequently process build artifacts and coverage files with the invoking user's privileges.

Global installation increases the affected scope and can leave an unreviewed tool available after the audit completes. This finding does not indicate that the named tools or their current releases are malicious.

Attack Path

  1. An attacker compromises the publisher or distribution path for one of the referenced .NET tools.
  2. The attacker publishes a malicious version under the existing package identity.
  3. A user runs the documented unversioned global installation command.
  4. NuGet resolves the attacker-controlled latest version and installs it into the user's global tool directory.
  5. The user invokes the tool during coverage collection or report generation, causing the malicious payload to execute.
  6. Because the tool is installed globally, the compromised executable remains available to subsequent sessions until explicitly removed.

Impact Assessment

Successful exploitation could execute arbitrary code with the invoking user ...[truncated 362 chars]

Remediation
View remediation

Remediation Suggestions

  • Pin each tool with an explicitly reviewed --version.
  • Replace global installation with a repository-local .NET tool manifest using dotnet new tool-manifest and dotnet tool install.
  • Commit the tool manifest and restore the declared versions with dotnet tool restore.
  • Configure only trusted NuGet sources and use package-source mapping where applicable.
  • Validate package signatures and integrity through the organization's dependency-verification process.
  • Execute restored tools in an isolated, non-privileged environment with restricted credentials and network access.
  • Regularly review and deliberately update pinned versions after vulnerability and provenance checks.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep