Back to skill

Security audit

skill-auditor-plus

Security checks for vulnerabilities and agentic risk

Overview

This is a coherent skill-auditing tool, but it can expose sensitive local data in audit output if run on untrusted skill directories.

Review before installing. Only run this auditor on skill directories you trust or have isolated, avoid running it against attacker-supplied directories with symlinks, and treat audit output as sensitive because it may contain full secret values. Do not rely on this tool as a complete security review; it is a lightweight pattern scanner.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
Findings (2)

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
scripts/security_audit.py:85
Finding

Sensitive Data Disclosure Through Symlink Traversal and Unredacted Audit Output

Content
View full analysis

Vulnerability Details

File Location: scripts/security_audit.py:85, scripts/security_audit.py:102-109, scripts/security_audit.py:148-154, and scripts/security_audit.py:201
Vulnerability Type: Unrestricted symlink traversal and plaintext disclosure of detected credentials
Risk Level: Medium

Vulnerable Code

python
content = file_path.read_text(encoding='utf-8', errors='ignore')
lines = content.split('\n')

for category, patterns in self.DANGEROUS_PATTERNS.items():
    for pattern in patterns:
        for match in re.finditer(pattern, content, re.IGNORECASE):
            # Find the line number containing the match
            line_num = content[:match.start()].count('\n') + 1
            line_text = lines[line_num - 1].strip()

            issues.append({
                'category': category,
                'severity': self._get_severity(category),
                'file': str(file_path.relative_to(self.skill_path)),
                'line': line_num,
                'pattern': pattern,
                'matched_text': match.group(),
                'context': line_text,
            })
python
scripts_dir = self.skill_path / 'scripts'
if scripts_dir.exists():
    for script_file in scripts_dir.glob('*.py'):
        all_issues.extend(self.audit_file(script_file))
    for script_file in scripts_dir.glob('*.sh'):
        all_issues.extend(self.audit_file(script_file))
python
print(json.dumps(result, indent=2, ensure_ascii=False))

Technical Analysis

The audit target is potentially attacker-controlled. Candidate files are opened without resolving their canonical paths, checking whether they remain beneath the audited directory, or rejecting symbolic links. A symbolic link placed in a scanned directory can therefore direct the auditor to another file readable by the account running the audit.

