Back to skill

Security audit

cognitive-gate

Security checks for vulnerabilities and agentic risk

Overview

This skill is a small, clearly described wrapper for using Cognitive Gate, with the main caveat that installation pulls code from a third-party GitHub tag.

Install this in an isolated virtual environment and review or pin the referenced GitHub dependency if you need stronger reproducibility. Avoid running the pip install with elevated privileges.

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 (1)

T08 · Insecure Dependencies

Warning
Location
SKILL.md:18
Finding
Unverified Dependency Installation from a Mutable VCS Reference## Vulnerability Details **File Location**: `SKILL.md`, lines 18–22 **Vulnerability Type**: Supply-chain risk from an unsafe external dependency source **Risk Level**: Medium **Complete Code Snippet**: ```markdown ## Install ```bash python3 -m pip install "git+https://github.com/somo-ui/cognitive-gate.git@v0.1.6" ``` ``` ### Technical Analysis The documented installation procedure directs users to install Python code directly from a third-party Git repository. The dependency is identified by the Git tag `v0.1.6`, rather than by an immutable commit hash or a cryptographically verified release artifact. Git tags can be moved or replaced by repository maintainers or by an attacker who compromises the repository. No package hash, commit verification, signature validation, or dependency lock file is provided. Consequently, the code retrieved when a user executes this command may differ from the code that was originally reviewed. Python package installation can execute build-system or installation logic and installs executable modules into the selected environment. The external package implementation is not included in the audited project, so its behavior and transitive dependencies could not be verified. ### Attack Path 1. An attacker compromises the referenced repository, a maintainer account, or the release workflow. 2. The attacker moves or recreates the `v0.1.6` tag so that it points to a malicious revision. 3. A user follows the installation command in `SKILL.md`. 4. `pip` retrieves the attacker-controlled revision and processes its package metadata, build backend, dependencies, and installation logic. 5. Malicious code executes during installation or later when the installed CLI or Python API is invoked. ### Impact Assessment Successful exploitation could execute arbitrary code with the privileges of the user running `pip`. This may permit access to that user's files, environment variables, credentials, net ...[truncated 435 chars]
Remediation
## Remediation Suggestions 1. Replace the mutable Git tag with a reviewed, immutable full commit hash. 2. Prefer a trusted package-registry release with pinned versions and cryptographic hashes. 3. Use a lock file or constraints file that pins all transitive dependencies. 4. Verify signed commits, signed tags, or release attestations before installation. 5. Install inside an isolated virtual environment or container using an unprivileged account. 6. Avoid `sudo pip install` and prevent installation into system-managed Python environments. 7. Document the expected commit digest and provide a reproducible verification procedure. 8. Periodically audit the external package, its build configuration, and its complete dependency tree.
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

Static analysis

No suspicious patterns detected.