@x12i/map-store-playground 0.1.2 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -38,3 +38,5 @@ createPlaygroundServer({
38
38
  ```
39
39
 
40
40
  Product-specific catalogs (e.g. Synapix UI flows / how-to guides) stay in the consumer app.
41
+
42
+ The **Tenant queries** group holds the two POST routes the Pre-AI pages use on top of the working products: `findings:query` (scanner severity, CVSS, KEV, EPSS) and `vulnerabilities:briefing` (ranked CVE hubs). Both take the covering pair from `working/bootstrap`. The matching client calls are `queryFindings` and `fetchVulnerabilitiesBriefing` in `@x12i/map-store-client`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@x12i/map-store-playground",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "Map-store /map-store/v1 catalog and response previews for @x12i/api-playground",
5
5
  "type": "module",
6
6
  "license": "UNLICENSED",
package/src/catalog.js CHANGED
@@ -11,6 +11,7 @@ export const groups = [
11
11
  { id: "objects", label: "Objects" },
12
12
  { id: "investigation", label: "Investigation packets" },
13
13
  { id: "counts", label: "Counts (Countex)" },
14
+ { id: "queries", label: "Tenant queries" },
14
15
  { id: "advanced", label: "Advanced / lab" },
15
16
  ];
16
17
 
@@ -778,4 +779,116 @@ export const endpoints = [
778
779
  responseViews: ["json"],
779
780
  submitLabel: "Fetch (lab only)",
780
781
  }),
782
+
783
+ ep({
784
+ id: "findings-query",
785
+ group: "queries",
786
+ name: "Findings query",
787
+ method: "POST",
788
+ path: "/map-store/v1/tenants/{tenant}/findings:query",
789
+ family: "queries",
790
+ summary: "Scanner fields for the open vulnerability findings of one covering pair.",
791
+ purpose:
792
+ "Severity, CVSS, KEV, EPSS, and the vendor description for the open vulnerability findings. The catalog joins these onto the walked findings-query rows by finding id and by CVE id.",
793
+ useWhen: ["Vulnerability catalog rows", "CVE panel scanner facts"],
794
+ avoidWhen: ["Do not send current, latest, or scs:… as pins", HONESTY.opaqueTokens],
795
+ internalFlow: [
796
+ { title: "Pin", description: "snapshotSetId and analysisSnapshotId come from the session bootstrap." },
797
+ { title: "Query", description: "Open vulnerability findings, JSON, up to the limit." },
798
+ ],
799
+ requestUi: {
800
+ tenant: {
801
+ label: "tenant",
802
+ description: "Tenant segment. The Pre-AI app sends tgi.",
803
+ section: "primary",
804
+ order: 1,
805
+ required: true,
806
+ type: "path",
807
+ default: "tgi",
808
+ },
809
+ body: {
810
+ label: "JSON body",
811
+ description: "Covering pair from bootstrap, plus the open vulnerability filter.",
812
+ section: "primary",
813
+ order: 2,
814
+ required: true,
815
+ type: "json",
816
+ example: JSON.stringify(
817
+ {
818
+ snapshotSetId: "ss:…",
819
+ analysisSnapshotId: "as:…",
820
+ status: "open",
821
+ findingType: "vulnerability",
822
+ format: "json",
823
+ limit: 200,
824
+ },
825
+ null,
826
+ 2
827
+ ),
828
+ },
829
+ },
830
+ inputs: [
831
+ { name: "tenant", required: true, meaning: "Tenant id", type: "path", default: "tgi" },
832
+ { name: "body", required: true, meaning: "Findings query body", type: "json" },
833
+ ],
834
+ responseDescription: "items[] of findings with severity, cvssScore, kevListed, epss, exprtRating, description, descriptionStatus.",
835
+ responseViews: ["preview", "json"],
836
+ submitLabel: "Run query",
837
+ }),
838
+
839
+ ep({
840
+ id: "vulnerabilities-briefing",
841
+ group: "queries",
842
+ name: "Vulnerabilities briefing",
843
+ method: "POST",
844
+ path: "/map-store/v1/tenants/{tenant}/vulnerabilities:briefing",
845
+ family: "queries",
846
+ summary: "Ranked CVE hubs for one covering pair.",
847
+ purpose:
848
+ "relevantCriticals[] ranked by host count, plus gaps. The CVE catalog paints these before the walked cve-catalog and the bundled CVE text. A gap id of gap:soes:cve-name-unavailable means the vendor gave no description.",
849
+ useWhen: ["CVE board", "CVE panel header"],
850
+ avoidWhen: ["Do not invent a description when descriptionStatus is VENDOR_NOT_PROVIDED"],
851
+ internalFlow: [
852
+ { title: "Pin", description: "snapshotSetId and analysisSnapshotId come from the session bootstrap." },
853
+ { title: "Brief", description: "Open vulnerability findings, rolled up to the relevant criticals." },
854
+ ],
855
+ requestUi: {
856
+ tenant: {
857
+ label: "tenant",
858
+ description: "Tenant segment. The Pre-AI app sends tgi.",
859
+ section: "primary",
860
+ order: 1,
861
+ required: true,
862
+ type: "path",
863
+ default: "tgi",
864
+ },
865
+ body: {
866
+ label: "JSON body",
867
+ description: "Covering pair from bootstrap, plus how many hubs to return.",
868
+ section: "primary",
869
+ order: 2,
870
+ required: true,
871
+ type: "json",
872
+ example: JSON.stringify(
873
+ {
874
+ snapshotSetId: "ss:…",
875
+ analysisSnapshotId: "as:…",
876
+ status: "open",
877
+ findingType: "vulnerability",
878
+ format: "json",
879
+ relevantLimit: 10,
880
+ },
881
+ null,
882
+ 2
883
+ ),
884
+ },
885
+ },
886
+ inputs: [
887
+ { name: "tenant", required: true, meaning: "Tenant id", type: "path", default: "tgi" },
888
+ { name: "body", required: true, meaning: "Briefing body", type: "json" },
889
+ ],
890
+ responseDescription: "briefing.relevantCriticals[] and briefing.gaps[].",
891
+ responseViews: ["preview", "json"],
892
+ submitLabel: "Run briefing",
893
+ }),
781
894
  ];