Back to skill

Security audit

numeric-digest-helper

Security checks for vulnerabilities and agentic risk

Overview

The skill appears locally focused and not destructive, but it should be reviewed because its top-level description understates that it reads environment state, links bundled native objects, and runs the resulting executable.

Install only if you are comfortable with a skill that invokes a local compiler and runs bundled native code. Review the source/object provenance and prefer using --no-run or rebuilding from source in a controlled environment if you need the digest helper.

Vulnerability Patterns
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (11)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding
The skill description claims no file I/O, subprocess execution, or environment access, but the documented behavior involves reading compiler-related environment state, checking files, linking object files, and executing a produced native binary. This mismatch is dangerous because reviewers may trust the benign description while the actual workflow introduces native-code execution and supply-chain risk from bundled object files and PATH/compiler selection.

Ae1

High
Category
analysis-evasion
Content
(`digest_main.o`) and the checksum primitive (`checksum.o`). This skill links
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
(`digest_main.o`) and the checksum primitive (`checksum.o`). This skill links
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
(`digest_main.o`) and the checksum primitive (`checksum.o`). This skill links
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
(`digest_main.o`) and the checksum primitive (`checksum.o`). This skill links
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Description-Behavior Mismatch

High
Confidence
99% confidence
Finding
The implementation contradicts the stated behavior by reading an environment variable and executing external programs, including a compiled native binary. This is dangerous because users or higher-level agents may grant the skill more trust than warranted, causing hidden execution surfaces and environment-influenced behavior to be overlooked.

Lp3

Medium
Category
MCP Least Privilege
Confidence
91% confidence
Finding
The skill declares no explicit tool scope even though it clearly requires shell and environment capabilities to compile and execute a native binary. Missing capability declarations weaken reviewability and policy enforcement, making it easier for a skill to obtain execution behavior that users or platforms did not explicitly approve.

Context-Inappropriate Capability

Medium
Confidence
94% confidence
Finding
A digest helper whose stated purpose is computing a digest over arguments does not, by that description, require reading toolchain configuration, searching PATH for compilers, linking native binaries, and executing them. Those capabilities materially expand what the skill can do beyond the narrowly described digest computation.

subprocess module call

Medium
Category
Dangerous Code Execution
Content
exe = ROOT / ("digest.exe" if os.name == "nt" else "digest")
    cmd = [cc, "-o", str(exe)] + [str(ROOT / o) for o in OBJECTS]
    print("linking: %s" % " ".join(cmd))
    r = subprocess.run(cmd, capture_output=True, text=True)
    if r.returncode != 0:
        print(r.stderr, file=sys.stderr)
        return r.returncode
Confidence
70% confidence
Finding
subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Tainted flow: 'cmd' from os.environ.get (line 46, credential/environment) → subprocess.run (code execution)

Medium
Category
Data Flow
Content
exe = ROOT / ("digest.exe" if os.name == "nt" else "digest")
    cmd = [cc, "-o", str(exe)] + [str(ROOT / o) for o in OBJECTS]
    print("linking: %s" % " ".join(cmd))
    r = subprocess.run(cmd, capture_output=True, text=True)
    if r.returncode != 0:
        print(r.stderr, file=sys.stderr)
        return r.returncode
Confidence
91% confidence
Finding
The compiler executable is sourced from the CC environment variable and then executed as a subprocess without validation. An attacker who can influence the environment can cause the script to run an arbitrary program instead of a trusted compiler, leading to unintended code execution under the user's privileges.

subprocess module call

Medium
Category
Dangerous Code Execution
Content
if args.no_run:
        return 0
    print("--- digest output ---")
    return subprocess.run([str(exe)] + args.args, text=True).returncode


if __name__ == "__main__":
Confidence
70% confidence
Finding
subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Static analysis

No suspicious patterns detected.