Back to skill

Security audit

VibeSafe Starter — Minimum Security for Vibe Coders

Security checks for vulnerabilities and agentic risk

Overview

This looks like a dependency-audit helper, but it can modify a project and may incorrectly report vulnerable or secret-containing projects as clean.

Review this before installing or running it in a real project. Prefer using the reviewed local scripts rather than cloning a live repository, run it on a clean git working tree, do not run it with elevated privileges, and do not rely on its final CLEAN result without manually reviewing npm audit, pip-audit, and gitleaks output.

Vulnerability Patterns
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (4)

T09 · Insecure Skill Coding Practices

Error
Location
audit.sh:18
Finding

npm audit failures are incorrectly reported as clean results

Content
View full analysis
/dev/null > /tmp/vibe-npm-audit.json; then critical=$(python3 -c "import json; d=json.load(open('/tmp/vibe-npm-audit.json')); print(sum(1 for v in d.get('vulnerabilities',{}).values() if v.get('severity')=='critical'))" 2>/dev/null || echo "0") high=$(python3 -c "import json; d=json.load(open('/tmp/vibe-npm-audit.json')); print(sum(1 for v in d.get('vulnerabilities',{}).values() if v.get('severity')=='high'))" 2>/dev/null || echo "0") moderate=$(python3 -c "import json; d=json.load(open('/tmp/vibe-npm-audit.json')); print(sum(1 for v in d.get('vulnerabilities',{}).values() if v.get('severity')=='moderate'))" 2>/dev/null || echo "0") echo " 🔴 Critical: $critical" echo " 🟠 High: $high" echo " 🟡 Moderate: $moderate" if [ "$critical" -gt 0 ]; then echo " ⚠️ Critical vulnerabilities found! DO NOT DEPLOY." ISSUES=$((ISSUES + critical)) fi else echo " ✅ No issues (or audit unavailable)" fi ``` ### Technical Analysis `npm audit` returns a nonzero status when vulnerabilities at or above its configured audit level are found. The script only parses the generated JSON when `npm audit` returns zero. Consequently, the branch intended to count critical vulnerabilities is generally skipped precisely when vulnerabilities exist. The `else` branch conflates a vulnerability result, network failure, malformed response, and unavailable audit service with a clean result. `ISSUES` remains unchanged, allowing the final status to print `CLEAN — safe to proceed` and return success. The script also counts only critical findings toward `ISSUES`; reported high and moderate findings do not affect the final result, despite the audit being presented as a deployment-safety check. ### Attack Path 1. A ...[truncated 1035 chars]
Remediation
View remediation
"$audit_file" 2>/dev/null audit_status=$? set -e if ! python3 -m json.tool "$audit_file" >/dev/null 2>&1; then echo " ❌ npm audit failed or returned invalid JSON" ISSUES=$((ISSUES + 1)) else # Parse and count all configured severities here. fi ``` Distinguish documented vulnerability exit codes from operational failures. Treat invalid JSON, network errors, and unavailable tooling as scan failures rather than clean results. Define an explicit policy for critical, high, and moderate findings, and ensure every policy-violating severity increments `ISSUES`. Add regression tests using fixture reports and mocked exit statuses of both zero and nonzero. ]]>

T09 · Insecure Skill Coding Practices

Error
Location
audit.sh:58
Finding

Gitleaks findings and scanner failures do not affect the final audit result

Content
View full analysis
/dev/null; then gitleaks detect --source="$PROJECT" --no-git 2>/dev/null | head -5 || echo " ✅ No secrets found" else ``` ### Technical Analysis When Gitleaks is available, its result is displayed through a pipeline but is never used to increment `ISSUES`. Gitleaks normally returns a nonzero status when leaks are detected. Because the command is followed by `|| echo "No secrets found"`, a nonzero finding or operational error can trigger a contradictory clean message. With `set -o pipefail`, the pipeline also fails if Gitleaks reports findings or is terminated after `head` stops reading. That failure is absorbed by the `||` branch, so execution continues without recording an issue. The final report can therefore return `CLEAN — safe to proceed` even after Gitleaks detects credentials. Suppressing standard error further prevents users from distinguishing an actual clean scan from configuration, permission, parsing, or runtime errors. ### Attack Path 1. A repository contains an API token, private key, or another secret recognized by Gitleaks. 2. The audit invokes Gitleaks, which emits findings and returns a nonzero status. 3. The pipeline's nonzero result is handled by the `||` branch rather than recorded as a security issue. 4. `ISSUES` remains unchanged and the script may also print `No secrets found`. 5. The final audit can exit successfully and label the project clean. 6. The repository may then be pushed, packaged, or deployed with the credential present, enabling anyone with access to use the leaked credential. ### Impact Assessment The immediate impact is loss of reliability and possible disclosure of credentials. The privileges obtainable depend on the exposed secret and can include source repository access, cloud-resource control, packa ...[truncated 212 chars]
Remediation
View remediation
"$gitleaks_output" 2>&1 gitleaks_status=$? set -e case "$gitleaks_status" in 0) echo " ✅ No secrets found" ;; 1) head -5 "$gitleaks_output" echo " ⚠️ Gitleaks detected possible secrets" ISSUES=$((ISSUES + 1)) ;; *) cat "$gitleaks_output" >&2 echo " ❌ Gitleaks scan failed" ISSUES=$((ISSUES + 1)) ;; esac ``` Confirm the exact exit-code contract against the installed Gitleaks version. Never use the same message for a clean result and a scanner error. Avoid suppressing diagnostic output completely, and add tests covering clean scans, detected leaks, invalid configuration, and unreadable files. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
audit.sh:18
Finding

