Skip to content

v0.2.2 - Live data wiring, dashboard complete and website#123

Merged
Vishnu2707 merged 82 commits into
mainfrom
dev
Jun 5, 2026
Merged

v0.2.2 - Live data wiring, dashboard complete and website#123
Vishnu2707 merged 82 commits into
mainfrom
dev

Conversation

@Vishnu2707
Copy link
Copy Markdown
Member

What does this PR do?

Merges dev into main for the v0.2.2 release. Closes the backend/frontend
API contract gap, ships the complete React dashboard on live data, adds
the project website, and removes all mock data.

Type of change

  • Bug fix
  • Dashboard/front-end work
  • API endpoint
  • Documentation

What's included

Backend

  • GET /api/resources - unique Azure resources from latest scan
  • GET /api/prioritization - risk ranked matrix by severity and affected resource count
  • GET /api/drift - ADDED/REMOVED events comparing last two scans
  • GET /api/findings//playbook - structured playbook from CLI script and CVE references
  • Score computed and stored per scan in engine.py
  • All latest scan queries scoped with WHERE total_findings > 0

Frontend

  • All mock data removed - dashboard fully wired to live backend
  • New Logo - Shield-Lock SVG with gradient
  • Live/reconnecting status dot replacing DEMO/LIVE badge
  • SOC2 added as 4th compliance framework card
  • View finding navigation on compliance FAIL rows

Website

  • Project website at openshield-website.vercel.app
  • Blog, rules gallery, docs, roadmap, releases, and playground

Post-quantum

  • AZ-PQC-001 to AZ-PQC-003 scanner rules
  • PQC knowledge skill in RAG layer
  • Compliance mappings across all four frameworks

Testing

  • All seven CI checks pass
  • 32 smoke test cases pass against live deployment
  • Frontend tested end to end on Vercel
  • No hardcoded credentials or secrets

Related issues

Closes #118
Closes #90

Vishnu2707 and others added 30 commits April 25, 2026 15:07
* feat: add sentinel/ingest.py — Log Analytics ingestion via HMAC-SHA256

* feat: add sentinel/__init__.py

* feat: add KQL rule — HIGH severity finding detected

* feat: add KQL rule — misconfiguration wave detection

* feat: add KQL rule — new resource type critical detection

* Delete sentinel/rules directory

* Create rules

* Delete sentinel/rules

* Add KQL rule for high severity findings

* Add Misconfiguration Wave detection rule

* Add KQL rule for persistent misconfiguration detection

* Add KQL rule for new critical resource types

This rule identifies new resource types with critical findings that have occurred in the last 24 hours, excluding known types from the last 30 days.

* Add script to generate test findings in JSON format

This script generates test findings related to security compliance and saves them in a JSON file.

* Add Sentinel integration test plan and results

Added a comprehensive test plan for Sentinel integration, detailing test objectives, results, and acceptance criteria for various KQL rules and data ingestion.

* docs: add sentinel integration setup guide

Added a comprehensive setup guide for integrating Sentinel with Azure, covering prerequisites, workspace creation, activation, environment variable setup, ingestion, log verification, KQL rules deployment, and incident verification.
* Add az_net_003.py to check NSG rules for port 443

This script detects Network Security Groups (NSGs) with unrestricted inbound access on port 443 and provides remediation guidance.

* Add AZ-NET-004 rule for empty NSG detection

This script detects Network Security Groups (NSGs) that have no custom security rules configured, providing details for remediation.

* Add AZ-NET-005 rule for DDoS protection check

This script detects virtual networks in Azure that do not have DDoS protection enabled and provides remediation steps.

* feat: add rule AZ-NET-006 — public IP unassociated with any resource

This rule detects public IP addresses that are not associated with any resource, providing details for remediation.

* feat: add rule AZ-NET-007 — Application Gateway without WAF enabled

This rule detects Application Gateways that do not have WAF enabled, logging findings and providing remediation steps.

* feat: add rule AZ-NET-008 — load balancer with no backend pool

This rule detects load balancers in Azure that are not configured with a backend pool, indicating potential misconfiguration or unnecessary costs.

* feat: add rule AZ-NET-009 — VPN gateway using outdated IKE version

This script detects VPN gateways using the outdated IKEv1 protocol and provides remediation steps to migrate to IKEv2.

