Verify the user. Verify the session. Verify the transaction.
Because trusting the transaction isn't enough β you need to verify it.
Don't just trust the transaction. Verify it.
Sentinel is an application-integrated security framework designed to protect digital payment workflows by combining AI-driven behavioral risk detection, transaction integrity verification, and session integrity monitoring.
The system evaluates multiple security signals through a server-side Trust Engine and produces a graduated response:
ALLOW β VERIFY β BLOCK
Sentinel is demonstrated through an e-commerce payment workflow where security decisions are made before payment initiation.
Modern fraud detection can determine whether a transaction or user appears suspicious, but payment security has another important dimension: application integrity.
A transaction may look legitimate while the payment interface inside the user's browser has been modified.
Sentinel addresses this by asking two questions:
Is the transaction behavior suspicious?
and
Can we still trust the transaction being presented to the user?
By combining behavioral intelligence with transaction and session integrity, Sentinel creates a layered security model for high-value digital actions.
Sentinel consists of three primary security layers that feed into a server-side Trust Engine.
The behavioral layer uses a pretrained XGBoost machine learning model to evaluate transaction and behavioral signals and generate a risk score.
Risk levels are mapped to graduated responses:
| Risk Level | Response |
|---|---|
| Low | ALLOW |
| Moderate | VERIFY |
| High | BLOCK |
The ML service also supports SHAP-based explanations, providing insight into the factors contributing to a model decision.
WebSeal protects critical values at the transaction boundary inside the browser.
A cryptographic baseline is generated for important transaction information such as:
Recipient + Amount
The baseline is protected using SHA-256 hashing and monitored through browser-side integrity checks.
If an unexpected modification occurs:
Trusted Transaction
β
SHA-256 Baseline
β
Unexpected Modification
β
Integrity Mismatch
β
Trust Engine
β
BLOCK
This allows Sentinel to detect application-level manipulation even when the transaction initially appeared legitimate.
The session layer monitors browser-session conditions that may indicate an abnormal payment environment.
Signals include:
- Window or tab blur
- Document visibility changes
- Viewport changes
- Unexpected browser dimension changes
Depending on the situation, a session anomaly can trigger VERIFY rather than immediately blocking the transaction.
The Sentinel Trust Engine acts as the final decision layer.
The browser and ML systems provide signals, but the server makes the authoritative decision.
SECURITY SIGNALS
|
+-------------+-------------+
| | |
v v v
Behavioral Transaction Session
Risk Integrity Integrity
| | |
+-------------+-------------+
|
v
SENTINEL TRUST ENGINE
|
+----------+----------+
| | |
v v v
ALLOW VERIFY BLOCK
This creates a defense-in-depth approach where compromising one layer does not automatically bypass the entire security decision.
Sentinel separates security evaluation from payment initiation.
The payment flow follows:
Checkout
β
Sentinel Activated
β
Security Evaluation
β
Server Trust Decision
β
+---------+---------+---------+
| | | |
ALLOW VERIFY BLOCK
| | |
β β β
Payment Additional Payment
Flow Verification Withheld
One of the key demonstrations is silent transaction tampering.
If a protected payment value is modified:
Transaction Tampering
β
SHA-256 Mismatch
β
WebSeal Detection
β
Server Decision
β
BLOCK
β
Payment QR Withheld
The objective is to prevent a potentially manipulated payment boundary from being exposed to the user.
The prototype provides controlled scenarios to demonstrate different security decisions.
| Scenario | Expected Decision |
|---|---|
| Normal transaction | ALLOW |
| Silent transaction tampering | BLOCK |
| High behavioral risk | BLOCK |
| Moderate behavioral risk | VERIFY |
| Session / tab anomaly | VERIFY |
This demonstrates that Sentinel does not treat every anomaly as fraud. Instead, the response is proportional to the detected risk.
Traditional security systems often focus on individual signals.
Sentinel combines multiple dimensions:
Behavioral Intelligence
+
Transaction Integrity
+
Session Integrity
β
Unified Risk Decision
β
ALLOW / VERIFY / BLOCK
This provides a more complete view of transaction trust.
The key principle is:
The client can report what it sees. The server decides what it trusts.
- React
- TypeScript
- Vite
- Tailwind CSS
- Python
- FastAPI
- XGBoost
- Scikit-learn
- SHAP
- Chrome Extension Manifest V3
- JavaScript
- SHA-256
- MutationObserver
sentinel-framework/
β
βββ weave-editorial-fashion-showcase/
β βββ src/
β β βββ components/
β β βββ hooks/
β β βββ lib/
β β βββ routes/
β βββ package.json
β
βββ ml-service/
β βββ app/
β β βββ main.py
β β βββ train.py
β β βββ explain.py
β β βββ prepare_data.py
β βββ models/
β β βββ model_nonleaky.pkl
β β βββ eval_results.json
β βββ requirements.txt
β βββ test_scenarios.py
β
βββ webseal-extension/
β βββ manifest.json
β βββ background.js
β βββ content-script.js
β βββ popup/
β
βββ architecture.png
βββ README.md
git clone https://github.com/kir943/sentinel-framework.git
cd sentinel-frameworkcd ml-service
python -m venv venvOn Windows:
venv\Scripts\activateInstall dependencies:
pip install -r requirements.txtStart the FastAPI service using the configuration in:
ml-service/app/main.py
Open another terminal:
cd weave-editorial-fashion-showcase
npm install
npm run devOpen Chrome:
chrome://extensions
Enable Developer Mode, select Load unpacked, and choose:
webseal-extension/
Sentinel is designed as a framework concept that can evolve beyond the current demonstration.
Potential extensions include:
- Production-ready Sentinel SDK
- Simple application integration APIs
- Real-time risk dashboards
- Adaptive verification policies
- Pluggable ML models
- Advanced anomaly detection
- Security audit trails
- Broader browser and platform support
A future integration could expose a simple interface such as:
Sentinel.protectTransaction({
amount,
recipient,
session,
userContext
});with the security layer returning:
ALLOW
VERIFY
BLOCK
Sentinel is currently demonstrated through an e-commerce payment workflow.
The payment QR/deep-link flow is implemented for the demonstration, while actual payment settlement is simulated.
Sentinel is intended as an application-level security and risk layer and does not replace bank, UPI, payment-gateway, or platform-level security infrastructure.
This project was built for the Razorpay Buildathon, specifically for Track 02: AI Risk Manager.
The track focuses on building systems that can help prevent financial loss caused by fraud, returns, and chargebacks.
Sentinel approaches the fraud-risk problem by combining:
AI Behavioral Risk + Transaction Integrity + Session Integrity
into a single server-authoritative decision system:
SENTINEL
β
Risk & Integrity Signals
β
Trust Engine
β
+----------+----------+
| | |
ALLOW VERIFY BLOCK
The goal is to detect suspicious conditions early and prevent unsafe transactions from progressing through the payment workflow.