How independent security research helped us strengthen approval workflows, prevent replay attacks, and protect connector credentials.

AI agents are becoming increasingly capable of interacting with business systems, executing tools, accessing data and performing actions on behalf of users.

But as their capabilities grow, so does the importance of controlling what they can do, who can authorize their actions, and how their integrations handle sensitive information.

At RagLeap, we believe AI employees should be powerful without operating beyond the boundaries established by their owners.

That principle is central to our approach: Open-source AI employees that ask before they act.

Recently, an independent security assessment by Aleksei Musienko, Chief Scientist & Founder of AMQIC (MSEC), QIAIMP Scientist, Q-Architect & Q-Developer, helped us identify several important areas for improvement in RagLeap Core.

We reviewed the reported findings against our codebase and translated several of them into concrete security fixes.

This work resulted in two releases: RagLeap Core v0.13.4 and v0.13.5.

1. Independent Security Research: From Findings to Fixes

Security improvements are not just about adding more checks or writing more documentation.

They require identifying how an application behaves under unexpected conditions, examining where assumptions can fail, and strengthening the boundaries that protect users.

The external assessment highlighted issues involving:

  • Concurrent approval processing.
  • Forced approval requirements for file operations.
  • Approval identity in group communication channels.
  • Sensitive credential handling.
  • Replay protection for signed Discord requests.
  • Connector data handling.

Our engineering team examined the relevant findings and implemented fixes across the two releases.

2. RagLeap Core v0.13.4: Strengthening Approval Security

Fix 1: Preventing the Same Approval from Executing Twice

Previously, two simultaneous responses to the same pending action could potentially both proceed.

For example:

An AI employee requests permission to perform an action. The owner responds through the dashboard while another response arrives through an API or chat channel.

Without atomic state management, concurrent requests could create inconsistent outcomes.

What changed:

PR #1444 introduces atomic claiming of pending actions.

  • Only one caller can claim the pending action.
  • Subsequent callers receive an already-processed response.
  • Conflicting approval and rejection attempts cannot both win.

This strengthens the reliability of approval-gated execution.

Fix 2: File Operations Always Require Approval

RagLeap supports different autonomy modes, but certain sensitive operations must remain subject to human oversight.

The assessment identified a mismatch between an action label and its execution channel in the full-autonomy execution endpoint.

Under a particular combination, a harmless action label paired with a file channel could bypass the expected forced-approval requirement.

What changed:

PR #1445:

  • Applies forced approval to both the action label and execution channel.
  • Rejects mismatched label/channel combinations with HTTP 400.
  • Prevents this particular approval bypass.

Fix 3: Approval Messages Must Come from Private Chats

Telegram groups and Discord server channels introduce an important identity problem.

A message from a group participant should not automatically be treated as an owner's approval.

What changed:

PR #1447:

  • Approval messages in Telegram groups are ignored.
  • Approval messages in Discord server channels are ignored.
  • Saving a Telegram group ID as an approval target is refused.

This reinforces the requirement that sensitive approval decisions must come from the appropriate private owner channel.

Additional Infrastructure Hardening

PR #1446 also introduced two improvements:

  • Update backups are excluded from Docker image builds.
  • Redis credentials are no longer exposed in application logs.

3. RagLeap Core v0.13.5: Three More Security Improvements

The next release continued the hardening work with three additional fixes.

Fix 1: Expired Approvals Cannot Execute Late

An approval request should not remain valid indefinitely.

Imagine an AI employee requests permission for an action. The owner does not respond for several weeks. By the time approval arrives, the original context or business requirement may have changed.

What changed:

PR #1455 introduces approval expiry.

  • Default expiry: 168 hours (7 days).
  • Pending actions older than the configured limit are refused if approved late.
  • The person attempting approval is informed that the request expired.
  • The event is logged.
  • Rejecting an expired request remains possible.
  • Setting APPROVAL_EXPIRY_HOURS=0 disables the expiry limit.

Already-old pending actions are also refused after upgrading.

This helps ensure that old approval requests cannot unexpectedly authorize actions long after their original context.

Fix 2: Discord Signed Requests Receive Replay Protection

