Repository navigation
Release candidate: promote dev to main - #414
Merged
Merged
Conversation
… compliance mappings, docs
* 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
…site (#402) * fix(deps): patch high/moderate JS vulnerabilities in frontend and website Updates frontend and website lockfiles to pull in patched transitive dependencies, resolving the outstanding high and moderate advisories in both npm projects. astro stays on the ^7.4.1 range; no vite/zod overrides are needed because astro 7.4.1 already resolves vite@8.3.5 and zod@4.6.7. npm audit in website/ reports 0 vulnerabilities. frontend/ has 6 moderate advisories remaining, all from minimatch via the eslint dev-dependency chain (GHSA-g3hv-75wg-m249), which has no fix available upstream and is dev-tooling only, not shipped. These are pre-existing on dev and untouched by this change. Rebased onto dev so the merged Python requirement changes (#401) drop out of the diff, leaving only the JS dependency files. Signed-off-by: Tanvir Farhad <tamimtarafder12@gmail.com> * fix(deps): resolve remaining website and frontend advisories Signed-off-by: Tanvir Farhad <tamimtarafder12@gmail.com> * ci(website): use a Node 22 release supported by Astro Signed-off-by: Tanvir Farhad <tamimtarafder12@gmail.com> --------- Signed-off-by: Tanvir Farhad <tamimtarafder12@gmail.com>
* feat(packaging): publish owasp-openshield scanner CLI to PyPI Ports Ritik's packaging work (PR #394) onto a clean branch with dev's current scanner code. Adds pyproject.toml (owasp-openshield, openshield scan CLI entry point), MANIFEST.in, setup.py compat shim, and the python-package CI workflow that builds and verifies wheel + sdist on Linux, macOS, and Windows. Moves RULE_ERRORS_TOTAL and NVD_REQUEST_LATENCY_SECONDS from api/observability to openshield/metrics so the standalone scanner package can be imported without Flask. api/observability re-exports both symbols so existing callers are unchanged. Packages: scanner*, playbooks*, contracts*, openshield* Excludes: api*, tests*, frontend*, website* pip install owasp-openshield openshield scan --subscription-id <uuid> A follow-up commit will add [ai] optional extras and the openshield-mcp entry point once PR #397 (CSPM AI agent) merges to dev. Closes #394 Signed-off-by: Tanvir Farhad <tamimtarafder12@gmail.com> * fix(packaging): bump oauthlib to 4.0.1 and fix verify script for dev engine Signed-off-by: Tanvir Farhad <tamimtarafder12@gmail.com> * fix(packaging): set static version 0.1.0 - dynamic had no source configured Signed-off-by: Tanvir Farhad <tamimtarafder12@gmail.com> * fix(packaging): address reviewer feedback - dynamic version, docs, MANIFEST, version assertion Signed-off-by: Tanvir Farhad <tamimtarafder12@gmail.com> * fix(packaging): restore MANIFEST.in worker exclusion for sdist scope check Signed-off-by: Tanvir Farhad <tamimtarafder12@gmail.com> * fix(packaging): add az_gov_001-010 to scanner/rules/manifest.txt 10 governance rule files were missing from manifest.txt (154 files vs 144 entries). The verify_cli_artifact.py inline check asserts manifest.txt contents must exactly equal the az_*.py glob -- mismatch caused the Install wheel and sdist CI failure on all 3 platforms. Signed-off-by: Tanvir Farhad <tamimtarafder12@gmail.com> --------- Signed-off-by: Tanvir Farhad <tamimtarafder12@gmail.com>
…evaluate() (#375) (#411) Migrate AZ-SECOPS-001 to 010 and AZ-SC-001 to 008 to the evaluate() coverage contract. Each rule reports PASS, FAIL, UNKNOWN, ERROR or NOT_APPLICABLE with the inspected values as evidence; scan() becomes a wrapper over the FAIL evaluations. - Security operations: the collector is reached through AzureClient.get_security_operations_collector(). A failed subscription-wide collection is ERROR / INVENTORY_UNAVAILABLE, a per-resource or per-workspace gap is UNKNOWN for that scope, and an unset or invalid policy is UNKNOWN / POLICY_NOT_CONFIGURED, so an unconfigured deployment is not a failed scan. The per-critical-resource flow for 003 to 005 is shared in _security_operations_common.py. - Supply chain: AzureClient.list_devops_service_endpoints() raises IntegrationNotConfigured when Azure DevOps is not configured (NOT_APPLICABLE / INTEGRATION_NOT_CONFIGURED) and returns None when it is unreachable (ERROR). Shared registry, storage and service-connection flows live in _supply_chain_common.py. - Findings are unchanged except that AZ-SECOPS-007 reports one finding per affected resource, and items returned without an ID are UNKNOWN instead of findings with an empty or truncated resource_id. - Register all 18 rules in the contract test and add tests/test_rules_secops_sc_evaluate.py for the remaining status paths. Signed-off-by: parthrohit22 <parthrohit60@gmail.com> Co-authored-by: Tanvir Farhad <tamimtarafder12@gmail.com>
…e() contract (#408) * test(scanner): add shared failure-injection scenarios for the evaluate() contract Run every migrated rule through ScanEngine and get_compliance_score() for failed collection, permission denial, timeout, exhausted throttling, malformed output, empty inventory and partial inventory, and assert incomplete evidence never becomes PASS or a finding. Document the failure-to-status matrix in docs/failure-scenario-matrix.md. Refs #389 Signed-off-by: Dipesh Ray <dipesh.ray.g@gmail.com> * test(scanner): verify SDK failure and evaluation scope Signed-off-by: Vishnu Ajith <27vishnu07@gmail.com> --------- Signed-off-by: Dipesh Ray <dipesh.ray.g@gmail.com> Signed-off-by: Vishnu Ajith <27vishnu07@gmail.com> Co-authored-by: Vishnu Ajith <27vishnu07@gmail.com>
…curity hardening (#397) * feat(agent): tool layer with 6 CSPM tool functions and unit tests Signed-off-by: Tanvir Farhad <tamimtarafder12@gmail.com> * feat(agent): ReAct loop with tool dispatch and guardrails Signed-off-by: Tanvir Farhad <tamimtarafder12@gmail.com> * feat(agent): POST /api/agent/query route with auth, rate limit, and tests Signed-off-by: Tanvir Farhad <tamimtarafder12@gmail.com> * fix(agent): read tenant_id from JWT g.user and subscription_id from request body The route was reading g.tenant_id and g.subscription_id which are never set by verify_jwt. Fixed to read tenant_id from g.user['tenant'] (matches the principal dict set by auth.py) and subscription_id from the validated request body, consistent with how scans.py handles it. Signed-off-by: Tanvir Farhad <tamimtarafder12@gmail.com> * fix(agent): clean up g.user guard, simplify 503 test, strengthen tenant isolation test Signed-off-by: Tanvir Farhad <tamimtarafder12@gmail.com> * feat(agent): openshield ask CLI command Signed-off-by: Tanvir Farhad <tamimtarafder12@gmail.com> * feat(agent): MCP server exposing 6 CSPM tools to Claude Desktop and Copilot Signed-off-by: Tanvir Farhad <tamimtarafder12@gmail.com> * fix(agent): broaden CLI exception catch and guard OPENSHIELD_TENANT_ID Signed-off-by: Tanvir Farhad <tamimtarafder12@gmail.com> * fix(agent): harden tenant gate, subscription allowlist, rollback safety, and role access Signed-off-by: Tanvir Farhad <tamimtarafder12@gmail.com> * fix(ci): resolve ruff lint, bandit B608, pip-audit vulns, and credential scan false positive Signed-off-by: Tanvir Farhad <tamimtarafder12@gmail.com> * fix(ci): fix E501 line length in agent.py and app.py, bump deps in requirements-dev Signed-off-by: Tanvir Farhad <tamimtarafder12@gmail.com> * fix(ci): revert rogue requirements edits; use dev-baseline lock files Signed-off-by: Tanvir Farhad <tamimtarafder12@gmail.com> * fix(ci): clean up ruff lint errors in agent test files Signed-off-by: Tanvir Farhad <tamimtarafder12@gmail.com> * fix(deps): re-bump werkzeug to 3.1.9 and multidict to 6.9.1 Signed-off-by: Tanvir Farhad <tamimtarafder12@gmail.com> * fix(deps): pin aiohttp>=3.14.4 and werkzeug>=3.1.9 for CVE fixes, regenerate locks, reformat code Signed-off-by: Tanvir Farhad <tamimtarafder12@gmail.com> * security: harden CSPM AI agent - output sanitization, role checks, MCP auth Critical fixes: - Sanitize LLM answer through clean_text before returning to API callers - Validate parsed answer is a string before using it - Gate scan_subscription to operator/admin roles; viewer bypass via agent route was a privilege escalation - Add subscription allowlist check to MCP call_tool handler (was missing, HTTP route had it) - Replace per-call psycopg2.connect in MCP with SimpleConnectionPool to avoid exhausting DB connections Warning fixes: - Cap tool result serialization at 4 KB to prevent unbounded prompt growth - Deduplicate repeated tool calls within one agent loop via seen-set - Return {"error": "db_error"} from get_findings/explain_finding on DB failure instead of empty list/None so LLM can report the real state Info fixes: - Add rationale to nosec B608 comment in tools.py - Add mcp/__init__.py so local mcp/ package correctly shadows installed SDK for tests - Expand test_mcp_server.py: subscription allowlist unit tests and call_tool coverage for tenant enforcement and blocked scan Signed-off-by: Tanvir Farhad <tanvirfarhad007@gmail.com> Signed-off-by: Tanvir Farhad <tamimtarafder12@gmail.com> * fix(ci): fix ruff lint and bump certifi/multidict for pip-audit and Trivy - Remove unused import psycopg2 from mcp/server.py (ruff F401) - Remove unused import os from tests/test_mcp_server.py (ruff F401) - Extract _mcp_mocks variable to shorten two with-patch lines (ruff E501) - Bump certifi 2026.6.17 -> 2026.10.23 (PYSEC-2026-4320, GHSA-6q48-6c7w-9gw2) - Bump multidict 6.8.0 -> 6.9.1 (PYSEC-2026-4244) Signed-off-by: Tanvir Farhad <tamimtarafder12@gmail.com> * fix(test): fix JWT double-import bug in test_tenant_from_jwt_not_body from tests.conftest import _TEST_JWT_SECRET triggered a second module load, producing a new random secret separate from the one the fixture injected into app.config. Read the secret directly from app.config to guarantee the same value is used for both signing and verification. Signed-off-by: Tanvir Farhad <tamimtarafder12@gmail.com> * style: apply ruff format to test_mcp_server.py Use parenthesized context managers instead of backslash continuation, matching the project's ruff format style. Signed-off-by: Tanvir Farhad <tamimtarafder12@gmail.com> * chore(deps): revert requirements changes to dev baseline Dependency lock updates are handled in #401 (fix/security-deps-python). Removing from this PR to keep the diff focused on the CSPM AI agent. Signed-off-by: Tanvir Farhad <tanvirfarhad007@gmail.com> Signed-off-by: Tanvir Farhad <tamimtarafder12@gmail.com> * feat(agent): add native tool-use provider adapter (Azure OpenAI default, BYO OpenAI/Anthropic) Signed-off-by: Tanvir Farhad <tamimtarafder12@gmail.com> * feat(agent): add backend-independent guardrail primitives Signed-off-by: Tanvir Farhad <tamimtarafder12@gmail.com> * feat(agent): native tool-use loop with guardrails and grounded confidence Signed-off-by: Tanvir Farhad <tamimtarafder12@gmail.com> * fix(agent): queue scans through the admission path, not a raw INSERT Signed-off-by: Tanvir Farhad <tamimtarafder12@gmail.com> * refactor(mcp): rename package to openshield_mcp, gate writes by role, route scans through admission Signed-off-by: Tanvir Farhad <tamimtarafder12@gmail.com> * feat(agent): wire optional framework hint into the agent question Signed-off-by: Tanvir Farhad <tamimtarafder12@gmail.com> * docs(agent): explain provider-agnostic untrusted-data transcript choice Signed-off-by: Tanvir Farhad <tamimtarafder12@gmail.com> * style: apply ruff format to agent and provider files Signed-off-by: Tanvir Farhad <tamimtarafder12@gmail.com> * test(agent): reference provider key via constant to satisfy credential scanner Signed-off-by: Tanvir Farhad <tamimtarafder12@gmail.com> * test(agent): assert exact URL host via urlparse to clear CodeQL url-substring alert Signed-off-by: Tanvir Farhad <tamimtarafder12@gmail.com> * fix(deps): bump oauthlib 4.0.0 to 4.0.1 (CVE-2026-49272) Signed-off-by: Tanvir Farhad <tamimtarafder12@gmail.com> * ci: re-trigger pipeline for oauthlib bump (webhook miss on prior push) Signed-off-by: Tanvir Farhad <tamimtarafder12@gmail.com> * docs(agent): add CSPM AI agent design spec and phase-1 implementation plan Signed-off-by: Tanvir Farhad <tamimtarafder12@gmail.com> * style: ruff-format python code blocks in the phase-1 plan doc Signed-off-by: Tanvir Farhad <tamimtarafder12@gmail.com> * fix(agent): honour the hourly scan quota and surface quota errors unmasked Signed-off-by: Tanvir Farhad <tamimtarafder12@gmail.com> * fix(agent): fail closed on compliance read errors; document agent config and endpoint Signed-off-by: Tanvir Farhad <tamimtarafder12@gmail.com> * fix(agent): close MCP sub allowlist bypass, validate finding_id type, block framework prompt injection B1 openshield_mcp/server.py: get_findings and get_compliance_posture now run _subscription_is_authorized before querying, matching scan_subscription. Cross-tenant reads were possible for operator/admin MCP clients. B2 api/agent/agent.py: finding_id from tool-call args is validated as int before being forwarded to explain_finding/suggest_remediation. None was silently passed to the DB layer causing a type error at query time. B3 api/routes/agent.py: framework param validated against VALID_FRAMEWORKS allowlist {mcsb, cis, iso27001} before insertion into the agent prompt. Arbitrary strings were injectable into the LLM context via this field. Signed-off-by: Tanvir Farhad <tamimtarafder12@gmail.com> * fix(agent): support Managed Identity for Azure OpenAI, guard suggest_remediation error dict B1 api/routes/agent.py + api/services/ai_provider.py: - Remove global empty-key rejection for azure_openai provider so Managed Identity deployments (no AI_API_KEY) can reach the endpoint - Add endpoint+deployment check for azure_openai so the 503 is still raised when the deployment config is missing - _azure_openai_tools: when api_key is empty, acquire a bearer token from DefaultAzureCredential (scope: cognitiveservices.azure.com) instead of sending an empty api-key header that would 401 immediately B2 api/agent/tools.py: - suggest_remediation: guard against explain_finding returning an error dict (e.g. {error: db_error}). Previously accessed detail[finding_id] directly, causing KeyError when the DB layer returns an error rather than None. Signed-off-by: Tanvir Farhad <tamimtarafder12@gmail.com> * fix(agent): return not_available status from get_attack_paths instead of empty list An empty list return caused the LLM to interpret the result as 'no attack paths found' rather than 'feature not yet deployed', giving users a false all-clear. The tool now returns a dict with status=not_available and a message directing the user to get_findings as an alternative. Addresses Vishnu's review comment on PR #397. Signed-off-by: Tanvir Farhad <tamimtarafder12@gmail.com> * fix(agent): align tool queries with baseline schema, add postgres integration tests - get_findings: query findings JOIN scans by subscription_id instead of lifecycle tables (finding_lifecycles, finding_fingerprints, scan_rule_outcomes) that are not yet present on dev until PR #326 merges; state= param accepted but silently ignored until lifecycle tables ship - get_compliance_posture: delegate to DatabaseManager.get_compliance_score() which reads from scans.compliance_mapping_snapshot; drops dependency on compliance_scores aggregate table that does not exist in baseline schema - explain_finding: query findings table directly; drop lifecycle joins - agent.py: pass db_conn (DatabaseManager) to get_compliance_posture dispatch - server.py (MCP): pass db (DatabaseManager) to get_compliance_posture - tests/test_agent_tools.py: update unit tests to match new behavior including get_attack_paths not_available status and get_compliance_posture delegation - tests/test_agent_route.py: add AZURE_OPENAI_ENDPOINT+DEPLOYMENT to test env patches so route tests clear the Managed Identity provider check - tests/test_agent_tools_postgres.py: new integration test suite requiring DATABASE_URL; covers get_findings (filters, state, isolation, latest-scan), explain_finding, suggest_remediation, get_compliance_posture against live DB Signed-off-by: Tanvir Farhad <tamimtarafder12@gmail.com> * fix(lint): resolve ruff E501 and bandit B608 nosec placement - api/routes/agent.py: break long 503 response line to stay under 120 chars - api/agent/tools.py: move nosec B608 comment to the exact line bandit flags (the first string in the SQL expression, not the last concatenated part) Signed-off-by: Tanvir Farhad <tamimtarafder12@gmail.com> * fix(ci): ruff format compliance and postgres fixture schema correctness - Run ruff format on all modified files (tools.py, ai_provider.py, test_agent_route.py, test_agent_tools_postgres.py); CI runs both ruff check and ruff format --check - Fix postgres integration test fixture: add detected_at (NOT NULL in baseline schema) and finding_key (NOT NULL after f2b6d8e1a4c9 migration) to all findings INSERTs to prevent constraint violations Signed-off-by: Tanvir Farhad <tamimtarafder12@gmail.com> * fix(agent): subscription isolation for explain_finding, compliance framework, false all-clear status Signed-off-by: Tanvir Farhad <tamimtarafder12@gmail.com> * fix(agent): update stale test assertion and tool description after get_findings contract change Signed-off-by: Tanvir Farhad <tamimtarafder12@gmail.com> * style(agent): ruff format explain_finding and suggest_remediation signatures Signed-off-by: Tanvir Farhad <tamimtarafder12@gmail.com> --------- Signed-off-by: Tanvir Farhad <tamimtarafder12@gmail.com> Signed-off-by: Tanvir Farhad <tanvirfarhad007@gmail.com>
* feat: add rule AZ-DB-008 SQL Server minimum TLS version below 1.2
Detects Azure SQL Servers whose minimal_tls_version is missing, an
explicit "None", or below 1.2 ("1.0"/"1.1"), matching the real
azure-mgmt-sql Server model (a plain string, not the TLS1_0-style
enum some other Azure services use).
No numbered CIS Azure Foundations control exists for this specific
setting (verified against the official 2.0.0 control mapping; only
the storage-account minimum TLS control, 3.15, is numbered, and it
does not apply to Microsoft.Sql/servers), so this follows the repo's
existing N/A-* convention like AZ-STOR-006 through AZ-STOR-009.
Closes #246
Signed-off-by: Dipesh Ray <dipesh.ray.g@gmail.com>
* fix(playbook): skip servers whose TLS read fails in fix_az_db_008
The previous '|| echo ""' fallback made a failed 'az sql server show'
(permissions, transient API error) indistinguishable from a server with
no minimum TLS set, so the playbook could update a server without ever
confirming its state. A failed read now reports an error, skips that
server, and makes the script exit non-zero; only a successful read of
an unset/None/below-1.2 value is remediated.
Signed-off-by: Dipesh Ray <dipesh.ray.g@gmail.com>
* feat(scanner): record AZ-DB-008 coverage via evaluate() so a failed inventory is UNKNOWN
AzureClient.get_sql_servers() returns [] on any API failure as well as for
an empty subscription, so scan() alone made an unreadable inventory look
like a clean result. Add evaluate() per the #263 contract: PASS/FAIL per
server, and UNKNOWN (never a pass) when no servers are returned. scan() is
unchanged apart from sharing the finding builder.
Signed-off-by: Dipesh Ray <dipesh.ray.g@gmail.com>
* fix: map AZ-DB-008 to ISO/IEC 27001:2022 A.8.24
dev moved the ISO mapping pack to the 2022 edition after this branch was
opened, so the 2013 control A.10.1.1 is rejected by the 2022 pack tests.
Use A.8.24 (Use of cryptography), matching AZ-DB-003 and AZ-STOR-002, in
both the pack entry and the rule's own FRAMEWORKS.
Signed-off-by: Dipesh Ray <dipesh.ray.g@gmail.com>
* fix(scanner): align AZ-DB-008 with the shared evaluate() contract
dev added tests/test_rule_evaluation_contract.py (#381) after this branch
was opened. It requires a failed inventory to be ERROR, an empty one to be
NOT_APPLICABLE, and a registered PASS/FAIL fixture, so AZ-DB-008 failed
three of its checks once synced with dev.
Add AzureClient.list_sql_servers(), which returns None when the list call
fails (get_sql_servers() stays as the [] wrapper for legacy callers), and
use the shared inventory_unavailable / no_resources_found / fail_findings
helpers. This replaces the earlier UNKNOWN-on-empty workaround, which only
existed because the failure could not be told apart from an empty result.
Evidence now records the inspected minimal_tls_version.
Signed-off-by: Dipesh Ray <dipesh.ray.g@gmail.com>
* fix(package): register AZ-DB-008 in the CLI rule manifest
Signed-off-by: Tanvir Farhad <tamimtarafder12@gmail.com>
---------
Signed-off-by: Dipesh Ray <dipesh.ray.g@gmail.com>
Signed-off-by: Tanvir Farhad <tamimtarafder12@gmail.com>
Co-authored-by: Tanvir Farhad <tamimtarafder12@gmail.com>
* fix(packaging): exclude MCP from the standalone CLI Signed-off-by: Vishnu Ajith <27vishnu07@gmail.com> * fix(scanner): report rules that fail to load Signed-off-by: Vishnu Ajith <27vishnu07@gmail.com> --------- Signed-off-by: Vishnu Ajith <27vishnu07@gmail.com>
* feat(graph): wire post-scan node and edge population into ScanEngine Add node_service, edge_detector, and graph_populator to build the attack-graph node/edge layer from ARG inventory snapshots collected during each scan. graph_populator.populate_graph() is called in worker.py immediately after db.save_scan(), so link_findings_to_nodes can join against the persisted finding rows. New files: - scanner/graph/edge_detector.py – typed edge detectors (NSG, subnet, public IP, identity, storage relationships) - scanner/graph/graph_populator.py – orchestrates node upsert + edge detection + finding linkage in a single dsn-scoped transaction - scanner/graph/node_service.py – upserts graph_nodes and links findings to nodes via finding_graph_nodes - alembic/versions/e2c4a6b8d013_graph_current_scope.py – tracks the explicit current snapshot scope per tenant/subscription Wiring changes: - scanner/worker.py – import populate_graph, call after save_scan - scanner/arg_inventory.py – extend DEFAULT_QUERY with bag_merge so identity is accessible in properties for IdentityToResourceDetector Tests (13 new files covering unit, integration, and Postgres fixtures): - test_graph_edge_detector, test_graph_node_service, test_graph_engine_post_scan, test_graph_populator_postgres, test_graph_populator_subnet_synthesis, test_graph_freshness_postgres, test_graph_freshness_schema, test_graph_detector_failure_postgres, test_feature_stack_ci - test_arg_inventory extended with bag_merge/identity assertions - test_observability parametrized to cover graph-failure path Signed-off-by: Tanvir Farhad <tamimtarafder12@gmail.com> * ci: add feat/** to pull_request.branches so feature PRs receive required checks Signed-off-by: Tanvir Farhad <tamimtarafder12@gmail.com> --------- Signed-off-by: Tanvir Farhad <tamimtarafder12@gmail.com>
* docs: add dashboard and CLI previews Signed-off-by: Vishnu Ajith <27vishnu07@gmail.com> * fix(packaging): limit standalone CLI package discovery Signed-off-by: Vishnu Ajith <27vishnu07@gmail.com> --------- Signed-off-by: Vishnu Ajith <27vishnu07@gmail.com>
* feat(graph): add BFS attack-path traversal and /api/attack-graph endpoints Build the path-computation layer on top of the node/edge graph: New files: - scanner/graph/path_traversal.py – BFS traversal to compute attack paths between graph_nodes, stored in the attack_paths table - api/routes/attack_graph.py – /api/attack-graph endpoints: GET /api/attack-graph/paths (list pre-computed paths) GET /api/attack-graph/paths/<id> (single path with evidence) POST /api/attack-graph/recompute (trigger BFS recomputation) - alembic/versions/f2a3b4c5d6e7_attack_paths.py – attack_paths table - alembic/versions/e2c4a6b8d013_graph_current_scope.py – carried from #353 (graph_current_scope, chains from b7c3d9e2f841 on dev) Also includes the full node/edge population layer from #353: - scanner/graph/edge_detector.py, graph_populator.py, node_service.py Wiring: - api/app.py: register attack_graph_bp - scanner/worker.py: import and call populate_graph after save_scan - scanner/arg_inventory.py: bag_merge identity into properties Tests (13 new files plus updates to test_arg_inventory/test_observability) Signed-off-by: Tanvir Farhad <tamimtarafder12@gmail.com> * fix(graph): publish complete graph and path evidence atomically Signed-off-by: Tanvir Farhad <tamimtarafder12@gmail.com> * ci: verify DCO against the checked-out pull request merge base Signed-off-by: Tanvir Farhad <tamimtarafder12@gmail.com> --------- Signed-off-by: Tanvir Farhad <tamimtarafder12@gmail.com>
Record both prior main release squashes and keep the current dev tree, which contains the corresponding fixes and their later updates. Signed-off-by: Vishnu Ajith <27vishnu07@gmail.com>
## Summary Reconcile the two earlier squash releases on `main` with `dev` so #414 can merge without conflicts. The resolved tree is byte-for-byte identical to the tested `dev` commit `e00614a`. The reconciliation records `a126ae0` as a second parent and removes a duplicate workflow step introduced by the automatic merge. ## Merge method Use **Create a merge commit** to preserve the recorded `main` ancestry. Squash merging will not carry that ancestry to `dev`.
TFT444
marked this pull request as ready for review
November 28, 2026 17:02
TFT444
requested review from
SHAURYAKSHARMA24,
TFT444,
parthrohit22,
ritiksah141 and
vogonPrayas
as code owners
November 28, 2026 17:02
Signed-off-by: Vishnu Ajith <86302373+Vishnu2707@users.noreply.github.com>
## Summary The DCO job on release PR #414 rejects three historical squash commits that lost their original sign-off trailers. The checker now verifies the original certifications using exact landed and source commit IDs. It replays each original PR head onto the landed commit's parent, compares the resulting Git tree to the landed tree, and checks the author identity against the DCO trailer on every source commit outside the parent's history. The release workflow fetches the three original PR refs. A missing source object, replay conflict, different tree, or missing or mismatched source trailer fails verification. The contributor guide documents how to preserve trailers when using squash merge. [DCO failure log](https://github.com/OWASP/openshield/actions/runs/46167990705/job/141049743576) ## Original contribution evidence | PR | Landed squash | Signed source head | GitHub contributor | Matching tree | | --- | --- | --- | --- | --- | | [#321](https://github.com/OWASP/openshield/pull/321/commits) | `90f3fa291be3bfb1ef29e0a599e43dd053cafe80` | `101d47a15337d0ee8242420c33b13e8cbda58994` | Dipesh Ray (@dipeshrayg), 3 signed source commits | `28be3e651bf42c868d5a9c0c08f9d67c07dd8686` | | [#347](https://github.com/OWASP/openshield/pull/347/commits) | `8371ed6907d3eade7fa836938d1c882f4c8b24c8` | `2af0b33f786be171132c3bfe3b9313f53fb93bda` | Muhammad Ibrahim (@m-khan-97), 1 signed source commit | `7856a037992ed072890317234dd5da5451b9b359` | | [#362](https://github.com/OWASP/openshield/pull/362/commits) | `5eec78a24c86e5d68da12cb2ad797fd3f4124c95` | `23d6dfb69ab395700267a4fabb73a49f75092588` | Vishnu Ajith (@Vishnu2707), 1 signed source commit | `28866fa8259ed4b46043cf425627a810bfe8ec63` | Before merging, an independent maintainer should verify the PR heads, contributor identities, source trailers, and tree replay. Use **Create a merge commit** to preserve this PR's own sign-off. ## Verification - All 14 DCO tests passed. Regression cases cover matching evidence, a changed tree, missing source objects, and missing, malformed, or mismatched source trailers. - The checker passed all 82 DCO-eligible commits from official `main` through the corrective commit on official `dev`. It also passed the corrective PR's one-commit range. - Adding an unsigned commit to the release range caused the checker to exit with status 1 and report its SHA.
Contributor
Dependency ReviewThe following issues were found:
|
TFT444
approved these changes
Nov 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Release candidate
Promotes
devtomainafter the release gates pass.mainanddevwhile preserving the changes already shipped onmain.Release promotion is on hold while these items are open.