Spaces:
Running
Running
File size: 13,668 Bytes
e1cef8e |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 |
<!DOCTYPE html>
<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> |