Back to skill

Security audit

alibabacloud-tls-cert-diagnosis

Security checks for vulnerabilities and agentic risk

Overview

This is a disclosed read-only TLS certificate diagnostic skill for user-supplied targets, with no evidence of hidden persistence, credential use, exfiltration, or destructive behavior.

Install only if you are comfortable with a local diagnostic script making DNS, TCP, and TLS connections to targets you provide. Review batch files before use and avoid broad scans unless you are authorized to test those endpoints.

Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Output HandlingUnvalidated Output Injection, Cross-Context Output, Unbounded Output
  • Rogue AgentSelf-Modification, Session Persistence
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (10)

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/check_tls.py (reported line 172)May include surrounding context.

python
def run_cmd(cmd: List[str], input_data: Optional[bytes] = None, timeout: float = 10.0) -> tuple[int, str, str]:
    """Run a command and return (returncode, stdout, stderr)."""
    try:
        result = subprocess.run(
            cmd,
            input=input_data,
            capture_output=True,

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/check_tls.py (reported line 457)May include surrounding context.

python
cmd.extend(["-servername", servername])

    try:
        result = subprocess.run(
            cmd,
            stdin=subprocess.DEVNULL,
            stdout=subprocess.PIPE,

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/check_tls.py (reported line 629)May include surrounding context.

python
cmd.extend(["-CAfile", _CA_FILE])

    try:
        result = subprocess.run(
            cmd,
            stdin=subprocess.DEVNULL,
            stdout=subprocess.PIPE,

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
70% confidence
Finding

Without declared permissions the skill's intent is opaque and cannot be validated.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

Most of the code matches the declared TLS certificate diagnostic purpose: it resolves DNS, tests TCP connectivity, fetches certificates with openssl, parses SAN/CN and validity dates, and evaluates trust and chain issues. However, the description says it only checks domains the user explicitly provides, while the code also supports bulk scanning from a file of domains and can inspect IP addresses directly. It also allows arbitrary ports, which broadens behavior beyond the stated browser/HTTPS certificate diagnosis focus. These are additional capabilities not reflected in the description, so this should be flagged as a mismatch.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The manifest describes diagnosing certificate problems for a user-provided domain and emphasizes only checking domains the user explicitly provides. The CLI adds a --file mode that reads and processes multiple domains from a local file, which broadens the behavior from single explicit-domain diagnosis to batch enumeration/scanning.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

On Linux, the skill invokes bash -c pipelines for telnet/grep and /dev/tcp probing instead of using direct socket operations or simple argument-list subprocesses. While port reachability checks are relevant to TLS diagnosis, spawning a shell is a broader execution capability than the manifest's narrowly scoped read-only certificate diagnostic intent suggests.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The module docstring explicitly states that all subprocess calls use argument lists with timeouts. However, the Linux branch of check_port passes shell command strings to bash -c, which contradicts that security claim because a shell interprets the embedded command text.

Content

No source excerpt is available for this finding.

Unvalidated Output Injection

High
Category
Output Handling
Confidence
95% confidence
Finding

Model output is used without validation or sanitization. Unvalidated output injected into downstream contexts (SQL, shell, HTML) enables injection attacks and arbitrary code execution.

Content

Scanner excerpt · scripts/check_tls.py (reported line 172)May include surrounding context.

python
def run_cmd(cmd: List[str], input_data: Optional[bytes] = None, timeout: float = 10.0) -> tuple[int, str, str]:
    """Run a command and return (returncode, stdout, stderr)."""
    try:
        result = subprocess.run(
            cmd,
            input=input_data,
            capture_output=True,

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

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

md
MANDATORY:

- **Read-only**: this skill only inspects and reports. It performs no write operations and requires no credentials of any kind.
- **Single entry point**: all checks MUST be executed through the entry script `scripts/check_tls.py`. Do not hand-assemble diagnostic command chains.
- **User-provided targets only**: only check domains the user explicitly provides.
- **No scanning**: never scan, sweep, or probe unknown or unspecified addresses.