When a credential pattern matches, both `match.group ...[truncated 2001 chars]

Remediation
View remediation

Remediation Suggestions

  1. Resolve the audit root once with root = self.skill_path.resolve().
  2. Resolve every candidate file before reading it and verify that it remains beneath the resolved root using candidate.relative_to(root).
  3. Reject symbolic links explicitly with candidate.is_symlink() when links are unnecessary.
  4. Open files in a manner resistant to time-of-check/time-of-use symlink replacement where the platform permits it, such as using os.open() with O_NOFOLLOW.
  5. Apply a conservative file-size limit before reading to reduce exposure and resource-exhaustion risks.
  6. Redact credential findings before output. For example, retain only a short prefix and suffix or replace the value entirely with [REDACTED].
  7. Do not include complete source lines for credential findings. Return a line number, category, pattern identifier, and sanitized preview instead.
  8. Document that audit reports may contain sensitive findings and ensure CI logs and generated reports use restricted access and appropriate retention controls.
  9. Add tests covering symlinks that point outside the audit root and tests confirming that credential values never appear verbatim in output.

T08 · Insecure Dependencies

Note
Location
SKILL.md:218
Finding

Unnecessary and Unpinned Third-Party Dependency Installation

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:218-222
Vulnerability Type: Unnecessary unpinned dependency installation
Risk Level: Low

Vulnerable Code

bash
pip install pyyaml  # if needed

Technical Analysis

The troubleshooting documentation instructs users to install PyYAML without specifying a version, integrity hash, trusted index, or isolated environment. Neither scripts/security_audit.py nor scripts/performance_audit.py imports or otherwise requires PyYAML, so this installation is unnecessary for the declared functionality.

Installing an unpinned package expands the Skill's supply-chain exposure. Package behavior can change between installations, and dependency resolution may introduce additional components that were not reviewed with the Skill. Although pyyaml is the normal package name and no malicious package is embedded in this project, the instruction still violates minimum-dependency and reproducibility principles.

Attack Path

  1. A user encounters a module-related problem or follows the troubleshooting guidance preemptively.
  2. The user runs pip install pyyaml.
  3. pip retrieves the package from its configured package index and selects the currently resolvable release rather than a reviewed, fixed artifact.
  4. Package installation code and installed components execute or become available with the permissions of the user's Python environment.
  5. If the selected index, package artifact, account, or dependency chain is compromised, attacker-controlled code could be introduced into that environment.

Impact Assessment

No direct compromise is present in the repository, and exploitation requires compromise or manipulation of the external package supply chain or package-index configuration. If that occurs, code could execute with the permissions used for installation and affect the associated Python environment.

The instruction is especially unnecessary because the ...[truncated 149 chars]

Remediation
View remediation

Remediation Suggestions

Remove the PyYAML installation instruction because the current implementation does not use that package.

If a future implementation introduces a genuine PyYAML requirement:

  1. Declare it in a reviewed dependency manifest rather than an informal troubleshooting command.
  2. Pin an approved version and use integrity hashes.
  3. Install from an explicitly trusted package index.
  4. Use an isolated virtual environment with minimum privileges.
  5. Review and update the pinned dependency through a controlled maintenance process.
  6. Add automated dependency and vulnerability scanning to CI.
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 (8)

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The skill claims comprehensive security, performance, and quality auditing, including credential leak and dangerous-operation detection, but the described/observed behavior does not support those assurances. This creates a false sense of safety: users may rely on the skill to approve risky skills or miss serious issues because they believe a security review already occurred.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill description and usage guidance are written entirely in Chinese across the main instructional sections, with no indication that alternative languages are available. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation unless the locale constraint is documented and justified, which it is not here.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
90% confidence
Finding

The skill advertises use of scripts and shell-based audit workflows but does not declare any explicit tool scope such as permissions or allowed-tools. That omission can cause the agent to invoke file reads or shell access more broadly than users expect, reducing transparency and increasing the chance of unintended command execution during use.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The invocation language is very broad and could cause the skill to be selected for many generic review, optimization, or development tasks beyond its real competence. Overbroad auto-invocation increases the likelihood of inappropriate use, unnecessary tool access, and misplaced trust in its conclusions.

Content

No source excerpt is available for this finding.

Unrestricted Tool Access

Medium
Category
Excessive Agency
Confidence
80% confidence
Finding

Skill grants unrestricted tool access without appropriate constraints. An agent with unfettered tool access can perform arbitrary actions including file modification, network requests, and code execution.

Content

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

md
## Why Skill Auditing Matters

- **Security**: Skills run with Codex's permissions - a vulnerable skill can delete files, leak credentials, or execute arbitrary commands
- **Performance**: Large skills consume context window, reducing Codex's effectiveness for the actual task
- **Quality**: Well-structured skills are easier to maintain, more reliable, and provide better user experience

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

This best-practices guide is written entirely in Chinese and does not indicate that language selection is optional or limited to a justified region-specific context. Under the language/locale policy rule, forcing a specific language without user opt-in is a natural-language policy concern.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

This Python file contains user-facing natural-language descriptions entirely in Chinese, including the module description and class docstring, without offering an alternate language or indicating that the skill is intentionally region-specific. That can violate language/locale policy because it imposes a specific language on users without opt-in.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

This Python file contains natural-language documentation strings in Chinese, including the module description and class docstring, with no indication that language choice is configurable or optional. Under the language/locale policy rule, hardcoding a single language without user opt-in can be a policy violation even when it appears only in comments or docstrings.

Content

No source excerpt is available for this finding.