Back to skill

Security audit

beam

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly transparent about Beam transfers and Rooms, but its helper can start billable overwriting transfers or cancel them without an enforced confirmation gate.

Install only if you are comfortable letting the agent use Beam and storage credentials for remote data movement. Use least-privilege, bucket-scoped and revocable keys, review source, destination, overwrite risk, and estimated credits before every transfer, and monitor or revoke access from the Beam and storage consoles after use.

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/beam_transfer.py:386
Finding

Destructive and Billable Transfer Operations Lack Enforced User Confirmation

Content
View full analysis

Vulnerability Details

File Location: scripts/beam_transfer.py:386-390, 507-511, 565-592; related authorization requirements in SKILL.md:171-187, 205-210
Vulnerability Type: Unenforced authorization for destructive and billable operations
Risk Level: Medium

Vulnerable Code

python
prepared = await beam.transfers.create_transfer(
    sources=[spec.source_model],
    destinations=spec.destination_models,
    name=args.name,
)
python
async def cmd_cancel(args: argparse.Namespace) -> int:
    api_key = require_api_key()
    async with beam_client(api_key) as beam:
        result = await beam.transfers.cancel(args.transfer_id)
    emit("cancel", transfer_id=args.transfer_id, success=result.success, message=result.message)
    return EXIT_OK if result.success else EXIT_FAILED
python
run = commands.add_parser("run", help="Create a transfer and wait for it to finish")
endpoints(run)
run.add_argument("--name", help="Transfer name shown in the Console")
run.add_argument(
    "--timeout", type=positive_seconds, default=21600.0, help="Seconds to wait (default 21600)"
)
run.add_argument(
    "--progress-interval",
    type=positive_seconds,
    default=30.0,
    help="Seconds between progress events (default 30)",
)
run.add_argument("--hf-commit-message", help="Commit summary for hf:// destinations")
run.add_argument(
    "--hf-create-pr", action="store_true", help="Open hf:// uploads as a pull request"
)
run.add_argument(
    "--hf-allow-source-rehash",
    action="store_true",
    help="Let the SDK read the source once to hash it; required to upload a non-Hub source to hf://",
)
run.add_argument(
    "--dry-run",
    action="store_true",
    help="Validate URIs and credentials without contacting anything",
)

status = commands.add_parser("status", help="Read a transfer from the Beam API")
status.add_argument("transfer_id")

cancel = commands.add_parser("cancel", help="Cancel a transfer")
cancel.add_argument("transfer_id")

The ...[truncated 3435 chars]

Remediation
View remediation

Remediation Suggestions

  1. Require an explicit confirmation artifact for live transfers and cancellations rather than relying solely on documentation.
  2. Have estimate or --dry-run generate a short-lived, cryptographically random approval identifier bound to:
    • The exact source URI.
    • Every destination URI.
    • The transfer name and relevant options.
    • The estimated size and credit cost.
    • The intended operation and expiration time.
  3. Require run to receive that approval identifier and reject execution if any bound parameter has changed.
  4. Require cancel to use a separate confirmation artifact bound to the exact transfer ID.
  5. For interactive use, prompt for confirmation by default after displaying overwrite and cost information.
  6. Provide a non-interactive override only for trusted automation, with an explicit option such as --approved-non-interactive, and require the orchestrator to record the corresponding user approval.
  7. Prefer fail-closed behavior: if approval cannot be verified, do not create or cancel the transfer.
  8. Log approval metadata without recording API keys, storage credentials, invitation tokens, or other secrets.
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Rogue AgentSelf-Modification, Session Persistence
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (7)

Tp4

High
Category
MCP Tool Poisoning
Confidence
93% confidence
Finding

The declared description does not fully match the operational behavior described in the skill, including API-key inspection and transfer lifecycle management. This mismatch can mislead users and automated governance systems about what the skill can do, reducing oversight around credential handling and remote actions.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
92% confidence
Finding

The skill declares broad capabilities involving environment access and network operations but does not define an explicit tool scope such as allowed tools or permissions. In an agent setting, this increases the chance that a model can invoke more powerful tooling than reviewers or operators expect, especially because the skill handles secrets and remote transfers.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

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

md
license: MIT-0
homepage: https://docs.b1m.ai
required_environment_variables:
  - { name: BEAM_API_KEY, prompt: "Beam API key (b1m_…)", help: "Create one at https://console.b1m.ai. It spends organization credits.", required_for: every Beam command }
  - { name: AWS_ACCESS_KEY_ID, optional: true }
  - { name: AWS_SECRET_ACCESS_KEY, optional: true }
  - { name: AWS_SESSION_TOKEN, optional: true }

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
80% 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 · SKILL.md (reported line 135)May include surrounding context.

md
- **Studio**: otherwise. If Studio's MCP tools are available
  (`beam.list_credentials`, `beam.create_workflow` and the other `beam.*`
  tools), follow `references/studio.md`. If they are not, ask the user to connect
  Studio as that file explains, or to store the keys there. Never ask the user
  to paste a storage key into the conversation.
- One transfer uses one path: a Studio workflow cannot use this agent's keys, and
  the helper cannot use Studio's.

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · references/rooms.md (reported line 20)May include surrounding context.

md
- Use the room-first form, `beam room ROOM …`. Older spellings take arguments in
  inconsistent orders.
- Global flags are recognized anywhere in the arguments, even where a value was
  meant (`--literal -v` loses its value). Write values that start with `-` as
  `--flag=value`, or send payloads with `--stdin`.
- Some bad states still exit 0: `beam agent status` when stopped, `beam doctor`
  when unhealthy, and an empty `beam room list`. Read the JSON fields.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
80% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · references/rooms.md (reported line 104)May include surrounding context.

  1. The invitee joins (its own agent with this skill runs the same command):

    bash
    chmod 600 invitation.token
    beam room join ROOM --invitation-file invitation.token --json
    

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

The cancel command performs an irreversible operational action by cancelling a transfer, but this path emits only the result after the action has already occurred. There is no confirmation prompt, pre-action warning, or explicit user-facing disclosure at the point of execution to help prevent accidental cancellation.

Content

No source excerpt is available for this finding.