Back to skill

Security audit

GitLab Agent

Security checks for vulnerabilities and agentic risk

Overview

ClawScan rates this GitLab work-management skill suspicious with medium confidence, citing automatic changes outside its stated scope and gaps in project-access safeguards.

Consider the reported scope and access-control issues before installing, especially the possibility of GitLab changes after access verification fails and automatic handling of unassigned work. Skillspector coverage was partial: 22 of 23 components were scanned, and its tool-misuse analysis was degraded, so the evidence is incomplete.

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

T05 · Unauthorized Access and Privilege Escalation

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

Short-name group matching expands the trusted collaborator allowlist

Content
View full analysis

Impact

An otherwise unaccepted issue author can cause the agent to claim and process their work, including the GitLab changes supported by the Skill workflow, within projects the agent is authorized to access.

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
94% confidence
Finding

The code expands the agent's workload through GitLab PUT requests that assign previously unassigned items. Incident adoption runs automatically during discovery, while collaborator assignment is configuration-dependent. These are substantive workload-acquisition capabilities not disclosed by the description's assigned-work scope. Owner-access checks and state rechecks constrain these mutations but do not make them mere listing implementation details. The supplied chunk lists merge requests but does not demonstrate MR delivery; that omission alone is not treated as a mismatch.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
90% confidence
Finding

Automatic discovery is disclosed, but the workflow explicitly allows the discovery helper to manage a forbidden label on projects that fail owner-membership verification. This creates an exception to the advertised access boundary: denied projects can still receive externally visible mutations.

Content

No source excerpt is available for this finding.

Uses isolation and presumed owner consent to justify automatic execution of irreversible external actions.

High
Category
Prompt Injection
Confidence
98% confidence
Finding

The skill uses local isolation and presumed historical consent to declare all writes low risk and authorize irreversible external actions automatically. Local isolation does not contain effects on GitLab, and developer permissions can still permit consequential pushes, disclosures, and workflow changes.

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 127)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`.

The skill modifies GitLab items even when owner-verified project access is denied.

High
Category
Excessive Agency
Confidence
99% confidence
Finding

adopt_incident calls synchronize_forbidden with the failed authorization result before returning for denied access. Because that helper performs a PUT, denial still permits externally visible writes and removal of existing workflow labels, violating the owner-verification boundary.

Content

No source excerpt is available for this finding.

The denied-membership regression test requires a remote issue mutation despite the manifest's owner-verified project-access guarantee.

High
Category
Excessive Agency
Confidence
95% confidence
Finding

The regression test explicitly requires adding a forbidden label and removing a workflow label after owner-created membership verification fails, contradicting the stated owner-verified project-access boundary. Although this test mocks subprocess execution and does not itself mutate GitLab, the behavior it enforces would let discovery modify issues outside the agent's verified project scope using its broader token permissions.

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
89% confidence
Finding

Autonomy is appropriate for assigned GitLab work, but this instruction authorizes action whenever the agent thinks work is needed rather than requiring task-scoped authority. Combined with the blanket no-approval policy, it can turn incidental findings or untrusted repository content into unauthorized external changes.

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 forked repositories exceeds the manifest's assigned-work scope.

Medium
Category
Excessive Agency
Confidence
94% confidence
Finding

Daily maintenance applies to all forked repositories without requiring an assigned item or repeating the project-access gate. Updating default branches and autonomously resolving conflicts can alter unrelated repositories and import upstream changes outside the authorized task.

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 224)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 unfixed-CVE workflow instructs the agent to suppress a vulnerability without warning about the resulting security blind spot.

Medium
Category
Output Handling
Confidence
96% confidence
Finding

The unfixed-CVE workflow directs the agent to create a suppression simply because no fix exists, without requiring exploitability analysis, compensating controls, expiry, or explicit risk acceptance. Although an MR and tracking item provide visibility, this policy can remove security signals while the underlying exposure remains.

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 problem is not subprocess execution itself: synchronize_forbidden sends a label-changing PUT even when its caller has determined allowed=False. It adds workflow::forbidden and removes other workflow labels on an unauthorized project, potentially destroying a maintainer hold or misrepresenting workflow state.

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.