Back to skill

Security audit

Cron Job Guardian

Security checks for vulnerabilities and agentic risk

Overview

This appears to be a static cron/script audit skill, but its local directory scanning can unintentionally read through symlinks outside the folder the user chose.

Review before installing if you plan to scan untrusted folders or repositories with secrets. Use it only on directories you control, check for symlinks first, prefer dry-run/stdout when possible, and choose output paths carefully because --output writes files. I found no network exfiltration, persistence, or production task mutation path.

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/run.py:31
Finding
Directory Scan Boundary Bypass Through Symbolic Links<![CDATA[ ## Vulnerability Details **File Location**: `scripts/run.py:31-39` and `scripts/run.py:136-149` **Vulnerability Type**: Unrestricted symbolic-link traversal and unintended local file disclosure **Risk Level**: Medium ### Vulnerable Code ```python def list_text_files(root: Path, limit: int = 50): results = [] for path in root.rglob("*"): if len(results) >= limit: break if path.is_file(): if path.suffix.lower() in {".md",".txt",".json",".yaml",".yml",".py",".js",".ts",".csv",".tsv",".sh"}: results.append(path) return results ``` ```python def pattern_report(spec: dict, path: Path, limit: int) -> str: targets = [path] if path.is_file() else list_text_files(path, limit=limit) findings = [] for target in targets: text = read_text(target) for name, pattern in PATTERNS.items(): for match in re.finditer(pattern, text, flags=re.IGNORECASE): snippet = match.group(0) if "secret_like" == name: snippet = re.sub(r"([A-Za-z0-9_\-]{4})[A-Za-z0-9_\-]+", r"\1***", snippet) findings.append((str(target), name, snippet[:160])) ``` ### Technical Analysis The directory scanner recursively discovers entries with `Path.rglob()` and accepts them when `Path.is_file()` returns true. Both `is_file()` and the subsequent `read_text()` operation follow symbolic links. The implementation does not reject symbolic links or resolve each candidate and verify that its canonical path remains inside the requested scan root. Consequently, a directory supplied by an untrusted party can contain a symbolic link whose filename has an accepted extension but whose target is outside the directory. The scanner will read the external target using the operating-system permissions of the process running the Skill. The built-in pattern scanner only includes matched portions of a file in its report, which limits disclosure, ...[truncated 1652 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Reject symbolic links before accepting a scan target: ```python if path.is_symlink(): continue ``` 2. Resolve the scan root and every candidate, then enforce containment: ```python root_resolved = root.resolve() for path in root.rglob("*"): if path.is_symlink(): continue try: resolved = path.resolve(strict=True) resolved.relative_to(root_resolved) except (OSError, ValueError): continue if resolved.is_file() and resolved.suffix.lower() in ALLOWED_SUFFIXES: results.append(resolved) ``` 3. Apply the same boundary validation when the direct `--input` value is a file, because `targets = [path] if path.is_file()` also follows a symbolic link. 4. Where supported, open files using operating-system facilities that prevent following symbolic links, such as `O_NOFOLLOW`. This reduces time-of-check/time-of-use race conditions in which a validated file is replaced by a symbolic link before it is opened. 5. Catch resolution and file-access exceptions so broken links, permission failures, and concurrent filesystem changes result in a controlled warning rather than an unexpected termination. 6. Add automated tests covering: - A symbolic link to a file outside the scan root. - A symbolic link to a file inside the scan root. - A broken symbolic link. - Replacement of a validated file during scanning. - A direct `--input` path that is itself a symbolic link. 7. Run scans under a least-privileged account so that any remaining filesystem traversal issue cannot access unrelated sensitive files. ]]>
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (14)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding
The declared purpose is narrowly framed as cron/timer risk review, but the analyzed behavior reportedly includes broad directory auditing, CSV analysis, sensitive-pattern scanning, package/frontmatter inspection, and externally driven behavior from `spec.json`. This mismatch is dangerous because users may grant trust or access based on the benign description while the skill can perform substantially broader analysis than expected.

Description-Behavior Mismatch

High
Confidence
97% confidence
Finding
The manifest describes a specialized analyzer for cron or timer configurations and operational workflow risks, but the code is a multi-mode generic reporting tool. It generates structured briefs, directory summaries, CSV field reports, regex pattern scans, and general skill packaging audits, none of which are specifically tied to cron/timer configuration analysis as the primary behavior.

Vague Triggers

Medium
Confidence
92% confidence
Finding
The trigger phrases are generic enough that the skill may activate in situations outside its intended narrow scope, such as broad operational reviews that mention cron, retries, or concurrency. In an agentic environment, over-broad routing can cause the wrong skill to analyze sensitive operational artifacts or produce misleading audit guidance, even though this README also includes some limiting language and explicitly says not to trigger tasks.

Lp3

Medium
Category
MCP Least Privilege
Confidence
88% confidence
Finding
The skill advertises executable capabilities via `python3 ... --input ... --output ...` and implies file read/write plus shell access, but it does not declare an explicit tool scope such as `permissions` or `allowed-tools`. That creates an authorization gap: reviewers and runtime policy engines cannot easily verify or constrain what the skill is permitted to access, increasing the chance of unintended file access or command execution.

Natural-Language Policy Violations

Medium
Confidence
90% confidence
Finding
The skill content is written entirely in Chinese and the manifest description also uses Chinese instructions, with no indication that users may choose another language. This creates a language/locale policy concern because the skill appears to impose a specific language by default rather than offering opt-in or flexibility.

Natural-Language Policy Violations

Medium
Confidence
95% confidence
Finding
This markdown example output forces a specific language/locale presentation throughout the file, with all headings and example text written in Chinese. The policy allows language constraints only when the skill offers user choice or clearly documents and justifies the locale restriction, which is not present here.

Natural-Language Policy Violations

Medium
Confidence
92% confidence
Finding
The template content, headings, and instructions are entirely in Chinese, which implies the skill output is constrained to a specific language. The file does not offer user opt-in or alternatives, and no region-specific justification is documented, which matches the language/locale policy violation criteria.

Natural-Language Policy Violations

Medium
Confidence
98% confidence
Finding
This code generates multiple user-facing headings and guidance strings entirely in Chinese, such as report titles, summaries, and next-step instructions. The skill does not offer a language selection mechanism or document that it is intentionally restricted to Chinese, which is a natural-language locale policy concern.

Context-Inappropriate Capability

Medium
Confidence
88% confidence
Finding
directory_report walks arbitrary directories, counts file extensions, lists sampled files, and extracts Markdown headings. This is a broad repository summarization capability that is not an obvious requirement for checking cron or timer frequency, idempotency, retries, logging, or concurrency risks.

Context-Inappropriate Capability

Medium
Confidence
91% confidence
Finding
csv_report samples arbitrary CSV/TSV files and reports field completeness and uniqueness statistics. That capability is a general data-profiling function and does not directly support the manifest's stated role of reviewing cron/timer configuration risks.

Context-Inappropriate Capability

Medium
Confidence
93% confidence
Finding
The frontmatter parser and skill_audit routine inspect required files like SKILL.md, README.md, tests, and resource templates for another skill package. Auditing skill repository structure and metadata is not justified by a tool whose stated purpose is reviewing cron/timer operational safety characteristics.

Natural-Language Policy Violations

Low
Confidence
87% confidence
Finding
This markdown file’s natural-language instructions and labels are entirely in Chinese, and there is no indication that the user can choose another language or that the locale restriction is required for a region-specific purpose. Under the policy, forcing a specific language without user opt-in is a natural-language policy concern.

Natural-Language Policy Violations

Low
Confidence
81% confidence
Finding
The title, category label, and summary are written only in Chinese, with no indication that the skill is intended for a Chinese-speaking audience or that users can choose another language. This can violate the language/locale policy criterion when a specific language is imposed without opt-in or documented justification.

Missing User Warnings

Low
Confidence
82% confidence
Finding
This markdown file instructs the user to run a command that writes `out.md`, which affects local filesystem state. The document does not include any warning or note that the command will create or overwrite a file, even though markdown files are in scope for missing user warnings.

Static analysis

No suspicious patterns detected.