Skip to content

Commit f579da0

Browse files
committed
Update Dagger docs, triggers and baseline
1 parent 51703fc commit f579da0

3 files changed

Lines changed: 74 additions & 1 deletion

File tree

.github/workflows/dagger-fraud-sim.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ name: Dagger Fraud Simulation
33
on:
44
push:
55
branches: [ main ]
6+
paths:
7+
- 'auth_platform/**'
8+
- 'mcp_server/**'
69
workflow_dispatch:
710

811
permissions:

.secrets.baseline

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,15 @@
297297
"line_number": 45
298298
}
299299
],
300+
"dagger/README.md": [
301+
{
302+
"type": "Secret Keyword",
303+
"filename": "dagger/README.md",
304+
"hashed_secret": "a3e14ca24483c78554c083bc907c7194c7846ef1",
305+
"is_verified": false,
306+
"line_number": 37
307+
}
308+
],
300309
"mcp_server/BAML_INTEGRATION.md": [
301310
{
302311
"type": "Secret Keyword",
@@ -357,5 +366,5 @@
357366
}
358367
]
359368
},
360-
"generated_at": "2026-01-03T06:46:05Z"
369+
"generated_at": "2026-01-03T20:44:59Z"
361370
}

dagger/README.md

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# Dagger Fraud Simulation Workflow
2+
3+
This directory contains the [Dagger](https://dagger.io) module for the Fraud Simulation and AI Analysis pipeline.
4+
5+
## Purpose
6+
7+
The Dagger Workflow Pipeline automates the end-to-end fraud detection simulation:
8+
1. **Generation**: Spawns mock user accounts and login login events.
9+
2. **Simulation**: Processes logs through rule-based and AI-powered detections (Gemini & Groq).
10+
3. **Aggregation**: Summarizes results with per-account fraud scores and alerts.
11+
4. **AI Insights**: Analyzes the final summary report using Dagger's AI Agent to provide high-level insights and patterns.
12+
13+
Using Dagger ensures this pipeline runs consistently across local development and GitHub Actions by encapsulating the environment in containers.
14+
15+
## Local Usage
16+
17+
### 1. View Available Functions
18+
19+
To see the available functions and their documentation:
20+
21+
```bash
22+
dagger functions
23+
```
24+
25+
Or for detailed help on a specific function:
26+
27+
```bash
28+
dagger call run-fraud-sim --help
29+
```
30+
31+
### 2. Run Fraud Simulation
32+
33+
To run the full simulation and export the results to a local file:
34+
35+
```bash
36+
# Ensure your API keys are set as environment variables
37+
export GEMINI_API_KEY="your_key_here"
38+
export GROQ_API_KEY="your_key_here"
39+
40+
dagger call run-fraud-sim \
41+
--source . \
42+
--gemini-api-key env:GEMINI_API_KEY \
43+
--groq-api-key env:GROQ_API_KEY \
44+
export --path results/summary.json
45+
```
46+
47+
**Note:** `env:GEMINI_API_KEY` tells Dagger to read the value from your host's environment variable and pass it securely as a secret.
48+
49+
### 3. Run AI Result Analysis
50+
51+
To generate AI insights from an existing summary report:
52+
53+
```bash
54+
dagger call analyze-results --summary results/summary.json > results/insights.txt
55+
```
56+
57+
This command uses the `analyze_results` function which leverages Dagger's built-in LLM capabilities to review the summary and suggest remediations.
58+
59+
## Automated Execution (CI)
60+
61+
This module is triggered automatically via GitHub Actions in [.github/workflows/dagger-fraud-sim.yml](file:///Users/fayedraza/Authenication%20Service/.github/workflows/dagger-fraud-sim.yml) whenever the main CI pipeline completes successfully.

0 commit comments

Comments
 (0)