Back to skill

Security audit

Rose Docker Build

Security checks for vulnerabilities and agentic risk

Overview

This is a coherent ROSE Docker build guide, with expected but real supply-chain risks from unpinned remote sources and third-party downloads.

Install only if you are comfortable building ROSE from remote upstream sources in Docker. For higher assurance, pin the ROSE commit, pin Docker images by digest, verify Kitware and EDG artifacts, and run the build in a clean workspace with minimal credentials and only the needed bind mounts.

Vulnerability Patterns
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Findings (1)

T03 · Remote Payload Retrieval and Execution

Warning
Location
SKILL.md:21
Finding

Unpinned Remote Build Inputs and Broadly Trusted Repository Key

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 21–31, 50–52, and 134–136
Vulnerability Type: Unpinned remote code and insecure dependency trust configuration
Risk Level: Medium

Vulnerable Code

bash
# 1. Clone ROSE
git clone git@github.com:rose-compiler/rose.git
cd rose && git checkout weekly

# 2. Create Docker environment
mkdir ../rose-docker && cd ../rose-docker

# 3. Build and run container (see Dockerfile below)
docker build -t rose-dev .
docker run -d --name rose-dev -v $(pwd)/../rose:/rose/src rose-dev

# 4. Build ROSE inside container
docker exec rose-dev bash -c 'cd /rose/src && ./build'

The CMake workflow also checks out the moving branch:

bash
# 1. Clone ROSE
git clone git@github.com:rose-compiler/rose.git
cd rose && git checkout weekly

The documented Dockerfile installs a remotely retrieved signing key without fingerprint verification:

