tem/session/tssl_certificate.sql

              SELECT 'dynamic' AS component, sqlpage.run_sql('shell/shell.sql') AS properties;
              -- not including breadcrumbs from sqlpage_aide_navigation
              -- not including page title from sqlpage_aide_navigation
              

              SELECT 'title' AS component, (SELECT COALESCE(title, caption)
    FROM sqlpage_aide_navigation
   WHERE namespace = 'prime' AND path = 'tem/session/tssl_certificate.sql/index.sql') as contents;
    ;
  --- Display breadcrumb
   SELECT 'breadcrumb' AS component;
      SELECT 'Home' AS title,
          sqlpage.environment_variable('SQLPAGE_SITE_PREFIX') || '/' AS link;
      SELECT 'Threat Exposure Management' AS title,
          sqlpage.environment_variable('SQLPAGE_SITE_PREFIX') || '/tem/index.sql' AS link;  
      SELECT 'Attack Surface Mapping By Session' AS title,
          sqlpage.environment_variable('SQLPAGE_SITE_PREFIX') || '/tem/attack_surface_mapping_session.sql' AS link;
      SELECT 'Findings' AS title,
          sqlpage.environment_variable('SQLPAGE_SITE_PREFIX') || '/tem/session/finding.sql?session_id=' || $session_id AS link;
  SELECT 'TestSSL Report' AS title,
      '#' AS link;

  --- Dsply Page Title
  SELECT
    'title'   as component,
    'TestSSL Report' as contents;

  SELECT
    'text'              as component,
    'The TestSSL Report provides a comprehensive overview of the SSL/TLS security posture of scanned hosts. It consolidates findings from server configurations, supported protocols, cipher suites, forward secrecy settings, HTTP headers, browser simulations, vulnerabilities, and overall ratings into a structured and easily interpretable format. Each entry includes a unique identifier, severity level, and descriptive details, allowing security teams to quickly identify and prioritize issues. The report helps organizations assess compliance with best practices, track security improvements over time, and make informed decisions to strengthen their SSL/TLS configurations, ensuring robust protection for web applications and client connections.' as contents;
  
   SELECT 'table' AS component,
    TRUE AS sort,
    TRUE AS search,
    'Host' as markdown;

SET total_rows = (SELECT COUNT(*) FROM tem_testssl_general WHERE tenant_id = $tenant_id);
SET limit = COALESCE($limit, 50);
SET offset = COALESCE($offset, 0);
SET total_pages = ($total_rows + $limit - 1) / $limit;
SET current_page = ($offset / $limit) + 1;
SELECT
     '[' || host || '](' || sqlpage.environment_variable('SQLPAGE_SITE_PREFIX') || '/tem/session/tssl_certificate_inner.sql?component=tab&tab=pretests&uniform_resource_id=' || uniform_resource_id ||'&session_id='||$session_id||')' as Host,
    datetime(start_time, 'unixepoch') AS "start time",
    ip,
    port,
    rdns,
    tenant_name  AS "Tenant"
FROM tem_testssl_general
WHERE ur_ingest_session_id = $session_id;

SELECT 'text' AS component,
    (SELECT CASE WHEN CAST($current_page AS INTEGER) > 1 THEN '[Previous](?limit=' || $limit || '&offset=' || ($offset - $limit) || COALESCE('&session_id=' || replace($session_id, ' ', '%20'), '') || ')' ELSE '' END)
    || ' '
    || '(Page ' || $current_page || ' of ' || $total_pages || ") "
    || (SELECT CASE WHEN CAST($current_page AS INTEGER) < CAST($total_pages AS INTEGER) THEN '[Next](?limit=' || $limit || '&offset=' || ($offset + $limit) || COALESCE('&session_id=' || replace($session_id, ' ', '%20'), '') || ')' ELSE '' END)
    AS contents_md
;
        ;