Back to skill

Security audit

GitLab Agent

Security checks for vulnerabilities and agentic risk

Overview

ClawScan rates this skill suspicious because scanners report overly broad GitLab actions, changes even after project access is denied, and instructions that allow work without user approval.

Consider the suspicious verdict and the confirmed reports of unauthorized GitLab mutations and broader-than-stated actions before installing. The scan was partial: 22 of 23 components were fully inspected, and static analysis of one expression was limited, so the evidence is incomplete.

Vulnerability Patterns
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/list-active-items.py
Finding

Ambiguous collaborator selectors authorize members of attacker-controlled groups

Content
View full analysis

Impact

An otherwise unauthorized submitter can cause the agent to claim and process their work requests using its GitLab authority within authorized projects. This establishes unauthorized queue admission; it does not establish arbitrary code execution or access to other projects.

Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Output HandlingUnvalidated Output Injection, Cross-Context Output, Unbounded Output
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
Findings (32)

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

Automatic discovery and claiming are disclosed in the skill body, so those behaviors are not inherently concealed or unauthorized. However, the policy explicitly permits the discovery helper to manage labels on owner-denied projects, allowing external mutations outside the advertised owner-verified scope.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
88% confidence
Finding

Incident adoption is consistent with the body's broader discovery instructions, although the short description understates that scope. The security-relevant problem is permitting workflow-label changes when owner verification fails, rather than making that failure a strict no-write boundary.

Content

No source excerpt is available for this finding.

Uses an isolation pretext and claimed blanket owner consent to authorize irreversible external actions without confirmation.

High
Category
Prompt Injection
Confidence
98% confidence
Finding

Local isolation does not make remote GitLab writes reversible or harmless. The blanket claim of prior owner consent can cause the agent to perform consequential external actions without checking whether the actual user authorized their scope.

Content

No source excerpt is available for this finding.

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
70% 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 128)May include surrounding context.

md
* If you see an additional commit by a team member, do not simply revert. Analyse the changes and think about if you need to do something in addition.
* On each commit
  * Add `Generated-By: <current model>` to the commit message.
  * Push with `git push origin <branch> -o ci.skip`
  * Start the pipeline via `glab ci run --mr`, unless there are active pipelines in main or dev. Never use more than X `[setting: 2 # AGENTS.md -> active-pipelines]` pipelines for your work. Keep `workflow::in-progress` when capacity delays a pipeline start; revisit capacity and work another actionable item meanwhile.
* After merge or close, update the items and labels to reflect the final state `workflow::done`.

Owner-denied projects are still modified during access filtering.

High
Category
Excessive Agency
Confidence
99% confidence
Finding

permitted_items invokes label synchronization even when access[project_path] is false. That path can remove existing workflow labels, including maintainer holds, and add a forbidden label despite failed owner authorization; adopt_incident has the same boundary issue.

Content

No source excerpt is available for this finding.

Env Variable Harvesting

High
Category
Data Exfiltration
Confidence
60% confidence
Finding

Code enumerates, copies, or searches environment variables for secrets. Bulk environment access can collect credentials unrelated to the skill's stated purpose.

Content

Scanner excerpt · scripts/test_work_queue_problems.py (reported line 117)May include surrounding context.

python
(root / 'glab').write_text('#!/bin/sh\nprintf "private-token HTTP 403\\n" >&2\nexit 1\n')
            (root / 'glab').chmod(0o755)
            (root / 'config.json').write_text(json.dumps({'skills': {'entries': {'gitlab-agent': {'config': {'owner': 'owner'}}}}}))
            env = {**os.environ, 'PATH': directory + os.pathsep + os.environ['PATH'], 'OPENCLAW_CONFIG_PATH': str(root / 'config.json')}
            for name in ['list-active-items.py', 'work-queue-problems.py']:
                result = subprocess.run(['python3', str(DIRECTORY / name)], env=env, capture_output=True, text=True)
                value = json.loads(result.stdout)

Skill declares no tool scope ('permissions' or 'allowed-tools') but code capabilities were detected: env, file_read, file_write, network, shell.

Medium
Category
MCP Least Privilege
Confidence
70% confidence
Finding

Without declared permissions the skill's intent is opaque and cannot be validated.

Content

No source excerpt is available for this finding.

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
90% confidence
Finding

Autonomous execution is appropriate for assigned GitLab tasks, but this instruction authorizes work solely because the agent thinks it is needed. Combined with blanket no-approval language and broad write capabilities, it can expand operations beyond the user's authorized task.

Content

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