dockerfile
RUN wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | apt-key add - \
    && echo 'deb https://apt.kitware.com/ubuntu/ focal main' > /etc/apt/sources.list.d/kitware.list \
    && apt-get update && apt-get install -y cmake \
    && rm -rf /var/lib/apt/lists/*

Technical Analysis

The instructions check out the mutable weekly branch rather than a reviewed commit hash or verified signed tag. They subsequently run ./build and other build-system commands from that checkout. Consequently, the effective code executed by users can change after the Skill itself has been reviewed.

The Autotools workflow mounts the host ROSE source directory at /rose/src without the read-only option. Although the build runs as the unprivileged developer container user, writable bind-mount permissions can allow compromised build logic to alter files in the host source tree under the permissions represented insi ...[truncated 2393 chars]

Remediation
View remediation

Remediation Suggestions

  1. Pin the ROSE checkout to a reviewed, immutable commit hash instead of the moving weekly branch:

    bash
    git clone git@github.com:rose-compiler/rose.git
    cd rose
    git checkout --detach <reviewed-commit-sha>
    test "$(git rev-parse HEAD)" = "<reviewed-commit-sha>"
    
  2. Prefer a signed release tag and explicitly verify its signature against an independently validated maintainer key. A branch name alone must not be treated as an integrity guarantee.

  3. Replace apt-key with a repository-specific keyring and restrict the key using signed-by=. Verify the downloaded key's full fingerprint before enabling the repository:

    dockerfile
    RUN wget -O /tmp/kitware.asc https://apt.kitware.com/keys/kitware-archive-latest.asc \
        && gpg --show-keys --with-colons /tmp/kitware.asc \
        && test "<verified-full-fingerprint>" = "$(gpg --show-keys --with-colons /tmp/kitware.asc | awk -F: '/^fpr:/ {print $10; exit}')" \
        && gpg --dearmor -o /usr/share/keyrings/kitware-archive-keyring.gpg /tmp/kitware.asc \
        && echo 'deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ focal main' > /etc/apt/sources.list.d/kitware.list
    
  4. Pin the Docker base image by digest and pin critical dependency versions where reproducibility requirements permit. Preserve and review a dependency lock or image provenance record.

  5. Use a read-only source mount where the workflow does not require source-tree changes:

    bash
    docker run -d --name rose-dev -v "$(pwd)/../rose:/rose/src:ro" rose-dev
    

    If generated source files are required, mount a separate writable output directory rather than granting write access to the complete source checkout.

  6. Verify downloaded archives and binary dependencies with maintainer-provided cryptographic hashes or signatures before extractio ...[truncated 209 chars]

Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (15)

Rp1

Medium
Category
MCP Rug Pull
Confidence
75% confidence
Finding

Docker image references without a specific tag (:latest is implicit) or digest (@sha256:...) can be silently replaced by a malicious image.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
75% confidence
Finding

Docker image references without a specific tag (:latest is implicit) or digest (@sha256:...) can be silently replaced by a malicious image.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The Dockerfile adds the external Kitware APT repository and imports its signing key without any warning or trust guidance. Even though this occurs inside a container build, it introduces a third-party software supply chain dependency and normalizes use of deprecated apt-key, which can expose users to repository compromise or unexpected package provenance.

Content

No source excerpt is available for this finding.

Tool Parameter Abuse

Low
Category
Tool Misuse
Confidence
15% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

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

md
automake autoconf libtool flex bison \
    libboost-all-dev libxml2-dev \
    git wget curl vim \
    && rm -rf /var/lib/apt/lists/*

RUN useradd -m -s /bin/bash developer
RUN mkdir -p /rose/src /rose/build /rose/install && chown -R developer:developer /rose

Tool Parameter Abuse

Low
Category
Tool Misuse
Confidence
15% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

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

md
automake autoconf libtool flex bison \
    libboost-all-dev libxml2-dev \
    git wget curl vim \
    && rm -rf /var/lib/apt/lists/*

RUN useradd -m -s /bin/bash developer
RUN mkdir -p /rose/src /rose/build /rose/install && chown -R developer:developer /rose

Tool Parameter Abuse

Low
Category
Tool Misuse
Confidence
15% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

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

md
automake autoconf libtool flex bison \
    libboost-all-dev libxml2-dev \
    git wget curl vim \
    && rm -rf /var/lib/apt/lists/*

RUN useradd -m -s /bin/bash developer
RUN mkdir -p /rose/src /rose/build /rose/install && chown -R developer:developer /rose

Tool Parameter Abuse

Low
Category
Tool Misuse
Confidence
15% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

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

md
automake autoconf libtool flex bison \
    libboost-all-dev libxml2-dev \
    git wget curl vim \
    && rm -rf /var/lib/apt/lists/*

RUN useradd -m -s /bin/bash developer
RUN mkdir -p /rose/src /rose/build /rose/install && chown -R developer:developer /rose

Tool Parameter Abuse

Low
Category
Tool Misuse
Confidence
15% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

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

md
automake autoconf libtool flex bison \
    libboost-all-dev libxml2-dev \
    git wget curl vim \
    && rm -rf /var/lib/apt/lists/*

RUN useradd -m -s /bin/bash developer
RUN mkdir -p /rose/src /rose/build /rose/install && chown -R developer:developer /rose

Tool Parameter Abuse

Low
Category
Tool Misuse
Confidence
15% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

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

md
automake autoconf libtool flex bison \
    libboost-all-dev libxml2-dev \
    git wget curl vim \
    && rm -rf /var/lib/apt/lists/*

RUN useradd -m -s /bin/bash developer
RUN mkdir -p /rose/src /rose/build /rose/install && chown -R developer:developer /rose

Chaining Abuse

Low
Category
Tool Misuse
Confidence
15% confidence
Finding

Tool calls are chained to bypass individual safety checks or escalate capabilities beyond what any single tool call would allow.

Content

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

md
automake autoconf libtool flex bison \
    libboost-all-dev libxml2-dev \
    git wget curl vim \
    && rm -rf /var/lib/apt/lists/*

RUN useradd -m -s /bin/bash developer
RUN mkdir -p /rose/src /rose/build /rose/install && chown -R developer:developer /rose

Chaining Abuse

Low
Category
Tool Misuse
Confidence
15% confidence
Finding

Tool calls are chained to bypass individual safety checks or escalate capabilities beyond what any single tool call would allow.

Content

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

md
automake autoconf libtool flex bison \
    libboost-all-dev libxml2-dev \
    git wget curl vim \
    && rm -rf /var/lib/apt/lists/*

RUN useradd -m -s /bin/bash developer
RUN mkdir -p /rose/src /rose/build /rose/install && chown -R developer:developer /rose

Chaining Abuse

Low
Category
Tool Misuse
Confidence
15% confidence
Finding

Tool calls are chained to bypass individual safety checks or escalate capabilities beyond what any single tool call would allow.

Content

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

md
automake autoconf libtool flex bison \
    libboost-all-dev libxml2-dev \
    git wget curl vim \
    && rm -rf /var/lib/apt/lists/*

RUN useradd -m -s /bin/bash developer
RUN mkdir -p /rose/src /rose/build /rose/install && chown -R developer:developer /rose

Chaining Abuse

Low
Category
Tool Misuse
Confidence
15% confidence
Finding

Tool calls are chained to bypass individual safety checks or escalate capabilities beyond what any single tool call would allow.

Content

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

md
&& rm -rf /var/lib/apt/lists/*

RUN useradd -m -s /bin/bash developer
RUN mkdir -p /rose/src /rose/build /rose/install && chown -R developer:developer /rose
USER developer
WORKDIR /rose
CMD ["tail", "-f", "/dev/null"]

Chaining Abuse

Low
Category
Tool Misuse
Confidence
15% confidence
Finding

Tool calls are chained to bypass individual safety checks or escalate capabilities beyond what any single tool call would allow.

Content

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

md
&& rm -rf /var/lib/apt/lists/*

RUN useradd -m -s /bin/bash developer
RUN mkdir -p /rose/src /rose/build /rose/install && chown -R developer:developer /rose
USER developer
WORKDIR /rose
CMD ["tail", "-f", "/dev/null"]

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

The skill documents that EDG binaries may be downloaded at build time from edg-binaries.rosecompiler.org but does not warn users that an external binary retrieval may occur. This is a supply-chain risk because opaque prebuilt binaries may be fetched during the build process without integrity verification guidance or user awareness.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.