Back to skill

Security audit

FlowForge

Security checks for vulnerabilities and agentic risk

Overview

This workflow skill has a coherent purpose, but it should be reviewed because it can run auto-discovered workflow instructions and expand its own activation scope without enough user approval controls.

Install only if you trust the FlowForge CLI package and the workflow YAML files it will load. Before use, review workflows in ./workflows and ~/.flowforge/workflows, avoid broad trigger additions, do not let workflow text override normal safety or approval requirements, and be careful with persistent logs, shell-profile changes, resets, pushes, deploys, or PR actions.

Vulnerability Patterns
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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 (2)

T01 · Skill Instruction Hijacking

Error
Location
SKILL.md:76
Finding
Automatically Discovered Workflow Tasks Are Executed as Trusted Agent Instructions## Vulnerability Details **File Location**: `SKILL.md:76`, with automatic workflow discovery configured at `SKILL.md:182-184` **Vulnerability Type**: Untrusted instruction execution **Risk Level**: High **Vulnerable code snippets**: ```markdown **Execute the task as described.** The task field tells you exactly what to do. ``` ```markdown FlowForge auto-loads YAML files from: - `./workflows/` in current directory - `~/.flowforge/workflows/` in home directory ``` ### Technical Analysis The skill directs the agent to execute natural-language instructions returned from workflow YAML files. These files are automatically discovered from the current directory and the user's home directory, but the skill does not require validation of their provenance, a security review of their task fields, capability restrictions, or user confirmation before execution. The current-directory discovery path is particularly sensitive because a cloned or otherwise untrusted repository can supply `./workflows/*.yaml`. A malicious workflow can place arbitrary instructions in a node's `task` field. After the workflow is selected and started, `flowforge status` presents that attacker-controlled text to the agent, and the skill explicitly tells the agent to execute it. Flow sequencing does not provide a security boundary: it controls node order but does not constrain what a node may request. The effective privileges of the malicious instruction therefore depend on the tools and permissions available to the agent. ### Attack Path 1. An attacker adds a crafted YAML workflow to `./workflows/` in a repository or workspace that the victim opens. 2. FlowForge automatically discovers the workflow. 3. The workflow is selected through `flowforge list`, a matching name, or misleading intent metadata. 4. The agent runs `flowforge start <workflow-name>` and then `flowforge status`. 5. FlowForge returns the attacker-controlled `task` text for the ...[truncated 1012 chars]
Remediation
## Remediation Suggestions 1. Treat all workflow names, metadata, branch conditions, and task fields as untrusted input rather than authoritative agent instructions. 2. Before starting a workflow, resolve and display its exact source path and require explicit user approval for workflows originating from the current repository. 3. Present the complete workflow and an action summary before execution, including commands, file paths, network destinations, and source-control operations it may request. 4. Require separate confirmation before sensitive actions such as reading credentials, accessing files outside the workspace, running shell commands, modifying agent configuration, pushing code, or sending data over the network. 5. Prefer an explicit allowlist of trusted workflow directories and signed or integrity-verified workflow definitions. Disable automatic discovery from untrusted repositories by default. 6. Apply capability restrictions so workflow tasks can only invoke operations necessary for the declared workflow purpose. 7. Add an instruction-precedence rule stating that workflow text cannot override system policies, user intent, security controls, or authorization requirements. 8. Reject or pause workflows containing requests for secrets, persistence, security-control bypasses, destructive commands, unrelated modifications, or external data transmission.

T08 · Insecure Dependencies