* feat: add rule AZ-NET-010 — subnet with no NSG attached

This script detects subnets in Azure that do not have a Network Security Group (NSG) attached, logging findings and providing remediation guidance.

* feat: add playbook fix_az_net_003.sh

This script updates the NSG rule to restrict inbound traffic on port 443 to a specified IP range.

* feat: add playbook fix_az_net_004.sh

This script adds a default deny-all inbound rule to a specified NSG.

* feat: add playbook fix_az_net_005.sh

This script enables DDoS protection on a specified virtual network in Azure. It checks for required parameters and provides usage instructions if they are missing.

* feat: add playbook fix_az_net_006.sh

This script deletes unassociated public IP addresses in Azure.

* feat: add playbook fix_az_net_007.sh

This script enables WAF on an Application Gateway, ensuring compliance with the AZ-NET-007 rule.

* feat: add playbook fix_az_net_008.sh

Script to remediate AZ-NET-008 by deleting empty load balancers.

* feat:add script to update VPN connection to IKEv2

This script updates a VPN connection to use IKEv2, ensuring compliance with the AZ-NET-009 rule.

* feat: add playbook fix_az_net_010.sh

This script attaches a specified network security group to a given subnet in a virtual network, ensuring compliance with the AZ-NET-010 rule.

* Clarify description and add note for public-facing services

Updated the description to clarify the risk of exposing port 443 and added a note regarding public-facing services.

* Change severity level from MEDIUM to HIGH

* fix: AZ-NET-005 severity changed to LOW — DDoS Standard high cost on small subscriptions

* Add note about NetworkManagementClient usage

Added a note regarding the creation of NetworkManagementClient directly and suggested a follow-up for consistency.

* Add note about NetworkManagementClient usage

Added a note regarding the use of NetworkManagementClient and suggested a follow-up for consistency.

* Add additional security controls to CIS Azure benchmark

* Refine control descriptions in nist_csf.json

Updated descriptions for various controls to enhance clarity and specificity regarding remote access management, data protection, and security measures.

* fix: add AZ-NET-003 to AZ-NET-010 to ISO27001 compliance framework

Updated descriptions for various controls to clarify compliance requirements and improve security guidance.

---------

Co-authored-by: Vishnu Ajith <86302373+Vishnu2707@users.noreply.github.com>
* feat: add rule AZ-STOR-003 storage lifecycle policy check

* feat: add rule AZ-STOR-003 storage lifecycle policy check
* docs: add SOC 2 Type II compliance framework mapping for all 20 rules

Added SOC 2 Type II framework with detailed controls for security measures and compliance requirements.

* feat: add soc2 to FRAMEWORK_FILE_MAP in finding.py

add soc2.json to FRAMEWORK_FILE_MAP in finding.py

* feat: add soc2 to SUPPORTED_FRAMEWORKS in compliance.py

Added 'soc2' to the list of supported compliance frameworks.

* Add SOC 2 controls for data protection and management
* refactor: add get_virtual_networks() and get_public_ip_addresses() to AzureClient

* Refactor DDoS protection check to use azure_client

* refactor: AZ-NET-006 now uses azure_client.get_public_ip_addresses()
- Python syntax check on all rule files
  - Rule structure validation (RULE_ID, SEVERITY, FRAMEWORKS) + RULE_ID uniqueness
  - Hardcoded credential scan
  - Playbook existence + bash syntax check for every rule
  - Compliance JSON validation for all four framework files (inc. soc2.json)
  - API syntax check
  - Compliance vs rule cross-reference check
  - CI summary step with per-check pass/fail table (if: always)
  - Fix duplicate DESCRIPTION assignment in az_net_003.py
  - Add pyyaml to requirements.txt for local YAML validation
  - Add docs/ci-pipeline.md with local run commands and design rationale
  - Update CI_PIPELINE_GUIDE.md with final PR description

Closes #30
TFT444 and others added 21 commits May 29, 2026 15:46
#89)

* feat: initialise api/services package

* feat: add AI provider abstraction layer for Anthropic, Groq and Gemini

* fix: add module docstring to ai_provider.py

Added a docstring explaining the purpose of the AI provider abstraction layer.

