Back to skill

Security audit

Ssl Checker

Security checks for vulnerabilities and agentic risk

Overview

This is a small OpenSSL-based SSL checker with quality and accuracy issues, but no evidence of hidden, destructive, credential-stealing, or persistent behavior.

Install only if you are comfortable with a basic, imperfect SSL-checking shell script. Expect it to make outbound TLS connections to domains you provide, and be aware the documented commands appear broken until the argument handling is fixed. Do not rely on its grade or cipher output as a complete security assessment.

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

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/script.sh:71
Finding

Unsafe Domain Argument Handling Enables OpenSSL Argument Injection and Denial of Service

Content
View full analysis

Vulnerability Details

File Location: scripts/script.sh:71-109
Vulnerability Type: Incorrect positional argument handling and unquoted shell expansion
Risk Level: Medium

The command handlers incorrectly read the target domain from $2, even though main removes the command name with shift before dispatching the remaining arguments. Consequently, the documented invocation supplies the domain as $1, not $2.

The selected argument is also expanded without quotation when passed to OpenSSL and to internal shell functions.

bash
cmd_check() {
    local domain="${2:-}"
    [ -z "$domain" ] && die "Usage: $SCRIPT_NAME check <domain>"
    echo | openssl s_client -connect $2:443 -servername $2 2>/dev/null | openssl x509 -noout -subject -issuer -dates 2>/dev/null
}

cmd_grade() {
    local domain="${2:-}"
    [ -z "$domain" ] && die "Usage: $SCRIPT_NAME grade <domain>"
    echo | openssl s_client -connect $2:443 2>/dev/null | openssl x509 -noout -dates 2>/dev/null; echo 'Full grade: use ssllabs.com'
}

cmd_chain() {
    local domain="${2:-}"
    [ -z "$domain" ] && die "Usage: $SCRIPT_NAME chain <domain>"
    echo | openssl s_client -connect $2:443 -showcerts 2>/dev/null | grep -E 's:|i:'
}

cmd_protocols() {
    local domain="${2:-}"
    [ -z "$domain" ] && die "Usage: $SCRIPT_NAME protocols <domain>"
    for p in tls1 tls1_1 tls1_2 tls1_3; do echo | openssl s_client -connect $2:443 -$p 2>/dev/null | grep -q 'Cipher' && echo "$p: OK" || echo "$p: FAIL"; done
}

cmd_expiry() {
    local domain="${2:-}"
    [ -z "$domain" ] && die "Usage: $SCRIPT_NAME expiry <domain>"
    echo | openssl s_client -connect $2:443 -servername $2 2>/dev/null | openssl x509 -noout -enddate 2>/dev/null
}

cmd_ciphers() {
    local domain="${2:-}"
    [ -z "$domain" ] && die "Usage: $SCRIPT_NAME ciphers <domain>"
    echo | openssl s_client -connect $2:443 2>/dev/null | grep 'Cipher'
}

cmd_report
...[truncated 2938 chars]
Remediation
View remediation

Remediation Suggestions

  1. Read the domain from $1 after dispatch and use the local variable consistently:

    bash
    local domain="${1:-}"
    [[ -n "$domain" ]] || die "Usage: $SCRIPT_NAME check &lt;domain&gt;"
    
  2. Quote every expansion used as an argument:

    bash
    openssl s_client \
        -connect "${domain}:443" \
        -servername "$domain"
    
  3. Quote arguments passed between functions:

    bash
    cmd_check "$domain"
    cmd_protocols "$domain"
    
  4. Validate the target before invoking OpenSSL. If only DNS names are supported, enforce an appropriate hostname policy. If IPv4 or IPv6 addresses are also required, parse them separately rather than weakening the hostname expression.

    bash
    [[ "$domain" =~ ^([A-Za-z0-9-]+\.)*[A-Za-z0-9-]+$ ]] ||
        die "Invalid domain"
    
  5. Reject unexpected argument counts so an attacker cannot supply hidden trailing arguments:

    bash
    [[ $# -eq 1 ]] || die "Usage: $SCRIPT_NAME check &lt;domain&gt;"
    
  6. Use OpenSSL's explicit option terminator if supported by the deployed OpenSSL version, while retaining validation and quoting. Do not rely on an option terminator as the sole defense.

  7. Add regression tests covering:

    • A normal hostname.
    • Missing and excessive arguments.
    • Values beginning with -.
    • Spaces, tabs, wildcard characters, and newlines.
    • IPv4 and IPv6 targets if those formats are intentionally supported.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (5)

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

The code is broadly aligned with the stated SSL auditing purpose: it connects to domains on port 443 and inspects certificate metadata, expiry, protocol support, and some cipher information. However, there are material description/behavior mismatches. First, the tool includes an undeclared certificate chain inspection capability. Second, the 'grade' command suggests SSL health grading, but it does not compute a grade and only outputs certificate dates with a message to use an external site. Third, the description says it checks cipher suites, but the implementation merely greps for 'Cipher' from a single openssl connection, which is not a true enumeration or audit of supported cipher suites. So the overall purpose is similar, but the description is not fully accurate about what is and is not actually implemented.

Content

No source excerpt is available for this finding.

Whitespace Padding

Medium
Category
Prompt Injection
Confidence
80% confidence
Finding

Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.

Content

Scanner excerpt · scripts/script.sh (reported line 9)May include surrounding context.

sh
DATA_DIR="$HOME/.local/share/ssl-checker"
mkdir -p "$DATA_DIR"

#
#
#
#

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The skill description says it checks SSL certificate health, protocols, and cipher suites on domains. However, cmd_ciphers only runs a default TLS handshake and greps for 'Cipher', which reveals just the currently negotiated cipher, not the server's supported cipher suites or any meaningful cipher-suite audit.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
83% confidence
Finding

This shell script repeatedly uses openssl s_client to initiate outbound network connections to a domain provided by the user, but the file contains no comment, docstring, or user-facing notice explaining that it will contact remote hosts. For a code file, these network operations qualify for review under missing user warnings because they transmit system-originated connection metadata to external servers.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Low
Category
Not specified by scanner
Confidence
79% confidence
Finding

A user would reasonably expect the skill to assess certificate and TLS health directly. Instead, cmd_grade only prints certificate dates and then tells the user to use ssllabs.com, so the advertised health/grading capability is not actually implemented by the skill.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.