Back to skill

Security audit

Slidev Datav Dashboard

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent dashboard scaffold, but its one-command setup can overwrite project files and attempts an unpinned npm install, so users should review it before running.

Install only after reviewing the scaffold script. Prefer running it in a fresh empty directory, pin dependencies and add a lockfile before npm install, consider npm install --ignore-scripts or npm ci with reviewed versions, and remove or self-host the Google Fonts import if third-party font requests are not acceptable.

Vulnerability Patterns
  • 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
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
Findings (2)

T08 · Insecure Dependencies

Warning
Location
templates/package.json:9
Finding

Unpinned npm Dependencies Permit Unreviewed Supply-Chain Code Execution

Content
View full analysis

Vulnerability Details

File Location: templates/package.json:9-15; installation is triggered by scripts/init-dashboard.sh:41-42
Vulnerability Type: T08: Insecure Dependencies
Risk Level: Medium

Vulnerable Code

templates/package.json:9-15:

json
"dependencies": {
  "@kjgl77/datav-vue3": "^1.7.4",
  "vue": "^3.4.0"
},
"devDependencies": {
  "@slidev/cli": "latest",
  "@slidev/theme-default": "latest"
}

scripts/init-dashboard.sh:41-42:

sh
echo "▸ Installing dependencies (npm install) …"
( cd "$TARGET" && npm install )

Technical Analysis

The scaffold automatically runs npm install without providing a lockfile. Two dependencies use the unrestricted latest tag, while the remaining dependencies use caret ranges that permit newer compatible releases.

As a result, installations are not reproducible and may retrieve package or transitive-dependency versions that were never reviewed with this Skill. npm installation can also execute dependency lifecycle scripts, including preinstall, install, and postinstall, under the privileges of the user running the scaffold.

This is a supply-chain risk rather than evidence that the currently named packages are malicious. Exploitation would require a future package release, registry account, package source, or transitive dependency to become compromised.

Attack Path

  1. An attacker compromises a permitted direct or transitive npm dependency, or publishes a malicious version selected by latest or an allowed semantic-version range.
  2. A user follows the documented workflow and invokes scripts/init-dashboard.sh.
  3. The script creates or updates the target project and automatically runs npm install.
  4. npm resolves the compromised, previously unaudited version because no lockfile constrains dependency resolution.
  5. Any malicious lifecycle script executes with the invoking user's operating-system priv ...[truncated 793 chars]
Remediation
View remediation

Remediation Suggestions

  1. Replace latest and caret ranges with reviewed, exact dependency versions.
  2. Generate and include a package-lock.json produced from those exact versions.
  3. Replace npm install with npm ci so installation fails if the manifest and lockfile differ.
  4. Review direct and transitive dependencies before updating the lockfile.
  5. Use automated dependency scanning and integrity verification in CI.
  6. Where dependency lifecycle scripts are unnecessary, install with npm ci --ignore-scripts; explicitly run only reviewed setup steps afterward.
  7. Avoid running the scaffold with root, administrator, or other elevated privileges.

T09 · Insecure Skill Coding Practices

Note
Location
scripts/init-dashboard.sh:25
Finding

Non-Atomic Scaffolding Partially Overwrites Existing Projects Before Failing

Content
View full analysis

Vulnerability Details

File Location: scripts/init-dashboard.sh:25-31
Vulnerability Type: T09: Insecure Skill Coding Practices
Risk Level: Low

Vulnerable Code

sh
mkdir -p "$TARGET"/{setup,layouts,styles,components}

