{
  "__inputs": [
    {
      "name": "DS_INFINITY",
      "label": "Infinity",
      "description": "VAPT Insights Infinity Datasource",
      "type": "datasource",
      "pluginId": "yesoreyeram-infinity-datasource",
      "pluginName": "Infinity"
    }
  ],
  "__elements": {},
  "__requires": [
    {
      "type": "grafana",
      "id": "grafana",
      "name": "Grafana",
      "version": "10.0.0"
    },
    {
      "type": "datasource",
      "id": "yesoreyeram-infinity-datasource",
      "name": "Infinity",
      "version": "2.0.0"
    },
    {
      "type": "panel",
      "id": "stat",
      "name": "Stat",
      "version": ""
    },
    {
      "type": "panel",
      "id": "table",
      "name": "Table",
      "version": ""
    },
    {
      "type": "panel",
      "id": "timeseries",
      "name": "Time series",
      "version": ""
    }
  ],
  "annotations": {
    "list": [
      {
        "builtIn": 1,
        "datasource": {
          "type": "grafana",
          "uid": "-- Grafana --"
        },
        "enable": true,
        "hide": true,
        "name": "Annotations & Alerts",
        "type": "dashboard"
      }
    ]
  },
  "editable": true,
  "fiscalYearStartMonth": 0,
  "graphTooltip": 1,
  "id": null,
  "links": [
    {
      "asDropdown": false,
      "icon": "external link",
      "includeVars": false,
      "keepTime": false,
      "tags": [],
      "targetBlank": true,
      "title": "VAPT Insights Documentation",
      "tooltip": "View complete integration setup guide",
      "type": "link",
      "url": "https://www.vaptinsights.com/docs/integrations/grafana"
    }
  ],
  "liveNow": false,
  "panels": [
    {
      "collapsed": false,
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 0
      },
      "id": 100,
      "title": "Executive Summary & Risk Overview",
      "type": "row"
    },
    {
      "datasource": {
        "type": "yesoreyeram-infinity-datasource",
        "uid": "${datasource}"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "blue",
                "value": null
              }
            ]
          }
        },
        "overrides": []
      },
      "gridPos": {
        "h": 4,
        "w": 6,
        "x": 0,
        "y": 1
      },
      "id": 1,
      "options": {
        "colorMode": "value",
        "graphMode": "none",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "repositories",
          "values": false
        },
        "textMode": "auto"
      },
      "pluginVersion": "10.4.1",
      "targets": [
        {
          "columns": [],
          "datasource": {
            "type": "yesoreyeram-infinity-datasource",
            "uid": "${datasource}"
          },
          "filters": [],
          "format": "table",
          "global_query_id": "",
          "refId": "A",
          "root_selector": "summary",
          "source": "url",
          "type": "json",
          "url": "/api/v1/public/projects/${project_id}/metrics/sbom?repository=${repository}",
          "url_options": {
            "method": "GET"
          }
        }
      ],
      "title": "Active Repositories",
      "type": "stat"
    },
    {
      "datasource": {
        "type": "yesoreyeram-infinity-datasource",
        "uid": "${datasource}"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 1
              }
            ]
          }
        },
        "overrides": []
      },
      "gridPos": {
        "h": 4,
        "w": 6,
        "x": 6,
        "y": 1
      },
      "id": 2,
      "options": {
        "colorMode": "value",
        "graphMode": "none",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "critical",
          "values": false
        },
        "textMode": "auto"
      },
      "pluginVersion": "10.4.1",
      "targets": [
        {
          "columns": [],
          "datasource": {
            "type": "yesoreyeram-infinity-datasource",
            "uid": "${datasource}"
          },
          "filters": [],
          "format": "table",
          "global_query_id": "",
          "refId": "A",
          "root_selector": "summary",
          "source": "url",
          "type": "json",
          "url": "/api/v1/public/projects/${project_id}/metrics/sbom?repository=${repository}",
          "url_options": {
            "method": "GET"
          }
        }
      ],
      "title": "🚨 Critical Vulnerabilities",
      "type": "stat"
    },
    {
      "datasource": {
        "type": "yesoreyeram-infinity-datasource",
        "uid": "${datasource}"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "orange",
                "value": 1
              }
            ]
          }
        },
        "overrides": []
      },
      "gridPos": {
        "h": 4,
        "w": 6,
        "x": 12,
        "y": 1
      },
      "id": 3,
      "options": {
        "colorMode": "value",
        "graphMode": "none",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "high",
          "values": false
        },
        "textMode": "auto"
      },
      "pluginVersion": "10.4.1",
      "targets": [
        {
          "columns": [],
          "datasource": {
            "type": "yesoreyeram-infinity-datasource",
            "uid": "${datasource}"
          },
          "filters": [],
          "format": "table",
          "global_query_id": "",
          "refId": "A",
          "root_selector": "summary",
          "source": "url",
          "type": "json",
          "url": "/api/v1/public/projects/${project_id}/metrics/sbom?repository=${repository}",
          "url_options": {
            "method": "GET"
          }
        }
      ],
      "title": "⚠️ High Vulnerabilities",
      "type": "stat"
    },
    {
      "datasource": {
        "type": "yesoreyeram-infinity-datasource",
        "uid": "${datasource}"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "yellow",
                "value": 1
              },
              {
                "color": "red",
                "value": 20
              }
            ]
          }
        },
        "overrides": []
      },
      "gridPos": {
        "h": 4,
        "w": 6,
        "x": 18,
        "y": 1
      },
      "id": 4,
      "options": {
        "colorMode": "value",
        "graphMode": "none",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "total_vulnerabilities",
          "values": false
        },
        "textMode": "auto"
      },
      "pluginVersion": "10.4.1",
      "targets": [
        {
          "columns": [],
          "datasource": {
            "type": "yesoreyeram-infinity-datasource",
            "uid": "${datasource}"
          },
          "filters": [],
          "format": "table",
          "global_query_id": "",
          "refId": "A",
          "root_selector": "summary",
          "source": "url",
          "type": "json",
          "url": "/api/v1/public/projects/${project_id}/metrics/sbom?repository=${repository}",
          "url_options": {
            "method": "GET"
          }
        }
      ],
      "title": "Total Vulnerabilities",
      "type": "stat"
    },
    {
      "collapsed": false,
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 5
      },
      "id": 101,
      "title": "Repository Risk Breakdown",
      "type": "row"
    },
    {
      "datasource": {
        "type": "yesoreyeram-infinity-datasource",
        "uid": "${datasource}"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "custom": {
            "align": "auto",
            "cellOptions": {
              "type": "auto"
            },
            "inspect": false
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              }
            ]
          }
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "summary.critical"
            },
            "properties": [
              {
                "id": "custom.cellOptions",
                "value": {
                  "mode": "gradient",
                  "type": "color-background"
                }
              },
              {
                "id": "thresholds",
                "value": {
                  "mode": "absolute",
                  "steps": [
                    { "color": "transparent", "value": null },
                    { "color": "dark-red", "value": 1 }
                  ]
                }
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "summary.high"
            },
            "properties": [
              {
                "id": "custom.cellOptions",
                "value": {
                  "mode": "gradient",
                  "type": "color-background"
                }
              },
              {
                "id": "thresholds",
                "value": {
                  "mode": "absolute",
                  "steps": [
                    { "color": "transparent", "value": null },
                    { "color": "semi-dark-orange", "value": 1 }
                  ]
                }
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 8,
        "w": 24,
        "x": 0,
        "y": 6
      },
      "id": 5,
      "options": {
        "cellHeight": "sm",
        "footer": {
          "countRows": false,
          "fields": "",
          "reducer": [
            "sum"
          ],
          "show": false
        },
        "showHeader": true,
        "sortBy": [
          {
            "desc": true,
            "displayName": "summary.critical"
          }
        ]
      },
      "pluginVersion": "10.4.1",
      "targets": [
        {
          "columns": [
            { "selector": "name", "text": "Repository", "type": "string" },
            { "selector": "branch", "text": "Branch", "type": "string" },
            { "selector": "total_dependencies", "text": "Dependencies", "type": "number" },
            { "selector": "summary.critical", "text": "Critical", "type": "number" },
            { "selector": "summary.high", "text": "High", "type": "number" },
            { "selector": "summary.medium", "text": "Medium", "type": "number" },
            { "selector": "summary.low", "text": "Low", "type": "number" },
            { "selector": "summary.total", "text": "Total Issues", "type": "number" },
            { "selector": "updated_at", "text": "Last Scanned", "type": "timestamp" }
          ],
          "datasource": {
            "type": "yesoreyeram-infinity-datasource",
            "uid": "${datasource}"
          },
          "filters": [],
          "format": "table",
          "global_query_id": "",
          "refId": "A",
          "root_selector": "repositories",
          "source": "url",
          "type": "json",
          "url": "/api/v1/public/projects/${project_id}/metrics/sbom?repository=${repository}",
          "url_options": {
            "method": "GET"
          }
        }
      ],
      "title": "Repositories Security Matrix",
      "type": "table"
    },
    {
      "collapsed": false,
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 14
      },
      "id": 102,
      "title": "30-Day Vulnerability Trends",
      "type": "row"
    },
    {
      "datasource": {
        "type": "yesoreyeram-infinity-datasource",
        "uid": "${datasource}"
      },
      "fieldConfig": {
        "defaults": {
          "custom": {
            "drawStyle": "line",
            "lineInterpolation": "smooth",
            "lineWidth": 2,
            "pointSize": 5,
            "showPoints": "auto",
            "spanNulls": false
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              }
            ]
          }
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "Critical"
            },
            "properties": [
              {
                "id": "color",
                "value": { "fixedColor": "red", "mode": "fixed" }
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "High"
            },
            "properties": [
              {
                "id": "color",
                "value": { "fixedColor": "orange", "mode": "fixed" }
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Medium"
            },
            "properties": [
              {
                "id": "color",
                "value": { "fixedColor": "yellow", "mode": "fixed" }
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Total"
            },
            "properties": [
              {
                "id": "color",
                "value": { "fixedColor": "blue", "mode": "fixed" }
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 8,
        "w": 24,
        "x": 0,
        "y": 15
      },
      "id": 6,
      "options": {
        "legend": {
          "calcs": [],
          "displayMode": "list",
          "placement": "bottom",
          "showLegend": true
        },
        "tooltip": {
          "mode": "multi",
          "sort": "desc"
        }
      },
      "pluginVersion": "10.4.1",
      "targets": [
        {
          "columns": [
            { "selector": "date", "text": "Time", "type": "timestamp" },
            { "selector": "total", "text": "Total", "type": "number" },
            { "selector": "critical", "text": "Critical", "type": "number" },
            { "selector": "high", "text": "High", "type": "number" },
            { "selector": "medium", "text": "Medium", "type": "number" },
            { "selector": "low", "text": "Low", "type": "number" }
          ],
          "datasource": {
            "type": "yesoreyeram-infinity-datasource",
            "uid": "${datasource}"
          },
          "filters": [],
          "format": "timeseries",
          "global_query_id": "",
          "refId": "A",
          "root_selector": "trends",
          "source": "url",
          "type": "json",
          "url": "/api/v1/public/projects/${project_id}/metrics/sbom?repository=${repository}",
          "url_options": {
            "method": "GET"
          }
        }
      ],
      "title": "Vulnerability Resolution Trends (30 Days)",
      "type": "timeseries"
    }
  ],
  "refresh": "1m",
  "schemaVersion": 39,
  "tags": [
    "security",
    "vaptinsights",
    "sbom",
    "vulnerabilities"
  ],
  "templating": {
    "list": [
      {
        "current": {
          "selected": false,
          "value": "infinity"
        },
        "hide": 0,
        "includeAll": false,
        "label": "Data Source",
        "multi": false,
        "name": "datasource",
        "options": [],
        "query": "yesoreyeram-infinity-datasource",
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "type": "datasource"
      },
      {
        "current": {
          "selected": false,
          "value": ""
        },
        "description": "VAPT Insights Project ID (UUID)",
        "hide": 0,
        "label": "Project ID",
        "name": "project_id",
        "options": [
          {
            "selected": true,
            "text": "PROJECT_ID",
            "value": "PROJECT_ID"
          }
        ],
        "query": "PROJECT_ID",
        "skipUrlSync": false,
        "type": "textbox"
      },
      {
        "allValue": "",
        "current": {
          "selected": true,
          "text": "All",
          "value": "$__all"
        },
        "datasource": {
          "type": "yesoreyeram-infinity-datasource",
          "uid": "${datasource}"
        },
        "definition": "",
        "description": "Auto-populated repository filter (defaults to All)",
        "hide": 0,
        "includeAll": true,
        "label": "Repository",
        "multi": false,
        "name": "repository",
        "options": [],
        "query": {
          "infinityQuery": {
            "columns": [
              {
                "selector": "name",
                "text": "name",
                "type": "string"
              }
            ],
            "filters": [],
            "format": "table",
            "global_query_id": "",
            "refId": "variable-query",
            "root_selector": "repositories",
            "source": "url",
            "type": "json",
            "url": "/api/v1/public/projects/${project_id}/metrics/sbom",
            "url_options": {
              "method": "GET"
            }
          },
          "query": "",
          "queryType": "infinity"
        },
        "refresh": 2,
        "regex": "",
        "skipUrlSync": false,
        "sort": 1,
        "type": "query"
      }
    ]
  },
  "time": {
    "from": "now-30d",
    "to": "now"
  },
  "timepicker": {
    "refresh_intervals": [
      "30s",
      "1m",
      "5m",
      "15m",
      "1h"
    ]
  },
  "timezone": "browser",
  "title": "VAPT Insights • SBOM Security Posture",
  "uid": "vaptinsights-sbom",
  "version": 1,
  "weekStart": ""
}