Warning
Location
setup.md:22
Finding
Unpinned Third-Party CLI Is Installed Globally## Vulnerability Details **File Location**: `setup.md:22` **Additional occurrences**: `setup.md:193`, `setup.md:210` **Vulnerability Type**: Unsafe third-party dependency installation **Risk Level**: Medium **Vulnerable code snippet**: ```bash npm install -g @kagura-agent/flowforge ``` ### Technical Analysis The setup guide installs `@kagura-agent/flowforge` from the npm registry without pinning an exact version or verifying package integrity or provenance. Consequently, the command resolves to whichever release is current at installation time rather than a version reviewed together with this skill. npm packages may execute lifecycle scripts during installation. Because the installation is global, any such scripts execute with the installing user's privileges, and the resulting executable becomes available as a globally trusted command. A compromised publisher account, registry compromise, or malicious future release could therefore convert the documented setup command into a code-execution channel. The audited project does not contain evidence that the named package is currently malicious. The finding concerns the mutable and unverified dependency installation process. ### Attack Path 1. An attacker compromises the upstream package publisher, package distribution channel, or a future package release. 2. The attacker publishes a malicious version under the same npm package name. 3. A user follows the setup guide and runs the unpinned global installation command. 4. npm resolves and downloads the attacker-controlled current version. 5. Malicious lifecycle code, if present, executes during installation with the user's privileges. 6. The installed global `flowforge` executable may subsequently run attacker logic whenever the agent invokes the documented workflow commands. ### Impact Assessment Exploitation can provide arbitrary code execution with the privileges of the user performing the installation. This may ...[truncated 472 chars]
Remediation
## Remediation Suggestions 1. Pin the dependency to an exact reviewed version, for example `@kagura-agent/flowforge@X.Y.Z`, rather than implicitly installing the latest release. 2. Publish and verify the expected npm integrity digest and package provenance before installation. 3. Document the authoritative source repository, npm publisher identity, and release-signing or provenance-verification procedure. 4. Prefer a project-local dependency recorded in a lockfile over a global installation, then invoke it through a controlled project script or `npx --no-install`. 5. Review npm lifecycle scripts before installation. Use `--ignore-scripts` when lifecycle execution is unnecessary. 6. Never recommend installation under `sudo`; configure an unprivileged local npm prefix instead. 7. Establish a dependency update process in which new versions are reviewed and tested before changing the documented pin. 8. Verify that the resolved CLI binary and package contents match the approved release before allowing the agent to execute them.
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • YARA SignaturesMalware Match, Webshell Match, Cryptominer Match
Findings (15)

YARA rule 'backdoor_persistence': Backdoor persistence with malicious payloads (shell commands, SSH key injection, hidden root users) [malware]

High
Category
YARA Match
Content
ou'll know exactly which workflow to start.

## Troubleshooting

### Command not found: flowforge

FlowForge CLI is not installed or not in PATH. Run:

```bash
npm install -g @kagura-agent/flowforge
```

### Permission denied

You may need to use `sudo` (not recommended) or configure npm to install global packages without sudo:

```bash
mkdir -p ~/.npm-global
npm config set prefix '~/.npm-global'
echo 'export PATH=~/.npm-global/bin:$PATH' >> ~/.bashrc
source ~/.bashrc
```

Then retry:

```bash
npm install -g @kagura-agent/flowforge
```

### Workflow not found after define

Make sure you used the correct YAML path:

```bash
flowforge define workflows/your-workflow.yaml
```

Check registered workflows:

```bash
flowforge list
```

### Database location

FlowForge stores state in `~/.flowforge/flowforge.db`. To reset everything:

```bash
rm -rf ~/.flowforge
```

## Next Steps

- Read [SKILL.md](SKILL.md) to understand how agents use FlowForge
- Read [references/yaml-format.md](references/
Confidence
75% confidence
Finding
YARA rule matched a known malware signature (reverse shell, backdoor, ransomware, C2 framework, or info stealer).

Tool Parameter Abuse

High
Category
Tool Misuse
Content
FlowForge stores state in `~/.flowforge/flowforge.db`. To reset everything:

```bash
rm -rf ~/.flowforge
```

## Next Steps
Confidence
90% 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).

Tool Parameter Abuse

High
Category
Tool Misuse
Content
FlowForge stores state in `~/.flowforge/flowforge.db`. To reset everything:

```bash
rm -rf ~/.flowforge
```

## Next Steps
Confidence
90% 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).

Vague Triggers

