Duo-Guardian / dashboard.html
Daksh C Jain
deploying mcp to huggingface
68f202a
Raw
History Blame Contribute Delete
7.95 kB
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Context Brain Intelligence Dashboard</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600&family=JetBrains+Mono:wght@400&display=swap" rel="stylesheet">
<style>
:root {
--bg: #0f172a;
--card-bg: rgba(30, 41, 59, 0.7);
--accent: #38bdf8;
--text: #f1f5f9;
--text-muted: #94a3b8;
--border: rgba(255, 255, 255, 0.1);
}
body {
font-family: 'Outfit', sans-serif;
background-color: var(--bg);
color: var(--text);
margin: 0;
padding: 40px;
line-height: 1.6;
background-image: radial-gradient(circle at 50% 50%, #1e293b 0%, #0f172a 100%);
}
.container {
max-width: 1000px;
margin: 0 auto;
}
.header {
text-align: center;
margin-bottom: 60px;
}
.header h1 {
font-size: 3rem;
margin: 0;
background: linear-gradient(90deg, #38bdf8, #818cf8);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
font-weight: 600;
}
.header p {
color: var(--text-muted);
font-size: 1.2rem;
}
.grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
gap: 25px;
}
.card {
background: var(--card-bg);
backdrop-filter: blur(12px);
border: 1px solid var(--border);
border-radius: 20px;
padding: 30px;
box-shadow: 0 10px 30px rgba(0,0,0,0.3);
transition: transform 0.3s ease;
}
.card:hover {
transform: translateY(-5px);
border-color: var(--accent);
}
.card h2 {
margin-top: 0;
font-size: 1.5rem;
display: flex;
align-items: center;
gap: 12px;
color: var(--accent);
}
.content {
background: rgba(0,0,0,0.2);
border-radius: 12px;
padding: 20px;
font-size: 0.95rem;
white-space: pre-wrap;
font-family: 'Outfit', sans-serif;
}
.footer {
text-align: center;
margin-top: 60px;
color: var(--text-muted);
font-size: 0.9rem;
}
code {
font-family: 'JetBrains Mono', monospace;
background: rgba(255,255,255,0.1);
padding: 2px 5px;
border-radius: 4px;
}
</style>
</head>
<body>
<div class="container">
<div class="header">
<h1>🧠 Context Brain</h1>
<p>Intelligence Platform Audit Dashboard</p>
</div>
<div class="grid">
<div class="card">
<h2>🕵️ Code Quality Analysis</h2>
<div class="content">### 🧠 Context Brain Intelligence Report
* **Critical Security Vulnerabilities**: This MR introduces multiple critical security flaws, including hardcoded AWS and GitLab secrets, and the unsafe use of `eval()` which poses a severe risk of arbitrary code execution.
* **Major FinOps & DevOps Inefficiencies**: The CI/CD pipeline exhibits redundant dependency installations across multiple jobs, inefficient cloud polling mechanisms that will incur excessive costs, the use of oversized Docker images, and execution as root, significantly increasing cloud spend and reducing operational efficiency.
* **Code Quality & Test Failures**: While a comprehensive test suite is added, the MR description indicates native test failures. Additionally, there's a lack of input validation for file uploads and an outdated hardcoded GCP project ID, highlighting critical code quality issues.</div>
</div>
<div class="card">
<h2>💸 FinOps & Cost Impact</h2>
<div class="content">These changes will significantly increase cloud infrastructure costs due to an expanded CI/CD pipeline with redundant dependency installations, the introduction of a large Docker image, and a new function designed with an inefficient polling loop causing heavy outbound data transfer costs.</div>
</div>
<div class="card">
<h2>⚙️ DevOps & SRE Signals</h2>
<div class="content">The MR significantly enhances the CI/CD pipeline with comprehensive analysis stages for code quality, security, FinOps, and DevOps, greatly improving feedback and observability. However, it introduces critical security vulnerabilities (hardcoded secrets, `eval()` usage) and major FinOps inefficiencies (redundant CI dependency installations, an expensive polling loop, large Docker image base, lack of error handling for cloud ops) while exhibiting DevOps anti-patterns like running containers as root and committing compiled bytecode.</div>
</div>
<div class="card">
<h2>🧪 Automated SDET Tests</h2>
<div class="content">### 🧪 Automated Testing Report
I generated Unit Tests for the new feature and ran them automatically in the CI environment.
❌ **Tests Failed!** The new logic failed validation against my generated scenarios.
<details><summary>View Pytest Execution Logs</summary>
```text
STDOUT:
============================= test session starts =============================
platform win32 -- Python 3.12.4, pytest-7.4.3, pluggy-1.6.0 -- C:\Users\daksh\anaconda3\python.exe
cachedir: .pytest_cache
rootdir: C:\Users\daksh
plugins: anyio-4.12.1, Faker-37.4.0, langsmith-0.4.59, asyncio-0.21.1, cov-6.2.1
asyncio: mode=Mode.STRICT
collecting ... collected 0 items / 1 error
=================================== ERRORS ====================================
______ ERROR collecting AppData/Local/Temp/test_ai_generated_azaa_wbv.py ______
ImportError while importing test module 'C:\Users\daksh\AppData\Local\Temp\test_ai_generated_azaa_wbv.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
C:\Users\daksh\anaconda3\Lib\importlib\__init__.py:90: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
C:\Users\daksh\AppData\Local\Temp\test_ai_generated_azaa_wbv.py:2: in <module>
from business_logic import calculate_monthly_billing, unused_function
E ModuleNotFoundError: No module named 'business_logic'
- generated xml file: C:\Users\daksh\OneDrive\Desktop\Hackathons\gitlab-ai-hackathon\virushacks\junit-report.xml -
=========================== short test summary info ===========================
ERROR ..\..\..\..\..\AppData\Local\Temp\test_ai_generated_azaa_wbv.py
!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!
============================== 1 error in 0.29s ===============================
STDERR:
```
</details></div>
</div>
</div>
<div class="footer">
Context Brain &copy; 2026 | Generated for MR !5
</div>
</div>
</body>
</html>