md
* All writable actions in GitLab should be done with the `glab` CLI. This includes creating and updating issues, merge requests, branches, comments, and more.
* Complete tasks successfully in GitLab.
* If you think work needs to be done, do it without asking.
* Repeat and fulfill your [GitLab Agent Tasks](#gitlab-agent-tasks).

## Behavior

Unconditional maintenance of all forks exceeds the manifest's assigned-work and owner-verified project scope (L003).

Medium
Category
Excessive Agency
Confidence
94% confidence
Finding

The daily instruction covers all forks without tying maintenance to assigned work or requiring the project-access gate. Updating default branches and resolving conflicts can alter unrelated repositories and introduce unintended changes.

Content

No source excerpt is available for this finding.

Whitespace Padding

Medium
Category
Prompt Injection
Confidence
70% confidence
Finding

Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.

Content

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

md
-- | ------------------------------------------------------------------------------------------------------------ |
| `workflow::backlog`     | Backlog     | Not yet started. Initial state.                                                                              |
| `workflow::forbidden`   | Forbidden   | Project access failed the owner membership security gate; only the discovery helper manages this label.          |
| `workflow::in-progress` | Running     | Work you are actively working on                                                                                           |
| `workflow::paused` | Maintainer hold | Only a maintainer can pause work. The agent must not set it. Resume after maintainer unpause or housekeeping expiry to stale after 14 inactive days. |
| `workflow::need-human`  | Need Human  | Requires human intervention to fullfill current task and all other options are exhausted. Before adding the label, explain reason by comment in the issue. Its status is not

The workflow instructs the agent to suppress an unfixed CVE without warning about the resulting security exposure.

Medium
Category
Output Handling
Confidence
97% confidence
Finding

The workflow mandates ignoring unfixed CVEs without requiring an exploitability assessment, compensating controls, approval, or an expiration. Although a tracking item preserves some visibility, suppressing the finding can let vulnerable software pass security gates indefinitely.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/list-active-items.py (reported line 114)May include surrounding context.

python
def api_read(command, **kwargs):
    """Retry one timed-out API read, never a mutation or invalid response."""
    try:
        return subprocess.run(command, timeout=25, **kwargs)
    except subprocess.TimeoutExpired:
        import time

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/list-active-items.py (reported line 120)May include surrounding context.

python
record_problem("read-retried")
        time.sleep(1)
    return subprocess.run(command, timeout=25, **kwargs)


def api_json(endpoint: str) -> object:

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
98% confidence
Finding

The argument-list subprocess usage is not command injection, but this PUT is reachable with allowed=False after owner verification fails. It then adds workflow::forbidden and removes other workflow labels, modifying projects the helper has determined are unauthorized.

Content

Scanner excerpt · scripts/list-active-items.py (reported line 267)May include surrounding context.

python
command.extend(("-f", "add_labels=" + ",".join(additions)))
        if removals:
            command.extend(("-f", "remove_labels=" + ",".join(removals)))
        subprocess.run(command, check=True, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
    return sorted((current | set(additions)) - set(removals))

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/list-active-items.py (reported line 542)May include surrounding context.

python
continue
                command = ["glab", "api", "-X", "PUT", "-f", f"assignee_ids={user_id}", endpoint]
                try:
                    write = subprocess.run(command, check=True, text=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
                    result = json.loads(write.stdout)
                except (OSError, subprocess.SubprocessError, json.JSONDecodeError):
                    result = None

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/list-active-items.py (reported line 674)May include surrounding context.

python
if removals:
        command += ["-f", "remove_labels=" + ",".join(sorted(removals))]
    command.append(endpoint)
    result = subprocess.run(command, check=True, text=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
    adopted = json.loads(result.stdout)
    if not isinstance(adopted, dict) or username not in [
        assignee.get("username") for assignee in adopted.get("assignees", [])

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/list-directly-addressed-todos.py (reported line 21)May include surrounding context.

python
def api_json(endpoint: str) -> object:
    result = subprocess.run(
        ["glab", "api", endpoint], check=True, text=True, stdout=subprocess.PIPE
    )
    return json.loads(result.stdout)

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

Medium
Category
Data Flow
Confidence
65% confidence
Finding

Data from a source is assigned to a variable that is later passed to a sink, creating a variable-mediated taint flow.

Content

Scanner excerpt · scripts/list-directly-addressed-todos.py (reported line 21)May include surrounding context.

python
def api_json(endpoint: str) -> object:
    result = subprocess.run(
        ["glab", "api", endpoint], check=True, text=True, stdout=subprocess.PIPE
    )
    return json.loads(result.stdout)

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/select-reviewer.py (reported line 28)May include surrounding context.

python
def api_text(endpoint: str) -> str:
    result = subprocess.run(
        ["glab", "api", endpoint],
        check=True,
        text=True,

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

Medium
Category
Data Flow
Confidence
65% confidence
Finding

Data from a source is assigned to a variable that is later passed to a sink, creating a variable-mediated taint flow.

Content

Scanner excerpt · scripts/select-reviewer.py (reported line 28)May include surrounding context.

python
def api_text(endpoint: str) -> str:
    result = subprocess.run(
        ["glab", "api", endpoint],
        check=True,
        text=True,

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
75% confidence
Finding

Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Content

Scanner excerpt · scripts/select-reviewer.py (reported line 270)May include surrounding context.

python
def optional_approval(endpoint: str) -> bool:
    """Require both MR approval APIs to prove that no approval rule is required."""
    try:
        approvals = json.loads(api_text(f"{endpoint}/approvals"))
        state = json.loads(api_text(f"{endpoint}/approval_state"))

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/select-reviewer.py (reported line 680)May include surrounding context.

python
}
    )
    try:
        subprocess.run(
            [
                "glab",
                "api",

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

Medium
Category
Data Flow
Confidence
65% confidence
Finding

Data from a source is assigned to a variable that is later passed to a sink, creating a variable-mediated taint flow.

Content

Scanner excerpt · scripts/select-reviewer.py (reported line 680)May include surrounding context.

python
}
    )
    try:
        subprocess.run(
            [
                "glab",
                "api",

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
75% confidence
Finding

Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Content

Scanner excerpt · scripts/select-reviewer.py (reported line 710)May include surrounding context.

python
for item in persisted)
    ):
        fail("GitLab did not confirm the selected reviewer and preserved reviewers; "
             "inspect reviewer limits or permissions; no approval or merge attempted")
    expected_signature = mr_signature(fresh_mr)
    actual_signature = mr_signature(receipt)
    # Extra reviewers may have been added concurrently; never remove them.

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
75% confidence
Finding

Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Content

Scanner excerpt · scripts/select-reviewer.py (reported line 722)May include surrounding context.

python
actual_signature[key] = receipt.get(key)
    if actual_signature != expected_signature:
        fail("merge request changed after reviewer assignment; "
             "no approval or merge attempted")
    result["applied"] = True
    if self_review:
        try: