Skip to main content

A Fraud Score Is Not Permission to Move Money

Updated 5 min readMarkdown
A Fraud Score Is Not Permission to Move Money

Fraud detection is an important part of financial engineering. But it becomes dangerous when we ask it to answer questions that belong elsewhere.

A transaction receiving a low risk score does not establish that the caller owns the account, has authority to spend the funds, or approved the exact recipient now attached to the transfer.

OWASP’s authorisation guidance distinguishes identity verification from permission to perform an action. Its business logic guidance adds another important requirement: sensitive workflows need explicit state and enforceable rules.

For this article, consider an illustrative .NET transfer service. The examples demonstrate design boundaries, not a complete production payment implementation.

1. Separate the questions

Before executing a transfer, the system may need to establish:

  1. Who is making the request?
  2. Can this actor operate this account?
  3. Are the transaction details valid?
  4. Has the required transaction approval been obtained?
  5. Does the activity require additional fraud review?
  6. Can the transfer transition to execution now?

These checks can interact, but they should not collapse into one boolean called IsSafe.

An explicit risk result is more useful:

public enum RiskAction
{
    Allow,
    RequireAdditionalVerification,
    HoldForReview,
    Reject
}

public sealed record RiskDecision(
    RiskAction Action,
    string PolicyVersion,
    IReadOnlyList<string> ReasonCodes);

Notice what this result does not say.

It does not claim the caller owns the account. It does not reserve funds. It does not authorise execution.

It communicates the risk engine’s decision within its own responsibility.

2. Enforce ownership independently

A valid access token should not let a customer operate another customer’s account simply by changing an identifier.

Resolve the actor from trusted identity context, then check their relationship to the resource:

var account = await accountRepository.FindAsync(
    request.SourceAccountId,
    cancellationToken);

if (account is null)
{
    return TransferResult.NotAvailable();
}

var permitted = await accountAccess.CanInitiateTransferAsync(
    actor,
    account,
    cancellationToken);

if (!permitted)
{
    return TransferResult.NotAvailable();
}

Returning the same external response for missing and inaccessible resources can reduce unnecessary disclosure, depending on the API’s requirements.

The key point is that ownership and authority are evaluated against trusted server state. OWASP specifically warns against treating user supplied resource identifiers as proof of access.

The risk engine runs within this protected workflow. It does not replace it.

3. Bind approval to the transaction details

Suppose a customer approves a transfer of £100 to recipient A.

That approval must not remain valid after the amount becomes £1,000 or the recipient changes to B.

One approach is to associate the approval with a specific transaction revision:

public sealed record TransferApproval(
    Guid TransferId,
    long ApprovedRevision,
    Guid ActorId,
    DateTimeOffset ExpiresAtUtc);

Before execution:

if (approval.TransferId != transfer.Id ||
    approval.ApprovedRevision != transfer.Revision ||
    approval.ActorId != actor.Id ||
    approval.ExpiresAtUtc <= timeProvider.GetUtcNow())
{
    return TransferResult.RequiresApproval();
}

This depends on an important invariant: every approval relevant change must increment the revision and invalidate earlier approval.

A revision number is not a security control if some update path forgets to maintain it.

Also, this check alone is not enough. Another request could change the transfer after validation but before execution. The approval check, approval consumption, and transition into an executable state need concurrency protection.

OWASP’s business logic guidance recommends atomic enforcement for operations where a separate check and update would allow a competing request to slip between them.

4. Make uncertainty an explicit outcome

A risk provider may time out. A device signal may be unavailable. A required screening service may return an inconclusive result.

Avoid this pattern:

catch
{
    return new RiskDecision(
        RiskAction.Allow,
        "fallback",
        Array.Empty<string>());
}

It silently turns a dependency failure into permission.

Instead, define the behaviour deliberately. Depending on the operation and policy, the system might hold the transaction, request additional verification, or return a retryable unavailable response.

The important property is that an unavailable signal cannot accidentally bypass a mandatory control.

5. Keep decisions explainable without leaking controls

Internally, record enough context to investigate a decision:

public sealed record RiskDecisionAudit(
    Guid TransferId,
    long TransferRevision,
    string PolicyVersion,
    RiskAction Action,
    IReadOnlyList<string> ReasonCodes,
    DateTimeOffset EvaluatedAtUtc);

Externally, do not assume the customer should receive the same detail.

An internal reason might identify a velocity rule or a sensitive detection signal. The customer facing response might simply say that additional verification is required.

Auditability and disclosure are separate concerns.

6. Test the bypass paths

Useful tests include:

  1. A low risk result does not bypass account ownership checks.
  2. Changing the recipient invalidates existing approval.
  3. Expired approval cannot be consumed.
  4. Two concurrent execution requests cannot consume the same approval twice.
  5. An unavailable mandatory control does not produce an automatic approval.
  6. Administrative and background entry points enforce the same essential rules.

The most important security tests are often not about whether the normal flow succeeds.

They are about whether an alternative route can skip a required decision.

Fraud detection helps assess suspicious activity. Trustworthy execution requires the rest of the system to enforce its own responsibilities too.

3 views

No comments yet. Be the first to comment.