@kwirthmagnify/kwirth-plugin-trivy 0.2.18 → 0.2.19

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.
Files changed (3) hide show
  1. package/back.js +11 -1
  2. package/front.js +13 -1
  3. package/package.json +1 -1
package/back.js CHANGED
@@ -58,6 +58,14 @@ __export(index_exports, {
58
58
  module.exports = __toCommonJS(index_exports);
59
59
  var import_kwirth_common = __toESM(require_kwirth_common(), 1);
60
60
  var import_kwirth_common_back = __toESM(require_kwirth_common_back(), 1);
61
+
62
+ // src/common/TrivyTypes.ts
63
+ var TRIVY_SCOPES = [
64
+ { scope: "trivy$workload" /* WORKLOAD */, label: "Trivy \xB7 Workload", description: "Access workload-scoped reports (vulnerabilities, config audit, secrets)" },
65
+ { scope: "trivy$kubernetes" /* KUBERNETES */, label: "Trivy \xB7 Kubernetes", description: "Access cluster-scoped reports (RBAC, infra assessment)" }
66
+ ];
67
+
68
+ // src/back/index.ts
61
69
  var import_zlib = __toESM(require("zlib"), 1);
62
70
  var import_trivy_operator_0_30_1 = __toESM(require_trivy_operator_0_30_1(), 1);
63
71
  var trivyOperatorYaml = import_zlib.default.gunzipSync(Buffer.from(import_trivy_operator_0_30_1.default, "base64")).toString("utf-8");
@@ -86,7 +94,9 @@ var TrivyChannel = class {
86
94
  cluster: false,
87
95
  resourced: true
88
96
  });
89
- this.getChannelScopeLevel = (scope) => ["", "trivy$workload", "trivy$kubernetes", "cluster"].indexOf(scope);
97
+ this.getChannelScopeLevel = (scope) => ["", "trivy$workload" /* WORKLOAD */, "trivy$kubernetes" /* KUBERNETES */, "cluster"].indexOf(scope);
98
+ this.getScopeCatalog = () => TRIVY_SCOPES;
99
+ // RBAC: scopes que declara Trivy (validar/gestionar)
90
100
  this.startChannel = async () => {
91
101
  this.clusterInfo.addSubscriber("trivy", this, { reportTypes: ALL_PLURALS });
92
102
  };
package/front.js CHANGED
@@ -300,6 +300,14 @@
300
300
  var import_material8 = __toESM(require_material(), 1);
301
301
  var import_icons_material6 = __toESM(require_icons_material(), 1);
302
302
  var import_kwirth_common = __toESM(require_kwirth_common(), 1);
303
+
304
+ // src/common/TrivyTypes.ts
305
+ var TRIVY_SCOPES = [
306
+ { scope: "trivy$workload" /* WORKLOAD */, label: "Trivy \xB7 Workload", description: "Access workload-scoped reports (vulnerabilities, config audit, secrets)" },
307
+ { scope: "trivy$kubernetes" /* KUBERNETES */, label: "Trivy \xB7 Kubernetes", description: "Access cluster-scoped reports (RBAC, infra assessment)" }
308
+ ];
309
+
310
+ // src/front/components/TrivyTabContentAsset.tsx
303
311
  var getTotalIssues = (trivyInstanceConfig, plural, asset) => {
304
312
  let sum = asset[plural]?.report?.summary;
305
313
  let c = trivyInstanceConfig.ignoreCritical ? 0 : sum?.criticalCount;
@@ -556,8 +564,12 @@
556
564
  };
557
565
  }
558
566
  getScope() {
559
- return "trivy$workload";
567
+ return "trivy$workload" /* WORKLOAD */;
568
+ }
569
+ getScopeCatalog() {
570
+ return TRIVY_SCOPES;
560
571
  }
572
+ // RBAC: scopes que declara Trivy (para el editor de seguridad)
561
573
  getChannelIcon() {
562
574
  return TrivyIcon;
563
575
  }
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "id": "trivy",
5
5
  "name": "@kwirthmagnify/kwirth-plugin-trivy",
6
6
  "displayName": "Trivy",
7
- "version": "0.2.18",
7
+ "version": "0.2.19",
8
8
  "description": "Trivy security scanning channel plugin for Kwirth",
9
9
  "icon": "VerifiedUser",
10
10
  "website": "https://kwirthmagnify.dev"