T09 · Insecure Skill Coding Practices
- Location
SKILL.md:306- Finding
Repository Package Signature Verification Is Disabled
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
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.
SKILL.md:306Repository Package Signature Verification Is Disabled
SKILL.md:334Untrusted RPM Builds Are Granted Outbound Network and Host DNS Access
SKILL.md:60Blanket Passwordless Sudo Access to Mock Breaks Least Privilege
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.
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.
# Add user to mock group
usermod -a -G mock $USER
# 配置 sudo (可选)
# Configure sudo (optional)
visudo
# 添加:youruser ALL=(ALL) NOPASSWD: /usr/bin/mock
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.
usermod -a -G mock $USER
visudo
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.
visudo
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.
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.
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.
No suspicious patterns detected.