cp "$SKILL_DIR/assets/setup/main.ts"          "$TARGET/setup/main.ts"
cp "$SKILL_DIR/assets/vite.config.ts"         "$TARGET/vite.config.ts"
cp "$SKILL_DIR/assets/layouts/dashboard.vue"  "$TARGET/layouts/dashboard.vue"
cp "$SKILL_DIR/assets/styles/dashboard.css"   "$TARGET/styles/dashboard.css"
cp "$SKILL_DIR"/assets/components/*.vue        "$TARGET/components/"
cp "$SKILL_DIR/templates/package.json"        "$TARGET/package.json"

The packaged files are named:

text
assets/layouts/dashboard.vue.md
assets/components/DashGrid.vue.md
assets/components/DashPanel.vue.md

Technical Analysis

The script references assets/layouts/dashboard.vue and assets/components/*.vue, but the audited package contains only .vue.md variants. Because the script enables set -e, the missing layout source causes execution to terminate.

The operation is not atomic: before reaching the failing copy, the script has already overwritten the target's setup/main.ts and vite.config.ts. It does not validate all source files first, stage changes in a temporary directory, create backups, or ask for confirmation before replacing existing configuration.

Consequently, invoking the supposedly idempotent scaffold against an existing project can leave that project in a partially modified and inconsistent state.

Attack Path

  1. A user invokes the scaffold with an existing directory as TARGET.
  2. The script creates any missing subdirectories.
  3. It overwrites the existing setup/main.ts and vite.config.ts.
  4. The copy of assets/layouts/dashboard.vue fails because that source path does not exist in the audited package.
  5. set -e terminates the script immediately.
  6. No r ...[truncated 866 chars]
Remediation
View remediation

Remediation Suggestions

  1. Package actual .vue source files or update the copy logic to use the packaged .vue.md files and rename them deliberately at the destination.
  2. Validate that every required source exists before modifying the target.
  3. Build the scaffold in a temporary staging directory and move it into place only after all operations succeed.
  4. Refuse to overwrite an existing target by default, or require an explicit --force option.
  5. Back up files before replacement and restore them automatically if any later step fails.
  6. Check for target-path conflicts and print a complete change plan before writing.
  7. Add an automated test that runs the packaged scaffold in a clean temporary directory and verifies every expected output file.
Vulnerability Patterns
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • 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 (8)

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The file hard-codes the 'zh-CN' locale in time and date formatting calls, which enforces a specific language/locale behavior for displayed content. The slide content is also bilingual elsewhere, so this locale restriction appears to be imposed without user opt-in or a documented regional justification.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Low
Category
Not specified by scanner
Confidence
94% confidence
Finding

The stylesheet imports fonts from fonts.googleapis.com, which causes external network requests during build or runtime and leaks metadata such as IP address, user agent, and access timing to a third party. While this is not code execution, it introduces an unnecessary supply-chain and privacy dependency outside the core dashboard functionality.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
82% confidence
Finding

The example headmatter hard-codes a Chinese title and a Simplified Chinese font family (Source Han Sans SC) without any note that this is just optional styling or intended for a China-specific dashboard. Because the policy applies to natural-language locale constraints, this can be read as prescribing a specific language/locale without user opt-in.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
87% confidence
Finding

The caret range ^1.7.4 for @kjgl77/datav-vue3 is not fully pinned, so future compatible releases may be installed automatically. This is a lower-severity supply-chain concern than "latest", but it still reduces reproducibility and can expose downstream users to newly introduced vulnerabilities or breaking behavior.

Content

Scanner excerpt · templates/package.json (reported line 11)May include surrounding context.

json
"export": "slidev export"
  },
  "dependencies": {
    "@kjgl77/datav-vue3": "^1.7.4",
    "vue": "^3.4.0"
  },
  "devDependencies": {

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
88% confidence
Finding

The caret range ^3.4.0 for vue allows automatic uptake of later minor/patch releases, which weakens reproducibility and can complicate vulnerability management. In template code this matters because many generated dashboards may unknowingly resolve to different versions over time.

Content

Scanner excerpt · templates/package.json (reported line 12)May include surrounding context.

json
},
  "dependencies": {
    "@kjgl77/datav-vue3": "^1.7.4",
    "vue": "^3.4.0"
  },
  "devDependencies": {
    "@slidev/cli": "latest",

Unverifiable Dependency: vue has 1 known advisory(ies) (CVE-2024-9506 (ReDoS vulnerability in vue package that is exploitable through inefficient regex)), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
40% confidence
Finding

Dependency has known vulnerabilities (CVEs). Using packages with unpatched security flaws exposes the environment to known exploits.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
97% confidence
Finding

Using the floating version specifier "latest" for @slidev/cli makes builds non-reproducible and allows future installs to pull in unexpected code or breaking changes without review. In a scaffolding/template skill, this increases supply-chain risk because every new project generated from the template will inherit whatever version is current at install time.

Content

Scanner excerpt · templates/package.json (reported line 15)May include surrounding context.

json
"vue": "^3.4.0"
  },
  "devDependencies": {
    "@slidev/cli": "latest",
    "@slidev/theme-default": "latest"
  }
}

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
97% confidence
Finding

Using "latest" for @slidev/theme-default creates the same supply-chain and reproducibility problem: installs can silently change over time and may introduce vulnerable or malicious transitive code. Because this is a reusable template, the risk propagates to all consumers of the skill rather than a single local environment.

Content

Scanner excerpt · templates/package.json (reported line 16)May include surrounding context.

json
},
  "devDependencies": {
    "@slidev/cli": "latest",
    "@slidev/theme-default": "latest"
  }
}

Static analysis

No suspicious patterns detected.