Medium
Confidence
96% confidence
Finding
The trigger phrase "step by step" is extremely broad and commonly appears in benign user requests unrelated to FlowForge. This can cause unintended activation of the skill, exposing users to workflow side effects such as persistence, command execution, or state resumption when they only wanted structured reasoning.

Context-Inappropriate Capability

Medium
Confidence
93% confidence
Finding
The skill explicitly instructs the agent to modify its own trigger table and frontmatter description based on prior executions. This is risky because it creates self-modifying behavior that can broaden activation scope over time without review, enabling prompt-surface expansion and accidental invocation in unrelated contexts.

Vague Triggers

Medium
Confidence
94% confidence
Finding
The instructions encourage continuously adding new trigger phrases after successful matches, with no constraints or approval process. This creates uncontrolled expansion of the skill's invocation surface and makes accidental or adversarial trigger poisoning more likely over time.

Session Persistence

Medium
Category
Rogue Agent
Content
flowforge list
```

If no workflow matches user's intent, help them create one (see [yaml-format.md](references/yaml-format.md)).

### 2. Start or Resume
Confidence
82% confidence
Finding
The skill is designed around resuming active workflow instances and preserving state across sessions. Persistent state is not inherently malicious, but in this context it increases risk because stale or attacker-influenced workflow state can be resumed later and drive future actions without fresh user confirmation.

Vague Triggers

Medium
Confidence
90% confidence
Finding
The description 'Generic open source contribution workflow' is broad and does not specify clear trigger phrases, scope limits, or exclusion conditions. In a manifest file, this can cause the skill to match many ordinary coding-assistance situations rather than a narrowly defined contribution workflow.

Vague Triggers

Medium
Confidence
88% confidence
Finding
The manifest describes the skill only as a 'Research and learning workflow,' which is generic and could overlap with many ordinary user requests related to learning, reading, or gathering information. It does not provide specific trigger phrases, scope boundaries, or exclusion conditions to clarify when this skill should or should not be invoked.

Session Persistence

Medium
Category
Rogue Agent
Content
You may need to use `sudo` (not recommended) or configure npm to install global packages without sudo:

```bash
mkdir -p ~/.npm-global
npm config set prefix '~/.npm-global'
echo 'export PATH=~/.npm-global/bin:$PATH' >> ~/.bashrc
source ~/.bashrc
Confidence
72% confidence
Finding
The troubleshooting steps create a persistent npm prefix and modify ~/.bashrc so the change survives across sessions. This is normal installation behavior, but it does establish persistence in the user's environment and should be disclosed clearly so users understand the lasting effect.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The guide includes a destructive reset command that deletes the entire FlowForge state directory, but it does not prominently warn users that this will remove workflow state and history. In setup documentation, omission of a clear data-loss warning can lead to accidental destructive action even if the command is not malicious.

Context-Inappropriate Capability

Low
Confidence
79% confidence
Finding
The skill directs the agent to write workflow results into any available workspace memory or log system after completion. This can leak sensitive task details into persistent stores outside the workflow engine, increasing retention and unintended disclosure risk.

Missing User Warnings

Low
Confidence
81% confidence
Finding
The reset command restarts the workflow instance and may disrupt or overwrite the user's in-progress state, yet the documentation does not require an explicit warning or confirmation before use. In an agent setting, this can lead to destructive actions being taken without clear user intent.

Missing User Warnings

Low
Confidence
84% confidence
Finding
This markdown file documents workflow patterns that include actions such as "Deploy to staging environment," "Commit changes," and "Apply changes." While an approval gate is shown later, the general examples and best-practice sections do not consistently warn that these actions can modify systems or data, which may lead users to define workflows with side effects without explicit disclosure.

Missing User Warnings

Low
Confidence
87% confidence
Finding
The instructions append to ~/.bashrc and source it without clearly warning that this changes persistent shell configuration for future sessions. While common for developer setup, undocumented persistence can surprise users and create unintended environment changes.

Static analysis

No suspicious patterns detected.