Back to skill

Security audit

mock

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent Mock/RPM build guide, but it recommends persistent passwordless privilege changes and insecure build settings without enough warning or scoping.

Review this skill carefully before installing. Use it only on a dedicated or disposable build machine, avoid the passwordless sudoers entry, limit mock group membership to trusted users, keep RPM signature verification enabled, and disable build networking unless you have a specific trusted need.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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
Findings (3)

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:306
Finding

Repository Package Signature Verification Is Disabled

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:334
Finding

Untrusted RPM Builds Are Granted Outbound Network and Host DNS Access

Content
View full analysis
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Error
Location
SKILL.md:60
Finding

Blanket Passwordless Sudo Access to Mock Breaks Least Privilege

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (7)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The installation section instructs users to modify group membership and optionally add a passwordless sudo rule for /usr/bin/mock without clearly warning about the privilege implications. Because Mock interacts with privileged build roots and can execute package build scripts, loosening sudo policy or granting broad access to the mock group can materially increase the chance of privilege abuse or unintended system impact.

Content

No source excerpt is available for this finding.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
90% confidence
Finding

The skill directs users to add themselves to the mock group, which is a privilege-bearing action in many environments because it enables use of a tool that manages privileged chroot operations. Without context or warning, this can expand who is able to run potentially sensitive build and filesystem operations on the host.

Content

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

md
# Add user to mock group
usermod -a -G mock $USER

# 配置 sudo (可选)
# Configure sudo (optional)
visudo
# 添加:youruser ALL=(ALL) NOPASSWD: /usr/bin/mock

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
95% confidence
Finding

The instruction to edit sudo policy via visudo is security-sensitive and can introduce privilege escalation if misconfigured, especially in combination with build tooling that processes untrusted package sources. In this context, users are encouraged toward policy modification without safeguards, review steps, or risk framing.

Content

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

usermod -a -G mock $USER

配置 sudo (可选)

Configure sudo (optional)

visudo

添加:youruser ALL=(ALL) NOPASSWD: /usr/bin/mock

text

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
98% confidence
Finding

The suggested sudoers entry youruser ALL=(ALL) NOPASSWD: /usr/bin/mock grants passwordless execution of Mock, which materially lowers the barrier to privileged operations. Because Mock builds and chroot actions can process attacker-controlled SRPM/spec content, this increases the risk that a compromised or careless user can trigger privileged effects on the host or abuse the delegated capability.

Content

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

配置 sudo (可选)

Configure sudo (optional)

visudo

添加:youruser ALL=(ALL) NOPASSWD: /usr/bin/mock

text

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The examples include destructive cleanup operations such as --scrub=all without an explicit warning that they delete chroot data and caches. In a build-environment skill, users may copy-paste commands directly, causing accidental loss of build artifacts, cached dependencies, or forensic state needed for troubleshooting.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The custom Mock configuration explicitly sets gpgcheck=0 and enables network-related options (rpmbuild_networking = True, use_host_resolv = True) while the skill markets itself as a secure, reproducible build environment. Disabling package signature verification allows untrusted or tampered dependencies to be pulled into the build root, and permitting network access during builds weakens isolation and reproducibility while expanding the attack surface for supply-chain abuse or data exfiltration from build scripts.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
76% confidence
Finding

The inline description says the chroot_scan plugin is for 'saving chroot state,' which mischaracterizes what the example is doing and may lead users to misunderstand the capability. This is a documentation-to-behavior mismatch in the example comments, not just missing detail.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.