Back to skill

Security audit

Skillsmith

Security checks for vulnerabilities and agentic risk

Overview

This is a straightforward local project generator, with reviewable caveats around forced overwrite and an optional CI workflow that runs an unpinned scanner package.

Before installing, understand that this skill is a local scaffolding CLI. Use `--force` only when you are comfortable replacing the target directory, and review or pin the generated CI workflow before committing it to a repository.

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
src/index.js:122
Finding

Unpinned Third-Party Package Execution in Generated CI Workflow

Content
View full analysis

Vulnerability Details

File Location: src/index.js, lines 122-138
Vulnerability Type: Supply-chain risk caused by unpinned package execution
Risk Level: Medium

The generated GitHub Actions workflow contains the following code:

javascript
function buildCiWorkflow() {
  return `name: security-scan

on:
  pull_request:
  push:
    branches: [ main ]

jobs:
  clawshield:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: 20
      - run: npm ci
      - run: npx clawshield scan . --format table --fail-on caution
`;
}

Technical Analysis

The generated workflow invokes clawshield through npx without declaring and locking an exact package version. If the package is not already available locally, npx can resolve and download it from the configured npm registry when the CI job runs.

Consequently, the code executed by the generated workflow is not fully determined by the audited project. A future package release, registry compromise, package-maintainer compromise, or package ownership change could alter the executable content after the generated workflow has been reviewed and committed.

The workflow also references GitHub Actions by mutable major-version tags (actions/checkout@v4 and actions/setup-node@v4) rather than immutable commit hashes. This is a secondary supply-chain hardening concern, although the primary vulnerability is the unpinned npx clawshield execution.

Attack Path

  1. A user runs the generator with --ci or selects the strict-security template, which automatically enables the CI workflow.
  2. The generated .github/workflows/security-scan.yml is committed to a GitHub repository.
  3. A pull request or push to main starts the workflow.
  4. The runner executes npx clawshield scan . without an exact, lockfile-controlled package version.
  5. npx re ...[truncated 1396 chars]
Remediation
View remediation

Remediation Suggestions

  1. Declare clawshield in the generated project's devDependencies using an exact reviewed version rather than invoking an undeclared package:

    json
    {
      "devDependencies": {
        "clawshield": "X.Y.Z"
      }
    }
    
  2. Generate and commit a package lockfile so npm ci installs the reviewed dependency graph with integrity metadata.

  3. Invoke the lockfile-installed binary without allowing runtime installation:

    yaml
    - run: npm ci --ignore-scripts
    - run: npm exec --offline -- clawshield scan . --format table --fail-on caution
    

    Before adding --ignore-scripts, verify that the pinned scanner and its required dependencies do not legitimately depend on installation scripts.

  4. If runtime installation remains necessary, specify an exact version and enforce registry and integrity controls. This is less robust than committing a reviewed lockfile.

  5. Pin actions/checkout and actions/setup-node to reviewed immutable commit SHAs, optionally retaining comments that identify their corresponding release versions.

  6. Add an explicit least-privilege permissions block to the generated workflow, such as read-only repository access where sufficient:

    yaml
    permissions:
      contents: read
    
  7. Review dependency updates through a controlled update process with lockfile diffs, provenance checks, and automated dependency scanning.

Vulnerability Patterns
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (7)

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- You need a starter `SKILL.md`, smoke test, fixtures, and optional CI workflow.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- You need a starter `SKILL.md`, smoke test, fixtures, and optional CI workflow.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- You need a starter `SKILL.md`, smoke test, fixtures, and optional CI workflow.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

This file presents the skill documentation in Korean and labels the current variant as the Korean README, indicating a locale-specific version. Under the stated policy, forcing a specific language without explicit opt-in or a clear region-specific justification is a natural-language policy concern.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
93% confidence
Finding

The skill exposes shell command usage through documented node {baseDir}/bin/create-openclaw-skill.js ... invocations but does not declare any explicit tool scope such as permissions or allowed-tools. This creates an authorization ambiguity where an agent may permit broader shell access than intended, increasing the risk of command execution beyond the minimal scaffold-generation behavior.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
90% confidence
Finding

The generated CI workflow executes npx clawshield scan . without pinning an exact package version. In CI, this can fetch whatever version is current at run time, creating a supply-chain risk where a compromised or incompatible release could execute unreviewed code during builds.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

When --force is supplied and the target directory exists, the code immediately removes the entire directory tree with fs.rmSync(..., { recursive: true, force: true }). Although earlier error messaging mentions overwrite behavior when --force is absent, this destructive path itself has no confirmation prompt or direct disclosure before deletion.

Content

No source excerpt is available for this finding.