A valid signature alone does not necessarily prevent a captured request from being reused later.

If an attacker captures a previously valid signed request, replaying it could become a concern unless the application also checks its timestamp.

What changed:

PR #1456 introduces timestamp validation for signed Discord requests.

  • Default allowed clock difference: 300 seconds.
  • Requests outside the configured time window are refused.
  • DISCORD_MAX_SKEW_SECONDS=0 disables the timestamp restriction.
  • Accurate server time synchronization is required.

This reduces the risk of replaying captured signed requests outside the permitted time window.

Fix 3: Connector Credentials Fail Closed

Connector integrations often require sensitive information, including:

  • Database connection strings.
  • API keys.
  • Authentication headers.
  • Other credential-bearing values.

Storing these values without encryption creates unnecessary security exposure.

What changed:

PR #1462 introduces safer credential handling.

Without ADDON_ENCRYPTION_KEY:

  • Credential-looking connection strings are refused.
  • API keys are refused.
  • Credential-looking headers are refused instead of being stored in plaintext.

With the encryption key configured:

  • Credential headers are stored encrypted.

The Mongo connector was also updated to use the user identifier as a plain filter value instead of inserting it through JSON text manipulation.

These changes address findings S1-001 and S1-006.

4. Security Improvements Without Enabling New Capabilities

An important detail across both releases is that upgrading does not automatically enable additional sensitive capabilities.

The following remain disabled:

  • File writing.
  • File deletion.
  • Sub-agents.

The v0.13.4 release introduced sub-agent groundwork, including run trees, cancellation, delegation limits and a Runs tab.

However, sub-agents remain disabled by default and have only been tested with scripted models so far.

The v0.13.5 release introduces no new mandatory configuration setting and requires no schema change.

Existing stored rows are not automatically rewritten. Previously stored plaintext header rows remain readable.

5. What Has Not Yet Been Validated?

We believe responsible security communication requires being transparent about testing limitations.

The following scenarios were not yet tested as part of these releases:

For v0.13.4:

  • Real Telegram group approval scenarios.
  • Real Discord server approval scenarios.
  • Separate application processes handling concurrent approval requests.
  • Sub-agent execution with a real model.

The external review of file-writing security (#800) also remains outstanding.

For v0.13.5:

  • Requests against a real Discord server.
  • Connector operations against a real MongoDB instance.
  • Dashboard messaging for expired approvals.

These releases represent concrete security improvements, not a claim that every possible vulnerability has been eliminated.

RagLeap has not obtained an ISO 27001 certification or any blanket security certification through this work.

6. Why This Matters for the Future of RagLeap

RagLeap is an open-source, self-hosted AI employee platform.

Our long-term vision extends beyond a single agent framework or a predefined collection of AI tools.

We want businesses to connect their own software, databases, CRMs, spreadsheets, internal systems and technologies to AI employees.

We also want developers and the open-source community to extend the ecosystem with new integrations and capabilities.

But extensibility must not come at the cost of security.

Every new capability introduces questions:

  • What can the AI employee access?
  • Which tenant owns the resource?
  • Which actions require human approval?
  • How are sensitive credentials protected?
  • How can execution be audited?

Our ongoing work on approval enforcement, tenant isolation, connector security and controlled execution is part of building the foundations needed for that future.

We believe open-source AI should give users freedom without sacrificing accountability.

7. Acknowledgements

We sincerely thank Aleksei Musienko, Chief Scientist & Founder of AMQIC (MSEC), QIAIMP Scientist, Q-Architect & Q-Developer, for conducting the independent security assessment and sharing valuable findings.

His research helped us identify areas that required closer attention and contributed to several concrete improvements in RagLeap Core.

We also appreciate everyone who tested, reported issues, reviewed changes and contributed to the project.

Security is continuous engineering work, and independent feedback plays an important role in making open-source systems stronger.

Explore RagLeap

RagLeap — Open-source AI employees that ask before they act.

We are building an extensible AI ecosystem where capability, security, human oversight and accountability grow together.

Explore the project, contribute, and help us build the next generation of open-source AI systems.