Predictable shared temporary file permits clobbering and audit-result tampering

Content
View full analysis
/dev/null > /tmp/vibe-npm-audit.json; then critical=$(python3 -c "import json; d=json.load(open('/tmp/vibe-npm-audit.json')); print(sum(1 for v in d.get('vulnerabilities',{}).values() if v.get('severity')=='critical'))" 2>/dev/null || echo "0") high=$(python3 -c "import json; d=json.load(open('/tmp/vibe-npm-audit.json')); print(sum(1 for v in d.get('vulnerabilities',{}).values() if v.get('severity')=='high'))" 2>/dev/null || echo "0") moderate=$(python3 -c "import json; d=json.load(open('/tmp/vibe-npm-audit.json')); print(sum(1 for v in d.get('vulnerabilities',{}).values() if v.get('severity')=='moderate'))" 2>/dev/null || echo "0") ``` ### Technical Analysis The script writes security-sensitive output to the fixed path `/tmp/vibe-npm-audit.json`. Shared temporary directories are writable by other local users, and the file is created through ordinary shell redirection without exclusive creation, ownership verification, restrictive permissions, or cleanup. On systems without effective symlink protections, a local attacker can create that path as a symbolic link before execution. The redirection can then truncate or overwrite another file writable by the invoking user. The predictable name also enables same-user processes to replace or alter the report between the audit command and subsequent Python reads, producing a time-of-check/time-of-use race. The risk is greater if the audit is unnecessarily run with elevated privileges, although elevated execution is not required by the declared functionality. ### Attack Path 1. An attacker able to write to `/tmp`, or another untrusted process running under the same account, predicts the fixed file name. 2. Before the audit starts, the attacker creates `/tmp/vibe-npm-audit.json` as a symlink to anot ...[truncated 917 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
audit.sh:44
Finding

pip-audit findings terminate the script before issue handling

Content
View full analysis
&1 | tail -5 if [ ${PIPESTATUS[0]} -ne 0 ]; then ISSUES=$((ISSUES + 1)) fi ``` ### Technical Analysis The script enables both `set -e` and `set -o pipefail`. When `pip-audit` finds vulnerabilities, it normally returns a nonzero status. Under these shell options, the unguarded pipeline itself causes the script to exit immediately, before the following `PIPESTATUS` check can increment `ISSUES`. As a result, the final summary is not produced and the script's intended issue-accounting logic is unreachable on the condition it is meant to handle. Piping through `tail -5` additionally hides most of the scanner report and may omit important package names, advisory identifiers, or remediation information. Although the process exits nonzero rather than falsely returning success, abrupt termination and truncated output make the security result ambiguous and can impair automation that expects the documented final report. ### Attack Path 1. A requirements file includes a Python package with a known vulnerability. 2. `pip-audit` detects the vulnerability, emits a report, and exits nonzero. 3. Because `pipefail` propagates that status and `errexit` is enabled, the shell terminates at the pipeline. 4. The `PIPESTATUS` condition and final audit summary are never reached. 5. A user or wrapper that relies on the script's issue count and summary receives incomplete output and may misclassify the failure as a tooling problem instead of a confirmed vulnerability. ### Impact Assessment The flaw primarily affects audit availability and result integrity. It does not directly provide additional system privileges, but it can obscure dependency findings and interfere with reliable enforcement in local o ...[truncated 124 chars]
Remediation
View remediation
"$pip_output" 2>&1 pip_status=$? set -e cat "$pip_output" if [ "$pip_status" -ne 0 ]; then echo " ⚠️ pip-audit reported vulnerabilities or failed" ISSUES=$((ISSUES + 1)) fi ``` If the tool distinguishes vulnerability findings from operational errors, handle those statuses separately. Preserve the complete report or store it as an artifact instead of retaining only the final five lines. Add tests that execute the script with clean, vulnerable, malformed, and unavailable dependency sources. ]]>
Vulnerability Patterns
  • 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
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (16)

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

Scanner excerpt · checklib.sh (reported line 40)May include surrounding context.

sh
echo "   Description: $description"
    
    # npm download stats (last week)
    dl=$(curl -s "https://api.npmjs.org/downloads/point/last-week/$PKG" 2>/dev/null | python3 -c "import json,sys; d=json.load(sys.stdin); print(d.get('downloads','?'))" 2>/dev/null)
    echo "   Downloads/week: $dl"
    
    # Check for known vulnerabilities via OSV

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

Scanner excerpt · checklib.sh (reported line 46)May include surrounding context.

sh
# Check for known vulnerabilities via OSV
    echo ""
    echo "🛡️  OSV.dev check..."
    cves=$(curl -s "https://api.osv.dev/v1/query" -d "{\"package\":{\"name\":\"$PKG\",\"ecosystem\":\"npm\"}}" 2>/dev/null | python3 -c "import json,sys; d=json.load(sys.stdin); print(len(d.get('vulns',[])))" 2>/dev/null)
    
    if [ "$cves" -gt 0 ]; then
        echo "   🔴 $cves known vulnerabilities!"

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

Scanner excerpt · checklib.sh (reported line 50)May include surrounding context.

sh
# Check for known vulnerabilities via OSV
    echo ""
    echo "🛡️  OSV.dev check..."
    cves=$(curl -s "https://api.osv.dev/v1/query" -d "{\"package\":{\"name\":\"$PKG\",\"ecosystem\":\"npm\"}}" 2>/dev/null | python3 -c "import json,sys; d=json.load(sys.stdin); print(len(d.get('vulns',[])))" 2>/dev/null)
    
    if [ "$cves" -gt 0 ]; then
        echo "   🔴 $cves known vulnerabilities!"

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

Scanner excerpt · checklib.sh (reported line 97)May include surrounding context.

sh
echo "   Summary: $summary"
    
    # CVE check
    cves=$(curl -s "https://api.osv.dev/v1/query" -d "{\"package\":{\"name\":\"$PKG\",\"ecosystem\":\"PyPI\"}}" 2>/dev/null | python3 -c "import json,sys; d=json.load(sys.stdin); print(len(d.get('vulns',[])))" 2>/dev/null)
    if [ "$cves" -gt 0 ]; then
        echo "   🔴 $cves known vulnerabilities!"
    else

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
75% confidence
Finding

Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Content

Scanner excerpt · README.md (reported line 11)May include surrounding context.

md
## What You're Risking (Right Now)

Every time an AI agent writes `npm install` or `pip install` without checking:

| Risk | Reality |
|------|---------|

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
75% confidence
Finding

Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Content

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

md
## What You're Risking (Right Now)

Every time an AI agent writes `npm install` or `pip install` without checking:

| Risk | Reality |
|------|---------|

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The script runs npm install --package-lock-only automatically, which modifies the target project by creating or updating package-lock.json without prompting the user. In an audit tool, this side effect is risky because it changes repository state, can dirty working trees or CI environments, and may unintentionally alter dependency resolution metadata while the user expects a read-only scan.

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 · checklib.sh (reported line 40)May include surrounding context.

sh
echo "   Description: $description"
    
    # npm download stats (last week)
    dl=$(curl -s "https://api.npmjs.org/downloads/point/last-week/$PKG" 2>/dev/null | python3 -c "import json,sys; d=json.load(sys.stdin); print(d.get('downloads','?'))" 2>/dev/null)
    echo "   Downloads/week: $dl"
    
    # Check for known vulnerabilities via OSV

External Transmission

Medium
Category
Data Exfiltration
Confidence
70% 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 · checklib.sh (reported line 46)May include surrounding context.

sh
# Check for known vulnerabilities via OSV
    echo ""
    echo "🛡️  OSV.dev check..."
    cves=$(curl -s "https://api.osv.dev/v1/query" -d "{\"package\":{\"name\":\"$PKG\",\"ecosystem\":\"npm\"}}" 2>/dev/null | python3 -c "import json,sys; d=json.load(sys.stdin); print(len(d.get('vulns',[])))" 2>/dev/null)
    
    if [ "$cves" -gt 0 ]; then
        echo "   🔴 $cves known vulnerabilities!"

External Transmission

Medium
Category
Data Exfiltration
Confidence
70% 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 · checklib.sh (reported line 50)May include surrounding context.

sh
# Check for known vulnerabilities via OSV
    echo ""
    echo "🛡️  OSV.dev check..."
    cves=$(curl -s "https://api.osv.dev/v1/query" -d "{\"package\":{\"name\":\"$PKG\",\"ecosystem\":\"npm\"}}" 2>/dev/null | python3 -c "import json,sys; d=json.load(sys.stdin); print(len(d.get('vulns',[])))" 2>/dev/null)
    
    if [ "$cves" -gt 0 ]; then
        echo "   🔴 $cves known vulnerabilities!"

External Transmission

Medium
Category
Data Exfiltration
Confidence
70% 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 · checklib.sh (reported line 97)May include surrounding context.

sh
# Check for known vulnerabilities via OSV
    echo ""
    echo "🛡️  OSV.dev check..."
    cves=$(curl -s "https://api.osv.dev/v1/query" -d "{\"package\":{\"name\":\"$PKG\",\"ecosystem\":\"npm\"}}" 2>/dev/null | python3 -c "import json,sys; d=json.load(sys.stdin); print(len(d.get('vulns',[])))" 2>/dev/null)
    
    if [ "$cves" -gt 0 ]; then
        echo "   🔴 $cves known vulnerabilities!"

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 · checklib.sh (reported line 46)May include surrounding context.

sh
# Check for known vulnerabilities via OSV
    echo ""
    echo "🛡️  OSV.dev check..."
    cves=$(curl -s "https://api.osv.dev/v1/query" -d "{\"package\":{\"name\":\"$PKG\",\"ecosystem\":\"npm\"}}" 2>/dev/null | python3 -c "import json,sys; d=json.load(sys.stdin); print(len(d.get('vulns',[])))" 2>/dev/null)
    
    if [ "$cves" -gt 0 ]; then
        echo "   🔴 $cves known vulnerabilities!"

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 · checklib.sh (reported line 50)May include surrounding context.

sh
# Check for known vulnerabilities via OSV
    echo ""
    echo "🛡️  OSV.dev check..."
    cves=$(curl -s "https://api.osv.dev/v1/query" -d "{\"package\":{\"name\":\"$PKG\",\"ecosystem\":\"npm\"}}" 2>/dev/null | python3 -c "import json,sys; d=json.load(sys.stdin); print(len(d.get('vulns',[])))" 2>/dev/null)
    
    if [ "$cves" -gt 0 ]; then
        echo "   🔴 $cves known vulnerabilities!"

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 · checklib.sh (reported line 97)May include surrounding context.

sh
# Check for known vulnerabilities via OSV
    echo ""
    echo "🛡️  OSV.dev check..."
    cves=$(curl -s "https://api.osv.dev/v1/query" -d "{\"package\":{\"name\":\"$PKG\",\"ecosystem\":\"npm\"}}" 2>/dev/null | python3 -c "import json,sys; d=json.load(sys.stdin); print(len(d.get('vulns',[])))" 2>/dev/null)
    
    if [ "$cves" -gt 0 ]; then
        echo "   🔴 $cves known vulnerabilities!"

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 · checklib.sh (reported line 66)May include surrounding context.

sh
echo ""
        echo "📊 GitHub activity..."
        repo_path=$(echo "$repo_url" | sed 's|https://github.com/||')
        gh_data=$(curl -s "https://api.github.com/repos/$repo_path" 2>/dev/null)
        stars=$(echo "$gh_data" | python3 -c "import json,sys; d=json.load(sys.stdin); print(d.get('stargazers_count','?'))" 2>/dev/null)
        updated=$(echo "$gh_data" | python3 -c "import json,sys; d=json.load(sys.stdin); print(d.get('pushed_at','?')[:10])" 2>/dev/null)
        echo "   Stars: $stars"

External Script Fetching

Low
Category
Supply Chain
Confidence
15% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

Scanner excerpt · checklib.sh (reported line 66)May include surrounding context.

sh
echo ""
        echo "📊 GitHub activity..."
        repo_path=$(echo "$repo_url" | sed 's|https://github.com/||')
        gh_data=$(curl -s "https://api.github.com/repos/$repo_path" 2>/dev/null)
        stars=$(echo "$gh_data" | python3 -c "import json,sys; d=json.load(sys.stdin); print(d.get('stargazers_count','?'))" 2>/dev/null)
        updated=$(echo "$gh_data" | python3 -c "import json,sys; d=json.load(sys.stdin); print(d.get('pushed_at','?')[:10])" 2>/dev/null)
        echo "   Stars: $stars"