Spaces:
Running
Running
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>Secure Web Application</title> | |
| <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css"> | |
| <style> | |
| :root { | |
| --primary-color: #3498db; | |
| --secondary-color: #2980b9; | |
| --accent-color: #e74c3c; | |
| --light-color: #ecf0f1; | |
| --dark-color: #2c3e50; | |
| --success-color: #2ecc71; | |
| --warning-color: #f39c12; | |
| --danger-color: #e74c3c; | |
| --shadow: 0 4px 6px rgba(0, 0, 0, 0.1); | |
| --border-radius: 8px; | |
| } | |
| * { | |
| margin: 0; | |
| padding: 0; | |
| box-sizing: border-box; | |
| font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; | |
| } | |
| body { | |
| background-color: var(--light-color); | |
| color: var(--dark-color); | |
| line-height: 1.6; | |
| min-height: 100vh; | |
| display: flex; | |
| flex-direction: column; | |
| } | |
| header { | |
| background-color: var(--dark-color); | |
| color: white; | |
| padding: 1rem; | |
| box-shadow: var(--shadow); | |
| position: sticky; | |
| top: 0; | |
| z-index: 100; | |
| } | |
| .header-container { | |
| display: flex; | |
| justify-content: space-between; | |
| align-items: center; | |
| max-width: 1200px; | |
| margin: 0 auto; | |
| width: 100%; | |
| } | |
| .logo { | |
| font-size: 1.5rem; | |
| font-weight: bold; | |
| display: flex; | |
| align-items: center; | |
| gap: 0.5rem; | |
| } | |
| .logo i { | |
| color: var(--primary-color); | |
| } | |
| .built-with { | |
| font-size: 0.8rem; | |
| opacity: 0.8; | |
| } | |
| .built-with a { | |
| color: var(--primary-color); | |
| text-decoration: none; | |
| } | |
| .built-with a:hover { | |
| text-decoration: underline; | |
| } | |
| nav ul { | |
| display: flex; | |
| list-style: none; | |
| gap: 1rem; | |
| } | |
| nav a { | |
| color: white; | |
| text-decoration: none; | |
| padding: 0.5rem 1rem; | |
| border-radius: var(--border-radius); | |
| transition: background-color 0.3s; | |
| } | |
| nav a:hover { | |
| background-color: var(--secondary-color); | |
| } | |
| main { | |
| flex: 1; | |
| max-width: 1200px; | |
| margin: 2rem auto; | |
| padding: 0 1rem; | |
| width: 100%; | |
| } | |
| .security-section { | |
| background-color: white; | |
| border-radius: var(--border-radius); | |
| box-shadow: var(--shadow); | |
| padding: 2rem; | |
| margin-bottom: 2rem; | |
| } | |
| .security-section h2 { | |
| color: var(--primary-color); | |
| margin-bottom: 1rem; | |
| border-bottom: 2px solid var(--primary-color); | |
| padding-bottom: 0.5rem; | |
| } | |
| .security-item { | |
| margin-bottom: 1.5rem; | |
| padding-bottom: 1.5rem; | |
| border-bottom: 1px solid #eee; | |
| } | |
| .security-item:last-child { | |
| border-bottom: none; | |
| margin-bottom: 0; | |
| padding-bottom: 0; | |
| } | |
| .security-status { | |
| display: flex; | |
| align-items: center; | |
| gap: 0.5rem; | |
| margin-bottom: 0.5rem; | |
| } | |
| .status-icon { | |
| width: 20px; | |
| height: 20px; | |
| border-radius: 50%; | |
| display: flex; | |
| align-items: center; | |
| justify-content: center; | |
| font-size: 0.8rem; | |
| } | |
| .status-good { | |
| background-color: var(--success-color); | |
| color: white; | |
| } | |
| .status-warning { | |
| background-color: var(--warning-color); | |
| color: white; | |
| } | |
| .status-bad { | |
| background-color: var(--danger-color); | |
| color: white; | |
| } | |
| .security-title { | |
| font-weight: bold; | |
| margin-bottom: 0.5rem; | |
| } | |
| .security-description { | |
| margin-bottom: 0.5rem; | |
| } | |
| .security-action { | |
| font-style: italic; | |
| color: var(--secondary-color); | |
| } | |
| .dashboard { | |
| display: grid; | |
| grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); | |
| gap: 1rem; | |
| margin-top: 2rem; | |
| } | |
| .dashboard-card { | |
| background-color: white; | |
| border-radius: var(--border-radius); | |
| box-shadow: var(--shadow); | |
| padding: 1.5rem; | |
| text-align: center; | |
| transition: transform 0.3s, box-shadow 0.3s; | |
| } | |
| .dashboard-card:hover { | |
| transform: translateY(-5px); | |
| box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15); | |
| } | |
| .dashboard-card i { | |
| font-size: 2rem; | |
| margin-bottom: 1rem; | |
| color: var(--primary-color); | |
| } | |
| .dashboard-card h3 { | |
| margin-bottom: 0.5rem; | |
| } | |
| .dashboard-card p { | |
| color: #666; | |
| font-size: 0.9rem; | |
| } | |
| footer { | |
| background-color: var(--dark-color); | |
| color: white; | |
| text-align: center; | |
| padding: 1.5rem; | |
| margin-top: auto; | |
| } | |
| .footer-links { | |
| display: flex; | |
| justify-content: center; | |
| gap: 1rem; | |
| margin-bottom: 1rem; | |
| } | |
| .footer-links a { | |
| color: white; | |
| text-decoration: none; | |
| padding: 0.5rem 1rem; | |
| border-radius: var(--border-radius); | |
| transition: background-color 0.3s; | |
| } | |
| .footer-links a:hover { | |
| background-color: var(--secondary-color); | |
| } | |
| @media (max-width: 768px) { | |
| .header-container { | |
| flex-direction: column; | |
| gap: 1rem; | |
| } | |
| nav ul { | |
| flex-wrap: wrap; | |
| justify-content: center; | |
| } | |
| .dashboard { | |
| grid-template-columns: 1fr; | |
| } | |
| } | |
| @media (max-width: 480px) { | |
| .logo { | |
| font-size: 1.2rem; | |
| } | |
| nav ul { | |
| gap: 0.5rem; | |
| } | |
| nav a { | |
| padding: 0.3rem 0.6rem; | |
| font-size: 0.9rem; | |
| } | |
| } | |
| </style> | |
| </head> | |
| <body> | |
| <header> | |
| <div class="header-container"> | |
| <div class="logo"> | |
| <i class="fas fa-shield-alt"></i> | |
| <span>SecureApp</span> | |
| </div> | |
| <nav> | |
| <ul> | |
| <li><a href="#dashboard">Dashboard</a></li> | |
| <li><a href="#security">Security</a></li> | |
| <li><a href="#settings">Settings</a></li> | |
| <li><a href="#about">About</a></li> | |
| </ul> | |
| </nav> | |
| <div class="built-with"> | |
| Built with <a href="https://huggingface.co/spaces/akhaliq/anycoder" target="_blank">anycoder</a> | |
| </div> | |
| </div> | |
| </header> | |
| <main> | |
| <section id="dashboard" class="dashboard"> | |
| <div class="dashboard-card"> | |
| <i class="fas fa-network-wired"></i> | |
| <h3>Network Isolation</h3> | |
| <p>Strict blockade with allowlisted ports</p> | |
| </div> | |
| <div class="dashboard-card"> | |
| <i class="fas fa-user-shield"></i> | |
| <h3>Non-Root Execution</h3> | |
| <p>Least privilege user with minimal capabilities</p> | |
| </div> | |
| <div class="dashboard-card"> | |
| <i class="fas fa-file-lock"></i> | |
| <h3>Read-Only Filesystem</h3> | |
| <p>Full read-only root with tmpfs for temporaries</p> | |
| </div> | |
| <div class="dashboard-card"> | |
| <i class="fas fa-filter"></i> | |
| <h3>Seccomp Filtering</h3> | |
| <p>Allowlisted syscalls with >80% block rate</p> | |
| </div> | |
| </section> | |
| <section id="security" class="security-section"> | |
| <h2>Security Controls</h2> | |
| <div class="security-item"> | |
| <div class="security-status"> | |
| <div class="status-icon status-good"> | |
| <i class="fas fa-check"></i> | |
| </div> | |
| <span class="security-title">Network Isolation</span> | |
| </div> | |
| <p class="security-description">Current: Strict Blockade with allowlisted single API port on loopback</p> | |
| <p class="security-action">Action: Maintain current configuration with periodic audits</p> | |
| </div> | |
| <div class="security-item"> | |
| <div class="security-status"> | |
| <div class="status-icon status-good"> | |
| <i class="fas fa-check"></i> | |
| </div> | |
| <span class="security-title">Non-Root Execution</span> | |
| </div> | |
| <p class="security-description">Current: Dedicated unprivileged user (llm_agent) with minimal capabilities</p> | |
| <p class="security-action">Action: Regular capability audits and reduction</p> | |
| </div> | |
| <div class="security-item"> | |
| <div class="security-status"> | |
| <div class="status-icon status-good"> | |
| <i class="fas fa-check"></i> | |
| </div> | |
| <span class="security-title">Read-Only Filesystem</span> | |
| </div> | |
| <p class="security-description">Current: Full read-only root with tmpfs for logs and cache</p> | |
| <p class="security-action">Action: Monitor tmpfs usage and adjust sizes as needed</p> | |
| </div> | |
| <div class="security-item"> | |
| <div class="security-status"> | |
| <div class="status-icon status-good"> | |
| <i class="fas fa-check"></i> | |
| </div> | |
| <span class="security-title">Seccomp Filtering</span> | |
| </div> | |
| <p class="security-description">Current: Allowlisted essential syscalls with >80% block rate</p> | |
| <p class="security-action">Action: Regular syscall audit and profile updates</p> | |
| </div> | |
| <div class="security-item"> | |
| <div class="security-status"> | |
| <div class="status-icon status-good"> | |
| <i class="fas fa-check"></i> | |
| </div> | |
| <span class="security-title">AppArmor/SELinux</span> | |
| </div> | |
| <p class="security-description">Current: Mandatory custom profile enforcing access controls</p> | |
| <p class="security-action">Action: Profile updates with each application version</p> | |
| </div> | |
| </section> | |
| </main> | |
| <footer> | |
| <div class="footer-links"> | |
| <a href="#privacy">Privacy Policy</a> | |
| <a href="#terms">Terms of Service</a> | |
| <a href="#contact">Contact Us</a> | |
| </div> | |
| <p>© 2023 SecureApp. All rights reserved.</p> | |
| </footer> | |
| <script> | |
| // Security dashboard interaction | |
| document.addEventListener('DOMContentLoaded', function() { | |
| const dashboardCards = document.querySelectorAll('.dashboard-card'); | |
| dashboardCards.forEach(card => { | |
| card.addEventListener('click', function() { | |
| // Simple visual feedback | |
| this.style.transform = 'scale(0.98)'; | |
| setTimeout(() => { | |
| this.style.transform = ''; | |
| }, 150); | |
| }); | |
| }); | |
| // Smooth scrolling for navigation links | |
| document.querySelectorAll('a[href^="#"]').forEach(anchor => { | |
| anchor.addEventListener('click', function (e) { | |
| e.preventDefault(); | |
| const targetId = this.getAttribute('href'); | |
| const targetElement = document.querySelector(targetId); | |
| if (targetElement) { | |
| targetElement.scrollIntoView({ | |
| behavior: 'smooth' | |
| }); | |
| } | |
| }); | |
| }); | |
| }); | |
| // Security status checks (simulated) | |
| function checkSecurityStatus() { | |
| // In a real application, this would make API calls to check security status | |
| console.log('Performing security status checks...'); | |
| // Simulate status updates | |
| setTimeout(() => { | |
| const statusIcons = document.querySelectorAll('.status-icon'); | |
| statusIcons.forEach(icon => { | |
| if (Math.random() > 0.8) { | |
| icon.classList.remove('status-good'); | |
| icon.classList.add('status-warning'); | |
| icon.innerHTML = '<i class="fas fa-exclamation-triangle"></i>'; | |
| } | |
| }); | |
| }, 2000); | |
| } | |
| // Initialize security checks | |
| checkSecurityStatus(); | |
| </script> | |
| </body> | |
| </html> |