* fix: make model configurable with sensible defaults per provider
…ng the Deployment CI failure (#88)

* fix: test align smoke tests with API behavior and environment

* test: deploy.yml run after smoke test alginment

* fix: smoke test aligned after recent codebase changes
#77)

* feat: add AZ-IDN-004 PIM not configured for admin roles rule and playbook

* fix: fetch Graph API token once and reuse headers for both API calls

* fix: correct malformed JSON in cis_azure_benchmark.json for AZ-IDN-004 entry

---------

Co-authored-by: Vishnu Ajith <86302373+Vishnu2707@users.noreply.github.com>
* feat: add AI insights endpoint

* ci: scan only quoted-literal credential assignments

---------

Co-authored-by: Shaurya K Sharma <Sharma-SK@ulster.ac.uk>
- Add scanner/rules/az_net_014.py to detect VNet peerings with
  allowGatewayTransit or useRemoteGateways enabled
- Add get_vnet_peerings() and get_azure_firewalls() to azure_client.py
- Add playbooks/cli/fix_az_net_014.sh remediation script
- Update all 4 compliance framework JSONs with AZ-NET-014 mappings
Co-authored-by: Shaurya K Sharma <Sharma-SK@ulster.ac.uk>
Co-authored-by: Shaurya K Sharma <Sharma-SK@ulster.ac.uk>
* fix: smoke test aligned after recent codebase changes

* feat: add CVE correlation via MITRE NVD API

* fix: ensure the run migration logic handles edge cases

* fix: sync with dev after merged PRs, fix compliance duplication, indentaion and omttion of AZ-STOR-04

* fix: CVE prefix mappings, use legacy-only enrichment, clean up tests, and align CVE correlation docs.

* fix: findings DB cleanup, AI title fallback, and persist CVE enrichment
…eddings (#97)

* Create __init__.py

* Implement OpenShield vector store builder

This script builds the OpenShield knowledge base vector store for RAG AI insights by collecting rules and compliance documents, then embedding them into a vector store.

* Add AI insights routes for summary, prioritisation, and Q&A

* Implement knowledge retrieval from vector store

This module retrieves relevant knowledge from the OpenShield vector store for retrieval-augmented generation (RAG). It includes error handling for missing vector stores and the chromadb dependency.

* Register AI blueprint in the Flask app

* Add chromadb version 0.4.24 to requirements

* feat: add Azure security skills into knowledge base for RAG embedding

* feat: wire Azure skill documents into embedding pipeline

* Add sentence-transformers version 2.7.0 to requirements

* ignore generated ai vectorstore directory

* Refactor AI insights routes for clarity and updates

* fix: deduplicate ai_bp and restore missing score_bp import in app.py

* Refactor severity handling and update prompts

* merge dev into feat/rag-ai-insights, resolve ai.py conflict

* trigger CI

* Remove AZ-CMP-003 and update AZ-NET-014 description

Removed control AZ-CMP-003 related to unauthorized software detection and updated control AZ-NET-014 description for clarity.
* ci: trigger fresh CI run

* Dev (#50)

* chore: add skeleton files and requirements

* fix: remove embedded git repo

* Core Structure Created

* feat: build complete core — scanner engine, 10 rules, API, playbooks, compliance mappings, docs

* docs: replace ASCII architecture with interactive Mermaid diagram

* feat: Sentinel integration — ingest.py, 4 KQL rules, setup guide (#12)

* feat: add sentinel/ingest.py — Log Analytics ingestion via HMAC-SHA256

* feat: add sentinel/__init__.py

* feat: add KQL rule — HIGH severity finding detected

* feat: add KQL rule — misconfiguration wave detection

* feat: add KQL rule — new resource type critical detection

* Delete sentinel/rules directory

* Create rules

* Delete sentinel/rules

* Add KQL rule for high severity findings

* Add Misconfiguration Wave detection rule

* Add KQL rule for persistent misconfiguration detection

* Add KQL rule for new critical resource types

This rule identifies new resource types with critical findings that have occurred in the last 24 hours, excluding known types from the last 30 days.

* Add script to generate test findings in JSON format

This script generates test findings related to security compliance and saves them in a JSON file.

* Add Sentinel integration test plan and results

Added a comprehensive test plan for Sentinel integration, detailing test objectives, results, and acceptance criteria for various KQL rules and data ingestion.

* docs: add sentinel integration setup guide

Added a comprehensive setup guide for integrating Sentinel with Azure, covering prerequisites, workspace creation, activation, environment variable setup, ingestion, log verification, KQL rules deployment, and incident verification.

* fix: add AZ-STOR-003 compliance mappings, correct NIST control to PR.DS-3

* docs: add real-world breach scenarios for all 10 starter rules (#15)

* feat: add AZ-KV-002 key vault public access rule and remediation playbook (#14)

* docs: update README with rule count, roadmap progress and contributors

* feat: add network security rules AZ-NET-003 to AZ-NET-010 (#16)

* Add az_net_003.py to check NSG rules for port 443

This script detects Network Security Groups (NSGs) with unrestricted inbound access on port 443 and provides remediation guidance.

* Add AZ-NET-004 rule for empty NSG detection

This script detects Network Security Groups (NSGs) that have no custom security rules configured, providing details for remediation.

* Add AZ-NET-005 rule for DDoS protection check

This script detects virtual networks in Azure that do not have DDoS protection enabled and provides remediation steps.

* feat: add rule AZ-NET-006 — public IP unassociated with any resource

This rule detects public IP addresses that are not associated with any resource, providing details for remediation.

* feat: add rule AZ-NET-007 — Application Gateway without WAF enabled

This rule detects Application Gateways that do not have WAF enabled, logging findings and providing remediation steps.

* feat: add rule AZ-NET-008 — load balancer with no backend pool

This rule detects load balancers in Azure that are not configured with a backend pool, indicating potential misconfiguration or unnecessary costs.

* feat: add rule AZ-NET-009 — VPN gateway using outdated IKE version

This script detects VPN gateways using the outdated IKEv1 protocol and provides remediation steps to migrate to IKEv2.

* feat: add rule AZ-NET-010 — subnet with no NSG attached

This script detects subnets in Azure that do not have a Network Security Group (NSG) attached, logging findings and providing remediation guidance.

* feat: add playbook fix_az_net_003.sh

This script updates the NSG rule to restrict inbound traffic on port 443 to a specified IP range.

* feat: add playbook fix_az_net_004.sh

This script adds a default deny-all inbound rule to a specified NSG.

* feat: add playbook fix_az_net_005.sh

This script enables DDoS protection on a specified virtual network in Azure. It checks for required parameters and provides usage instructions if they are missing.

* feat: add playbook fix_az_net_006.sh

This script deletes unassociated public IP addresses in Azure.

* feat: add playbook fix_az_net_007.sh

This script enables WAF on an Application Gateway, ensuring compliance with the AZ-NET-007 rule.

* feat: add playbook fix_az_net_008.sh

Script to remediate AZ-NET-008 by deleting empty load balancers.

* feat:add script to update VPN connection to IKEv2

This script updates a VPN connection to use IKEv2, ensuring compliance with the AZ-NET-009 rule.

* feat: add playbook fix_az_net_010.sh

This script attaches a specified network security group to a given subnet in a virtual network, ensuring compliance with the AZ-NET-010 rule.

* Clarify description and add note for public-facing services

Updated the description to clarify the risk of exposing port 443 and added a note regarding public-facing services.

* Change severity level from MEDIUM to HIGH

* fix: AZ-NET-005 severity changed to LOW — DDoS Standard high cost on small subscriptions

* Add note about NetworkManagementClient usage

Added a note regarding the creation of NetworkManagementClient directly and suggested a follow-up for consistency.

* Add note about NetworkManagementClient usage

Added a note regarding the use of NetworkManagementClient and suggested a follow-up for consistency.

* Add additional security controls to CIS Azure benchmark

* Refine control descriptions in nist_csf.json

Updated descriptions for various controls to enhance clarity and specificity regarding remote access management, data protection, and security measures.

* fix: add AZ-NET-003 to AZ-NET-010 to ISO27001 compliance framework

Updated descriptions for various controls to clarify compliance requirements and improve security guidance.

---------

Co-authored-by: Vishnu Ajith <86302373+Vishnu2707@users.noreply.github.com>

* Feat/az stor 003 (#21)

* feat: add rule AZ-STOR-003 storage lifecycle policy check

* feat: add rule AZ-STOR-003 storage lifecycle policy check

* docs: add SOC 2 Type II compliance framework mapping (#33)

* docs: add SOC 2 Type II compliance framework mapping for all 20 rules

Added SOC 2 Type II framework with detailed controls for security measures and compliance requirements.

* feat: add soc2 to FRAMEWORK_FILE_MAP in finding.py

add soc2.json to FRAMEWORK_FILE_MAP in finding.py

* feat: add soc2 to SUPPORTED_FRAMEWORKS in compliance.py

Added 'soc2' to the list of supported compliance frameworks.

* Add SOC 2 controls for data protection and management

* Refactor/azure client network methods (#22)

* refactor: add get_virtual_networks() and get_public_ip_addresses() to AzureClient

* Refactor DDoS protection check to use azure_client

* refactor: AZ-NET-006 now uses azure_client.get_public_ip_addresses()

* feat: add CI pipeline with 6 automated checks (#34)

- Python syntax check on all rule files
  - Rule structure validation (RULE_ID, SEVERITY, FRAMEWORKS) + RULE_ID uniqueness
  - Hardcoded credential scan
  - Playbook existence + bash syntax check for every rule
  - Compliance JSON validation for all four framework files (inc. soc2.json)
  - API syntax check
  - Compliance vs rule cross-reference check
  - CI summary step with per-check pass/fail table (if: always)
  - Fix duplicate DESCRIPTION assignment in az_net_003.py
  - Add pyyaml to requirements.txt for local YAML validation
  - Add docs/ci-pipeline.md with local run commands and design rationale
  - Update CI_PIPELINE_GUIDE.md with final PR description

Closes #30

* docs: update .github/ISSUE_TEMPLATE/new_rule.md to reflect current codebase state

* docs: update .github/PULL_REQUEST_TEMPLATE.md to reflect current codebase state

* docs: update CONTRIBUTING.md to reflect current codebase state

* docs: update README.md to reflect current codebase state

* docs: update compliance/frameworks/iso27001.json to reflect current codebase state

* docs: update compliance/frameworks/nist_csf.json to reflect current codebase state

* docs: update docs/adding-a-rule.md to reflect current codebase state

* docs: update docs/architecture.md to reflect current codebase state

* docs: update docs/az-stor-003-test-plan.md to reflect current codebase state

* docs: update docs/azure-setup.md to reflect current codebase state

* docs: update docs/ci-pipeline.md to reflect current codebase state

* docs: update docs/sentinel-setup.md to reflect current codebase state

* docs: update sentinel/TEST_PLAN.md to reflect current codebase state

* docs: update docs/api-reference.md to reflect current codebase state

* docs: update docs/rules-reference.md to reflect current codebase state

* docs: update README.md for professional open source style

* docs: update CONTRIBUTING.md for professional open source style

* docs: update docs/adding-a-rule.md for professional open source style

* docs: update deployment guide to use Render instead of Azure App Service

* feat: add rule AZ-STOR-004 storage account diagnostic logging check (#39)

* feat: add rule AZ-STOR-004 storage account diagnostic logging check

Detects Azure storage accounts where diagnostic logging is not fully
enabled on blob, queue, or table services. Emits one finding per
non-compliant service (StorageRead, StorageWrite, StorageDelete must
all be enabled). Adds get_storage_service_logging() to AzureClient
using MonitorManagementClient. Includes remediation playbook that
enables all three services in one run.

Frameworks: CIS 3.3, NIST DE.CM-7, ISO 27001 A.12.4.1

* chore: add AZ-STOR-004 compliance mappings

---------

Co-authored-by: Shaurya K Sharma <Sharma-SK@ulster.ac.uk>

* feat: add rule AZ-IDN-003 Adds scanner rule AZ-IDN-003 detecting Entra ID  (#48)

* feat: add scanner rule AZ-IDN-003 — guest user invitations not restricted to admins

* feat: add remediation playbook fix_az_idn_003.sh

This script restricts guest user invitations to only admins and users with the Guest Inviter role in Azure Active Directory.

* feat: add AZ-IDN-003 to CIS compliance framework

Added control for guest invite restrictions to enhance security.

* feat: add AZ-IDN-003 to NIST compliance framework

* feat: add AZ-IDN-003 to ISO27001 compliance framework

Added control AZ-IDN-003 for user registration and de-registration process.

* feat: add AZ-IDN-003 to SOC2 compliance framework

* feat: add rule AZ-CMP-002 — VM disk not protected by CMK or ADE (#47)

* feat: add scanner rule AZ-CMP-002 — VM disk not protected by CMK or ADE

This script detects virtual machines whose disks use platform-managed encryption only and provides findings for compliance with CIS 7.2.

* feat: add remediation playbook fix_az_cmp_002.sh

This script enables Azure Disk Encryption on a specified virtual machine using a Key Vault for the disk encryption key.

* feat: add AZ-CMP-002 to CIS compliance framework

Added a new control for OS disk encryption requirements.

* feat: add AZ-CMP-002 to NIST compliance framework

* feat: add AZ-CMP-002 to ISO27001 compliance framework

Added control AZ-CMP-002 regarding cryptographic controls policy and its requirements.

* feat: add AZ-CMP-002 to SOC2 compliance framework

* fix: correct indentation in CIS AZ-CMP-002 entry

* feat: add remediation playbook fix_az_cmp_002.sh to correct location

This script enables Azure Disk Encryption on a specified virtual machine using a provided Key Vault for disk encryption.

* Delete fix_az_cmp_002.sh

* Feat/api deployment (#46)

* feat: deploy API to Render with security hardening and CI/CD optimizations

* feat: finalize Render deployment with security hardening and Gunicorn import fix

* fix: GitHub Actions syntax and secret detection logic in deploy workflow

* ix: harden scan trigger route with detailed error handling and remove redundant DB initialization

* fix: implement global database connection management and harden all API routes

* ix: prevent insecure smoke tests on main branch by enforcing JWT_SECRET presence and prevent CI false negatives in playbook check by enforcing non-empty glob match

* fix: resolve Render startup crash and harden scan serialization against recursive objects

* fix: add missing six and cryptography dependencies for Azure SDK compatibility

* fix: increase CI wait time for Render build and add missing msrest dependencies

* feat: integrate real subscription ID into smoke tests and CI/CD pipeline

* feat: integrate real Azure_ ID's into smoke tests and CI/CD pipeline

* feat: add root welcome route to confirm API status

* fix: resolve specific CI credential flags in code and workflow while maintaining documentation standards

* fix: resolve IndentationError in CI compliance cross-reference check

* fix: resolve dependency issue and test on deployment

* fix: resolve somke test TC-21

* fix: RUN_REAL_SCAN not set → TC-13/TC-14 skip → 21/21 pass for new live API url test

* fix: scan.py deferred import from scanner.engine import ScanEngine was running before the subscription_id check

* fix: restrict deploy triggers to dev and main, enable RUN_REAL_SCAN for maintainer CI, and update test plan documentation

* feat: AZ-NET-011 Network Watcher not enabled in all regions (#42)

* feat: add AZ-NET-011 Network Watcher rule, playbook and compliance mappings

* fix: add missing AzureClient methods, SOC2 mapping and fix playbook region

* fix: add SOC2 CC7.2 to FRAMEWORKS in az_net_011.py

* feat: add AZ-DB-003 PostgreSQL Flexible Server SSL enforcement rule a… (#49)

* feat: add AZ-DB-003 PostgreSQL Flexible Server SSL enforcement rule and playbook

* fix: correct requirements.txt formatting for postgresqlflexibleserver

* fix: correct postgresqlflexibleservers package name and version

* fix: handle empty params gracefully and clean up playbook output

---------

Co-authored-by: Tanvir Farhad <tamimtarafder12@gmail.com>
Co-authored-by: PARTH J ROHIT <parthrohit60@gmail.com>
Co-authored-by: Ritik Sah <ritiksah141@gmail.com>
Co-authored-by: Shaurya K Sharma <shauryaksharma24@gmail.com>
Co-authored-by: Shaurya K Sharma <Sharma-SK@ulster.ac.uk>
Co-authored-by: Mahfuzur Rahman Emon <mahfuzur.emon01@gmail.com>

* refactor: reuse database connection per request using Flask g (#41)

* fix: improve scan routes error handling and database reuse

* fix: add database connection reuse and DATABASE_URL validation to score.py

* fix: add database connection reuse, DATABASE_URL validation, and FileNotFoundError handling to compliance.py

* fix: enforce JWT_SECRET environment variable, remove hardcoded default

* ci: trigger fresh CI run

* fix: all requirements - g.db naming, teardown, close() method

* fix: update az_net_012.py to match az_cmp_003 pattern and add set -euo pipefail to bash script

* fix: correct az_net_012.py signature, add set -euo pipefail, add AZ-NET-012 to all compliance files

* fix: correct az_net_012.py to match az_cmp_003 pattern

---------

Co-authored-by: Vishnu Ajith <86302373+Vishnu2707@users.noreply.github.com>
Co-authored-by: Tanvir Farhad <tamimtarafder12@gmail.com>
Co-authored-by: PARTH J ROHIT <parthrohit60@gmail.com>
Co-authored-by: Ritik Sah <ritiksah141@gmail.com>
Co-authored-by: Shaurya K Sharma <shauryaksharma24@gmail.com>
Co-authored-by: Shaurya K Sharma <Sharma-SK@ulster.ac.uk>
Co-authored-by: Mahfuzur Rahman Emon <mahfuzur.emon01@gmail.com>
* Basic components and pages with dummy data

* feat(frontend): build complete 7-page security dashboard

Complete React 18 + Vite frontend for OpenShield security platform.

Pages (7):
- Monitoring — security score gauge, trend chart, findings distribution,
  issues by resource group, category scores
- Discovery — resource table with issue counts, risk filters, category
  grouping, resource group filtering, clickable category cards
- Prioritization — risk vs effort matrix, ranked list with quick
  remediation preview, all 25 action items; click-to-select syncs
  matrix + action items + remediation panel
- Detailed Scan — findings list with playbook tabs (portal/CLI/validation),
  navigates from Prioritization with context banner
- Compliance — CIS/NIST/ISO27001/SOC2 framework cards, controls table,
  comparison trend chart, CSV/JSON export
- Drift — configuration change timeline, ADDED/REMOVED/MODIFIED events
  with before/after values, who changed it and when
- AI Assistant — 3-column layout (findings picker, chat, suggestions +
  CVE analysis + executive summary); AI chat wired to aiApi.js with
  smart mock responses; finding context passed from Scan page

API service layer (src/utils/api.js):
- Demo/Live mode toggle persisted in localStorage
- JWT token bootstrap in App.jsx
- Health check on startup with auto-fallback to demo mode
- Real fetch calls with mock fallback for every endpoint:
  /api/score, /api/findings, /api/findings/:id, /api/findings/:id/playbook,
  /api/resources, /api/prioritization, /api/drift, /api/scans,
  /api/scans/trigger, /api/scans/:id, /api/compliance/cis|nist|iso27001
- snake_case → camelCase normalisation for all backend responses
- Separate aiApi.js for AI endpoints with smart mock responses

Header features:
- Run Scan button with live polling (4s interval, 5-min timeout, elapsed timer)
- Demo/Live badge with connection test before switching
- Error popup if backend is unreachable

Design system:
- Tailwind CSS v3 with custom tokens (brand, severity, bg-dark, status)
- Dark mode via class strategy, persisted in localStorage
- Fully responsive — mobile hamburger drawer, stacked layouts on sm
- Dot-pattern background, soft shadows, consistent 4px grid

Mock data:
- 8 api.*.json files matching exact backend response schema
- API_ENDPOINTS.txt — backend contract document with implementation
  status, database schema, seed data, and endpoint ordering guide

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* feat(frontend): wire live backend, fix JWT auth, add Vercel deployment config

- Fix JWT: read VITE_JWT_TOKEN env var so live API calls authenticate correctly
  (was sending plain string 'dev-demo-token' which backend rejected as invalid JWT)
- Add vercel.json with SPA rewrites so /monitoring, /scan etc don't 404
- Monitoring page now fetches real score + findings in live mode and computes
  stats/distribution/resource-group breakdown from actual backend data
- Run Scan button shows subscription ID input in live mode (optional — backend
  falls back to AZURE_SUBSCRIPTION_ID env var if blank)
- api.js: no silent localhost fallback in production builds (fails loudly if
  VITE_API_URL is not set)

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix: smoke test aligned after recent codebase changes

* feat: fail closed on insecure JWT_SECRET in production

* fix: rename _DEFAULT_JWT_SECRET to avoid CI credential scanner false positive
* feat: add AZ-IDN-004 PIM not configured for admin roles rule and playbook

* feat: add RAG pipeline with document loader, chunker, embedder, ChromaDB vector store and Flask API routes

* fix: remove duplicate ai files, restore deleted compliance rules, revert requirements to chromadb 0.4.24

* fix: update gitignore to use ai/vectorstore/ and clean up README references

* fix: add missing newline at EOF in compliance JSON files
Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
* fix: smoke test aligned after recent codebase changes

* feat: wire live backend, implement missing endpoints, fix deploy crash

  - api.js/aiApi.js: default to live mode, hardcode Render URL fallback,
    non-persisted cold-start fallback, fix isDemoOrUnconfigured check
  - App.jsx: retry health probe 5x15s for Render cold start
  - AILayer.jsx: add catch to Promise.all so summary spinner always clears
  - scanner/engine.py: add status completed to scan result
  - api/routes/resources.py: new GET /api/resources from findings
  - api/routes/prioritization.py: new GET /api/prioritization ranked by score
  - api/routes/drift.py: new GET /api/drift from scan comparison
  - api/routes/findings.py: new GET /api/findings/:id/playbook from cli scripts
  - api/app.py: remove duplicate module-level ai_bp import that crashed gunicorn
  - requirements.txt: pin numpy<2.0 to fix chromadb startup crash on Render
  - deploy.yml: add feat/live-data-wiring to push triggers

* fix: make all GET /api/* endpoints public for demo dashboard

  removes JWT requirement from read-only routes so the Vercel frontend
  works without VITE_JWT_TOKEN; POST endpoints remain protected

* fix: update smoke tests for public GET auth model, accept scan timeout

  - TC-18/19: switched from GET /api/findings (now public) to POST
    /api/scans/trigger which still requires JWT — better security coverage
  - TC-21: added status 0 as acceptable outcome; when AZURE_SUBSCRIPTION_ID
    is set on Render the server starts a real scan and the 45s client
    timeout fires before it completes — that is not a crash
  - app.py: all GET /api/* public, POST endpoints remain JWT-protected

* feat: image/video support, drag-drop upload, Vercel-ready config, full README

  - assets/blog/.gitkeep: track empty directory for blog images
  - vercel.json: CSP allows Tailwind/Lucide CDNs and YouTube/Vimeo iframes;
    X-Frame-Options changed to SAMEORIGIN; Permissions-Policy added
  - script.js: real drag-and-drop on image upload zone with visual feedback
  - script.js: image size limit fixed from 2MB to 700KB with clear error
    (GitHub Contents API rejects base64 payloads over 1MB)
  - script.js: toEmbedUrl() converts YouTube watch URLs and Vimeo URLs to
    embed URLs automatically
  - script.js: blog posts render video embed above content if video field set
  - script.js: editor preview shows video iframe in real time
  - script.js: blog editor saves video embed URL to content entry
  - index.html: Video Embed URL field added to blog editor (YouTube/Vimeo)
  - index.html: image upload zone has id for drag-drop wiring
  - README.md: full maintainer guide — deployment, all content types,
    image/video guidelines, rules gallery update process, editor coverage table

* fix: apply CORS to all routes not just /api/* so /health is accessible from Vercel

* fix: scope score/findings/cve-summary to latest scan, make last-scanned dynamic

  - finding.py get_score(): was counting ALL findings across ALL scans —
    3 seeded scans with ~37 findings total drove score to 0; now scoped
    to latest scan_id only
  - finding.py get_cve_summary(): same fix — latest scan scope
  - finding.py get_findings(): when no scan_id filter given, default to
    latest scan so dashboard shows current posture not historical accumulation
  - Header.jsx: replace hardcoded 'May 29, 2026 6:00 PM' with dynamic
    fetch from api.getScans() on mount, formatted in user local timezone

* feat: implement resources, prioritization, drift, playbook endpoints; remove frontend mock data

* fix: always prefer VITE_JWT_TOKEN over stale localStorage value

* fix: compliance trend from scan history, fix AI tab crash

* merge: resolve final README conflict in roadmap checklist

* feat: add PQC to discovery icon map and website rules gallery
@Vishnu2707 Vishnu2707 self-assigned this Jun 4, 2026
Comment thread frontend/src/components/layout/Header.jsx Dismissed
@Vishnu2707 Vishnu2707 requested review from H-Sihan, emon22-ts and ritiksah141 and removed request for H-Sihan and ritiksah141 June 5, 2026 19:42
Copy link
Copy Markdown
Collaborator

@emon22-ts emon22-ts left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All good to merge

@Vishnu2707 Vishnu2707 merged commit 9575a33 into main Jun 5, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

9 participants