@cdot65/prisma-airs-cli 1.0.0

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 (234) hide show
  1. package/README.md +42 -0
  2. package/dist/airs/management.d.ts +58 -0
  3. package/dist/airs/management.d.ts.map +1 -0
  4. package/dist/airs/management.js +287 -0
  5. package/dist/airs/management.js.map +1 -0
  6. package/dist/airs/modelsecurity.d.ts +74 -0
  7. package/dist/airs/modelsecurity.d.ts.map +1 -0
  8. package/dist/airs/modelsecurity.js +337 -0
  9. package/dist/airs/modelsecurity.js.map +1 -0
  10. package/dist/airs/promptsets.d.ts +50 -0
  11. package/dist/airs/promptsets.d.ts.map +1 -0
  12. package/dist/airs/promptsets.js +133 -0
  13. package/dist/airs/promptsets.js.map +1 -0
  14. package/dist/airs/redteam.d.ts +45 -0
  15. package/dist/airs/redteam.d.ts.map +1 -0
  16. package/dist/airs/redteam.js +219 -0
  17. package/dist/airs/redteam.js.map +1 -0
  18. package/dist/airs/runtime.d.ts +27 -0
  19. package/dist/airs/runtime.d.ts.map +1 -0
  20. package/dist/airs/runtime.js +158 -0
  21. package/dist/airs/runtime.js.map +1 -0
  22. package/dist/airs/scanner.d.ts +22 -0
  23. package/dist/airs/scanner.d.ts.map +1 -0
  24. package/dist/airs/scanner.js +62 -0
  25. package/dist/airs/scanner.js.map +1 -0
  26. package/dist/airs/types.d.ts +683 -0
  27. package/dist/airs/types.d.ts.map +1 -0
  28. package/dist/airs/types.js +6 -0
  29. package/dist/airs/types.js.map +1 -0
  30. package/dist/audit/evaluator.d.ts +17 -0
  31. package/dist/audit/evaluator.d.ts.map +1 -0
  32. package/dist/audit/evaluator.js +82 -0
  33. package/dist/audit/evaluator.js.map +1 -0
  34. package/dist/audit/report.d.ts +38 -0
  35. package/dist/audit/report.d.ts.map +1 -0
  36. package/dist/audit/report.js +141 -0
  37. package/dist/audit/report.js.map +1 -0
  38. package/dist/audit/runner.d.ts +18 -0
  39. package/dist/audit/runner.d.ts.map +1 -0
  40. package/dist/audit/runner.js +60 -0
  41. package/dist/audit/runner.js.map +1 -0
  42. package/dist/audit/types.d.ts +53 -0
  43. package/dist/audit/types.d.ts.map +1 -0
  44. package/dist/audit/types.js +5 -0
  45. package/dist/audit/types.js.map +1 -0
  46. package/dist/cli/bulk-scan-state.d.ts +15 -0
  47. package/dist/cli/bulk-scan-state.d.ts.map +1 -0
  48. package/dist/cli/bulk-scan-state.js +20 -0
  49. package/dist/cli/bulk-scan-state.js.map +1 -0
  50. package/dist/cli/commands/audit.d.ts +4 -0
  51. package/dist/cli/commands/audit.d.ts.map +1 -0
  52. package/dist/cli/commands/audit.js +113 -0
  53. package/dist/cli/commands/audit.js.map +1 -0
  54. package/dist/cli/commands/generate.d.ts +4 -0
  55. package/dist/cli/commands/generate.d.ts.map +1 -0
  56. package/dist/cli/commands/generate.js +231 -0
  57. package/dist/cli/commands/generate.js.map +1 -0
  58. package/dist/cli/commands/list.d.ts +4 -0
  59. package/dist/cli/commands/list.d.ts.map +1 -0
  60. package/dist/cli/commands/list.js +23 -0
  61. package/dist/cli/commands/list.js.map +1 -0
  62. package/dist/cli/commands/modelsecurity.d.ts +4 -0
  63. package/dist/cli/commands/modelsecurity.d.ts.map +1 -0
  64. package/dist/cli/commands/modelsecurity.js +499 -0
  65. package/dist/cli/commands/modelsecurity.js.map +1 -0
  66. package/dist/cli/commands/redteam.d.ts +4 -0
  67. package/dist/cli/commands/redteam.d.ts.map +1 -0
  68. package/dist/cli/commands/redteam.js +630 -0
  69. package/dist/cli/commands/redteam.js.map +1 -0
  70. package/dist/cli/commands/report.d.ts +4 -0
  71. package/dist/cli/commands/report.d.ts.map +1 -0
  72. package/dist/cli/commands/report.js +116 -0
  73. package/dist/cli/commands/report.js.map +1 -0
  74. package/dist/cli/commands/resume.d.ts +4 -0
  75. package/dist/cli/commands/resume.d.ts.map +1 -0
  76. package/dist/cli/commands/resume.js +138 -0
  77. package/dist/cli/commands/resume.js.map +1 -0
  78. package/dist/cli/commands/runtime.d.ts +3 -0
  79. package/dist/cli/commands/runtime.d.ts.map +1 -0
  80. package/dist/cli/commands/runtime.js +582 -0
  81. package/dist/cli/commands/runtime.js.map +1 -0
  82. package/dist/cli/index.d.ts +3 -0
  83. package/dist/cli/index.d.ts.map +1 -0
  84. package/dist/cli/index.js +46 -0
  85. package/dist/cli/index.js.map +1 -0
  86. package/dist/cli/parse-input.d.ts +9 -0
  87. package/dist/cli/parse-input.d.ts.map +1 -0
  88. package/dist/cli/parse-input.js +109 -0
  89. package/dist/cli/parse-input.js.map +1 -0
  90. package/dist/cli/prompts.d.ts +9 -0
  91. package/dist/cli/prompts.d.ts.map +1 -0
  92. package/dist/cli/prompts.js +90 -0
  93. package/dist/cli/prompts.js.map +1 -0
  94. package/dist/cli/renderer/audit.d.ts +8 -0
  95. package/dist/cli/renderer/audit.d.ts.map +1 -0
  96. package/dist/cli/renderer/audit.js +44 -0
  97. package/dist/cli/renderer/audit.js.map +1 -0
  98. package/dist/cli/renderer/common.d.ts +3 -0
  99. package/dist/cli/renderer/common.d.ts.map +1 -0
  100. package/dist/cli/renderer/common.js +6 -0
  101. package/dist/cli/renderer/common.js.map +1 -0
  102. package/dist/cli/renderer/generate.d.ts +29 -0
  103. package/dist/cli/renderer/generate.d.ts.map +1 -0
  104. package/dist/cli/renderer/generate.js +132 -0
  105. package/dist/cli/renderer/generate.js.map +1 -0
  106. package/dist/cli/renderer/index.d.ts +7 -0
  107. package/dist/cli/renderer/index.d.ts.map +1 -0
  108. package/dist/cli/renderer/index.js +7 -0
  109. package/dist/cli/renderer/index.js.map +1 -0
  110. package/dist/cli/renderer/modelsecurity.d.ts +34 -0
  111. package/dist/cli/renderer/modelsecurity.d.ts.map +1 -0
  112. package/dist/cli/renderer/modelsecurity.js +285 -0
  113. package/dist/cli/renderer/modelsecurity.js.map +1 -0
  114. package/dist/cli/renderer/redteam.d.ts +152 -0
  115. package/dist/cli/renderer/redteam.d.ts.map +1 -0
  116. package/dist/cli/renderer/redteam.js +294 -0
  117. package/dist/cli/renderer/redteam.js.map +1 -0
  118. package/dist/cli/renderer/runtime.d.ts +87 -0
  119. package/dist/cli/renderer/runtime.d.ts.map +1 -0
  120. package/dist/cli/renderer/runtime.js +230 -0
  121. package/dist/cli/renderer/runtime.js.map +1 -0
  122. package/dist/config/loader.d.ts +3 -0
  123. package/dist/config/loader.d.ts.map +1 -0
  124. package/dist/config/loader.js +65 -0
  125. package/dist/config/loader.js.map +1 -0
  126. package/dist/config/schema.d.ts +78 -0
  127. package/dist/config/schema.d.ts.map +1 -0
  128. package/dist/config/schema.js +44 -0
  129. package/dist/config/schema.js.map +1 -0
  130. package/dist/core/constraints.d.ts +18 -0
  131. package/dist/core/constraints.d.ts.map +1 -0
  132. package/dist/core/constraints.js +75 -0
  133. package/dist/core/constraints.js.map +1 -0
  134. package/dist/core/loop.d.ts +54 -0
  135. package/dist/core/loop.d.ts.map +1 -0
  136. package/dist/core/loop.js +462 -0
  137. package/dist/core/loop.js.map +1 -0
  138. package/dist/core/metrics.d.ts +13 -0
  139. package/dist/core/metrics.d.ts.map +1 -0
  140. package/dist/core/metrics.js +73 -0
  141. package/dist/core/metrics.js.map +1 -0
  142. package/dist/core/types.d.ts +175 -0
  143. package/dist/core/types.d.ts.map +1 -0
  144. package/dist/core/types.js +5 -0
  145. package/dist/core/types.js.map +1 -0
  146. package/dist/index.d.ts +35 -0
  147. package/dist/index.d.ts.map +1 -0
  148. package/dist/index.js +49 -0
  149. package/dist/index.js.map +1 -0
  150. package/dist/llm/prompts/analyze-results.d.ts +3 -0
  151. package/dist/llm/prompts/analyze-results.d.ts.map +1 -0
  152. package/dist/llm/prompts/analyze-results.js +52 -0
  153. package/dist/llm/prompts/analyze-results.js.map +1 -0
  154. package/dist/llm/prompts/generate-companion.d.ts +3 -0
  155. package/dist/llm/prompts/generate-companion.d.ts.map +1 -0
  156. package/dist/llm/prompts/generate-companion.js +42 -0
  157. package/dist/llm/prompts/generate-companion.js.map +1 -0
  158. package/dist/llm/prompts/generate-tests.d.ts +3 -0
  159. package/dist/llm/prompts/generate-tests.d.ts.map +1 -0
  160. package/dist/llm/prompts/generate-tests.js +46 -0
  161. package/dist/llm/prompts/generate-tests.js.map +1 -0
  162. package/dist/llm/prompts/generate-topic.d.ts +4 -0
  163. package/dist/llm/prompts/generate-topic.d.ts.map +1 -0
  164. package/dist/llm/prompts/generate-topic.js +41 -0
  165. package/dist/llm/prompts/generate-topic.js.map +1 -0
  166. package/dist/llm/prompts/improve-topic.d.ts +3 -0
  167. package/dist/llm/prompts/improve-topic.d.ts.map +1 -0
  168. package/dist/llm/prompts/improve-topic.js +77 -0
  169. package/dist/llm/prompts/improve-topic.js.map +1 -0
  170. package/dist/llm/prompts/simplify-topic.d.ts +3 -0
  171. package/dist/llm/prompts/simplify-topic.d.ts.map +1 -0
  172. package/dist/llm/prompts/simplify-topic.js +50 -0
  173. package/dist/llm/prompts/simplify-topic.js.map +1 -0
  174. package/dist/llm/provider.d.ts +21 -0
  175. package/dist/llm/provider.d.ts.map +1 -0
  176. package/dist/llm/provider.js +76 -0
  177. package/dist/llm/provider.js.map +1 -0
  178. package/dist/llm/schemas.d.ts +97 -0
  179. package/dist/llm/schemas.d.ts.map +1 -0
  180. package/dist/llm/schemas.js +24 -0
  181. package/dist/llm/schemas.js.map +1 -0
  182. package/dist/llm/service.d.ts +30 -0
  183. package/dist/llm/service.d.ts.map +1 -0
  184. package/dist/llm/service.js +273 -0
  185. package/dist/llm/service.js.map +1 -0
  186. package/dist/memory/diff.d.ts +4 -0
  187. package/dist/memory/diff.d.ts.map +1 -0
  188. package/dist/memory/diff.js +24 -0
  189. package/dist/memory/diff.js.map +1 -0
  190. package/dist/memory/extractor.d.ts +15 -0
  191. package/dist/memory/extractor.d.ts.map +1 -0
  192. package/dist/memory/extractor.js +133 -0
  193. package/dist/memory/extractor.js.map +1 -0
  194. package/dist/memory/injector.d.ts +22 -0
  195. package/dist/memory/injector.d.ts.map +1 -0
  196. package/dist/memory/injector.js +90 -0
  197. package/dist/memory/injector.js.map +1 -0
  198. package/dist/memory/prompts/extract-learnings.d.ts +3 -0
  199. package/dist/memory/prompts/extract-learnings.d.ts.map +1 -0
  200. package/dist/memory/prompts/extract-learnings.js +40 -0
  201. package/dist/memory/prompts/extract-learnings.js.map +1 -0
  202. package/dist/memory/schemas.d.ts +63 -0
  203. package/dist/memory/schemas.d.ts.map +1 -0
  204. package/dist/memory/schemas.js +13 -0
  205. package/dist/memory/schemas.js.map +1 -0
  206. package/dist/memory/store.d.ts +28 -0
  207. package/dist/memory/store.d.ts.map +1 -0
  208. package/dist/memory/store.js +103 -0
  209. package/dist/memory/store.js.map +1 -0
  210. package/dist/memory/types.d.ts +55 -0
  211. package/dist/memory/types.d.ts.map +1 -0
  212. package/dist/memory/types.js +6 -0
  213. package/dist/memory/types.js.map +1 -0
  214. package/dist/persistence/store.d.ts +21 -0
  215. package/dist/persistence/store.d.ts.map +1 -0
  216. package/dist/persistence/store.js +77 -0
  217. package/dist/persistence/store.js.map +1 -0
  218. package/dist/persistence/types.d.ts +23 -0
  219. package/dist/persistence/types.d.ts.map +1 -0
  220. package/dist/persistence/types.js +2 -0
  221. package/dist/persistence/types.js.map +1 -0
  222. package/dist/report/html.d.ts +6 -0
  223. package/dist/report/html.d.ts.map +1 -0
  224. package/dist/report/html.js +200 -0
  225. package/dist/report/html.js.map +1 -0
  226. package/dist/report/json.d.ts +11 -0
  227. package/dist/report/json.d.ts.map +1 -0
  228. package/dist/report/json.js +74 -0
  229. package/dist/report/json.js.map +1 -0
  230. package/dist/report/types.d.ts +58 -0
  231. package/dist/report/types.d.ts.map +1 -0
  232. package/dist/report/types.js +5 -0
  233. package/dist/report/types.js.map +1 -0
  234. package/package.json +67 -0
package/README.md ADDED
@@ -0,0 +1,42 @@
1
+ # Prisma AIRS CLI
2
+
3
+ [![CI](https://github.com/cdot65/prisma-airs-cli/actions/workflows/ci.yml/badge.svg)](https://github.com/cdot65/prisma-airs-cli/actions/workflows/ci.yml)
4
+ [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
5
+ [![Node 20+](https://img.shields.io/badge/node-%3E%3D20-brightgreen.svg)](https://nodejs.org/)
6
+
7
+ **Full operational coverage over Palo Alto Prisma AIRS AI security — guardrail refinement, runtime scanning, AI red teaming, model security, and profile audits.**
8
+
9
+ > **[Read the full documentation](https://cdot65.github.io/prisma-airs-cli/)** — installation, configuration, architecture, CLI reference, and examples.
10
+
11
+ ## Install
12
+
13
+ ```bash
14
+ npm install -g @cdot65/prisma-airs-cli
15
+ ```
16
+
17
+ Requires **Node.js >= 20**.
18
+
19
+ ## Quick Start
20
+
21
+ ```bash
22
+ cp .env.example .env # add your API keys
23
+ airs runtime topics generate # interactive guardrail generation
24
+ ```
25
+
26
+ ## Commands
27
+
28
+ | Command | Description |
29
+ |---------|-------------|
30
+ | `runtime scan` | Single prompt scanning against AIRS profiles |
31
+ | `runtime bulk-scan` | Batch prompt scanning with CSV output |
32
+ | `runtime topics` | Custom topic CRUD + guardrail generation (`generate`, `resume`, `report`, `runs`) |
33
+ | `runtime profiles` | Security profile CRUD + multi-topic `audit` |
34
+ | `runtime api-keys` | API key management |
35
+ | `runtime customer-apps` | Customer app CRUD |
36
+ | `runtime scan-logs` | Scan log querying |
37
+ | `redteam` | Adversarial scanning — targets, prompt sets, scans, reports |
38
+ | `model-security` | ML model supply chain security — groups, rules, scans, labels |
39
+
40
+ ## License
41
+
42
+ MIT
@@ -0,0 +1,58 @@
1
+ import { type CreateCustomTopicRequest, type ManagementClientOptions, type CustomTopic as SdkCustomTopic } from '@cdot65/prisma-airs-sdk';
2
+ import type { ProfileTopic } from '../audit/types.js';
3
+ import type { ApiKeyInfo, ApiKeyListResult, CustomerAppInfo, CustomerAppListResult, DeleteResponse, DeploymentProfileInfo, DlpProfileInfo, ManagementService, PaginationOptions, ScanLogQueryOptions, ScanLogQueryResult, SecurityProfileInfo, SecurityProfileListResult } from './types.js';
4
+ /**
5
+ * Wraps the SDK's ManagementClient to implement our ManagementService interface.
6
+ * OAuth2 token management, caching, and retry are handled by the SDK.
7
+ */
8
+ export declare class SdkManagementService implements ManagementService {
9
+ private client;
10
+ constructor(opts?: ManagementClientOptions);
11
+ createTopic(request: CreateCustomTopicRequest): Promise<SdkCustomTopic>;
12
+ updateTopic(topicId: string, request: CreateCustomTopicRequest): Promise<SdkCustomTopic>;
13
+ deleteTopic(topicId: string): Promise<void>;
14
+ forceDeleteTopic(topicId: string, updatedBy?: string): Promise<DeleteResponse>;
15
+ listTopics(): Promise<SdkCustomTopic[]>;
16
+ /**
17
+ * Sets a single custom topic on a profile's topic-guardrails config.
18
+ * Delegates to {@link assignTopicsToProfile} for backward compatibility.
19
+ */
20
+ assignTopicToProfile(profileName: string, topicId: string, topicName: string, action: 'allow' | 'block'): Promise<void>;
21
+ /**
22
+ * Sets one or more custom topics on a profile's topic-guardrails config.
23
+ * Replaces any existing topics — previous runs' stale topics are cleared.
24
+ * Groups topics by action; skips empty action groups (AIRS rejects them).
25
+ *
26
+ * CRITICAL: Each topic entry MUST include the current `revision` number.
27
+ * AIRS pins topic content to the revision specified in the profile — omitting
28
+ * it defaults to revision 0 (original content), not the latest.
29
+ */
30
+ assignTopicsToProfile(profileName: string, topics: Array<{
31
+ topicId: string;
32
+ topicName: string;
33
+ action: 'allow' | 'block';
34
+ }>, guardrailAction?: 'allow' | 'block'): Promise<void>;
35
+ getProfileTopics(profileName: string): Promise<ProfileTopic[]>;
36
+ private normalizeProfile;
37
+ listProfiles(opts?: PaginationOptions): Promise<SecurityProfileListResult>;
38
+ createProfile(request: Record<string, unknown>): Promise<SecurityProfileInfo>;
39
+ updateProfile(profileId: string, request: Record<string, unknown>): Promise<SecurityProfileInfo>;
40
+ deleteProfile(profileId: string): Promise<DeleteResponse>;
41
+ forceDeleteProfile(profileId: string, updatedBy: string): Promise<DeleteResponse>;
42
+ private normalizeApiKey;
43
+ listApiKeys(opts?: PaginationOptions): Promise<ApiKeyListResult>;
44
+ createApiKey(request: Record<string, unknown>): Promise<ApiKeyInfo>;
45
+ regenerateApiKey(apiKeyId: string, request: Record<string, unknown>): Promise<ApiKeyInfo>;
46
+ deleteApiKey(apiKeyName: string, updatedBy: string): Promise<DeleteResponse>;
47
+ private normalizeCustomerApp;
48
+ listCustomerApps(opts?: PaginationOptions): Promise<CustomerAppListResult>;
49
+ getCustomerApp(appName: string): Promise<CustomerAppInfo>;
50
+ updateCustomerApp(appId: string, request: Record<string, unknown>): Promise<CustomerAppInfo>;
51
+ deleteCustomerApp(appName: string, updatedBy: string): Promise<CustomerAppInfo>;
52
+ listDeploymentProfiles(opts?: {
53
+ unactivated?: boolean;
54
+ }): Promise<DeploymentProfileInfo[]>;
55
+ listDlpProfiles(): Promise<DlpProfileInfo[]>;
56
+ queryScanLogs(opts: ScanLogQueryOptions): Promise<ScanLogQueryResult>;
57
+ }
58
+ //# sourceMappingURL=management.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"management.d.ts","sourceRoot":"","sources":["../../src/airs/management.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,wBAAwB,EAE7B,KAAK,uBAAuB,EAC5B,KAAK,WAAW,IAAI,cAAc,EACnC,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,KAAK,EACV,UAAU,EACV,gBAAgB,EAChB,eAAe,EACf,qBAAqB,EACrB,cAAc,EACd,qBAAqB,EACrB,cAAc,EACd,iBAAiB,EACjB,iBAAiB,EACjB,mBAAmB,EACnB,kBAAkB,EAClB,mBAAmB,EACnB,yBAAyB,EAC1B,MAAM,YAAY,CAAC;AAEpB;;;GAGG;AACH,qBAAa,oBAAqB,YAAW,iBAAiB;IAC5D,OAAO,CAAC,MAAM,CAAmB;gBAErB,IAAI,CAAC,EAAE,uBAAuB;IAIpC,WAAW,CAAC,OAAO,EAAE,wBAAwB,GAAG,OAAO,CAA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+ * Wraps the SDK's ManagementClient to implement our ManagementService interface.
4
+ * OAuth2 token management, caching, and retry are handled by the SDK.
5
+ */
6
+ export class SdkManagementService {
7
+ client;
8
+ constructor(opts) {
9
+ this.client = new ManagementClient(opts);
10
+ }
11
+ async createTopic(request) {
12
+ return this.client.topics.create(request);
13
+ }
14
+ async updateTopic(topicId, request) {
15
+ return this.client.topics.update(topicId, request);
16
+ }
17
+ async deleteTopic(topicId) {
18
+ await this.client.topics.delete(topicId);
19
+ }
20
+ async forceDeleteTopic(topicId, updatedBy) {
21
+ const response = await this.client.topics.forceDelete(topicId, updatedBy);
22
+ return { message: response.message };
23
+ }
24
+ async listTopics() {
25
+ const response = await this.client.topics.list();
26
+ return response.custom_topics;
27
+ }
28
+ /**
29
+ * Sets a single custom topic on a profile's topic-guardrails config.
30
+ * Delegates to {@link assignTopicsToProfile} for backward compatibility.
31
+ */
32
+ async assignTopicToProfile(profileName, topicId, topicName, action) {
33
+ return this.assignTopicsToProfile(profileName, [{ topicId, topicName, action }]);
34
+ }
35
+ /**
36
+ * Sets one or more custom topics on a profile's topic-guardrails config.
37
+ * Replaces any existing topics — previous runs' stale topics are cleared.
38
+ * Groups topics by action; skips empty action groups (AIRS rejects them).
39
+ *
40
+ * CRITICAL: Each topic entry MUST include the current `revision` number.
41
+ * AIRS pins topic content to the revision specified in the profile — omitting
42
+ * it defaults to revision 0 (original content), not the latest.
43
+ */
44
+ async assignTopicsToProfile(profileName, topics, guardrailAction) {
45
+ // Find profile by name
46
+ const { ai_profiles } = await this.client.profiles.list();
47
+ const profile = ai_profiles.find((p) => p.profile_name === profileName);
48
+ if (!profile?.profile_id) {
49
+ throw new Error(`Profile "${profileName}" not found`);
50
+ }
51
+ // Fetch current topic revisions — AIRS requires the revision field to
52
+ // reference the correct topic content snapshot.
53
+ const allTopics = await this.listTopics();
54
+ const revisionMap = new Map(allTopics.map((t) => [t.topic_id, t.revision ?? 0]));
55
+ // Deep clone the policy to mutate
56
+ const policy = JSON.parse(JSON.stringify(profile.policy ?? {}));
57
+ const aiProfiles = policy['ai-security-profiles'] ?? [
58
+ { 'model-type': 'default', 'model-configuration': {} },
59
+ ];
60
+ const modelConfig = aiProfiles[0]?.['model-configuration'] ?? {};
61
+ // Find or create model-protection with topic-guardrails
62
+ const modelProtection = modelConfig['model-protection'] ?? [];
63
+ let topicGuardrails = modelProtection.find((mp) => mp.name === 'topic-guardrails');
64
+ if (!topicGuardrails) {
65
+ topicGuardrails = {
66
+ action: 'block',
67
+ name: 'topic-guardrails',
68
+ options: [],
69
+ 'topic-list': [],
70
+ };
71
+ modelProtection.push(topicGuardrails);
72
+ }
73
+ // Guardrail-level action controls default behavior for topic-guardrails layer.
74
+ // 'block' = block all unless explicitly allowed (requires allow topics).
75
+ // 'allow' = allow all unless explicitly blocked (only block topics needed).
76
+ topicGuardrails.action = guardrailAction ?? 'block';
77
+ // Group topics by action, build topic-list entries with revision (skip empty groups).
78
+ const byAction = new Map();
79
+ for (const t of topics) {
80
+ const group = byAction.get(t.action) ?? [];
81
+ group.push({
82
+ topic_id: t.topicId,
83
+ topic_name: t.topicName,
84
+ revision: revisionMap.get(t.topicId) ?? 0,
85
+ });
86
+ byAction.set(t.action, group);
87
+ }
88
+ const topicList = [];
89
+ for (const [action, group] of byAction) {
90
+ topicList.push({ action, topic: group });
91
+ }
92
+ topicGuardrails['topic-list'] = topicList;
93
+ // Write back
94
+ modelConfig['model-protection'] = modelProtection;
95
+ aiProfiles[0]['model-configuration'] = modelConfig;
96
+ policy['ai-security-profiles'] = aiProfiles;
97
+ await this.client.profiles.update(profile.profile_id, {
98
+ profile_name: profile.profile_name,
99
+ active: profile.active,
100
+ policy,
101
+ });
102
+ }
103
+ async getProfileTopics(profileName) {
104
+ const { ai_profiles } = await this.client.profiles.list();
105
+ const profile = ai_profiles.find((p) => p.profile_name === profileName);
106
+ if (!profile?.profile_id) {
107
+ throw new Error(`Profile "${profileName}" not found`);
108
+ }
109
+ // Extract topic entries from profile policy
110
+ const policy = profile.policy ?? {};
111
+ const aiProfiles = policy['ai-security-profiles'] ?? [];
112
+ const modelConfig = aiProfiles[0]?.['model-configuration'] ?? {};
113
+ const modelProtection = modelConfig['model-protection'] ?? [];
114
+ const topicGuardrails = modelProtection.find((mp) => mp.name === 'topic-guardrails');
115
+ if (!topicGuardrails)
116
+ return [];
117
+ const topicList = topicGuardrails['topic-list'] ?? [];
118
+ // Flatten entries into topic refs with action
119
+ const topicRefs = [];
120
+ for (const entry of topicList) {
121
+ for (const t of entry.topic ?? []) {
122
+ topicRefs.push({
123
+ topicId: t.topic_id,
124
+ topicName: t.topic_name,
125
+ action: entry.action,
126
+ });
127
+ }
128
+ }
129
+ if (topicRefs.length === 0)
130
+ return [];
131
+ // Fetch full topic details
132
+ const allTopics = await this.listTopics();
133
+ const topicMap = new Map(allTopics.map((t) => [t.topic_id, t]));
134
+ return topicRefs.map((ref) => {
135
+ const full = topicMap.get(ref.topicId);
136
+ return {
137
+ topicId: ref.topicId,
138
+ topicName: ref.topicName,
139
+ action: ref.action,
140
+ description: full?.description ?? '',
141
+ examples: full?.examples ?? [],
142
+ };
143
+ });
144
+ }
145
+ // -------------------------------------------------------------------------
146
+ // Profile CRUD
147
+ // -------------------------------------------------------------------------
148
+ normalizeProfile(p) {
149
+ return {
150
+ profileId: p.profile_id,
151
+ profileName: p.profile_name,
152
+ revision: p.revision,
153
+ active: p.active,
154
+ createdBy: p.created_by,
155
+ updatedBy: p.updated_by,
156
+ lastModifiedTs: p.last_modified_ts,
157
+ policy: p.policy,
158
+ };
159
+ }
160
+ async listProfiles(opts) {
161
+ const response = await this.client.profiles.list(opts);
162
+ return {
163
+ profiles: (response.ai_profiles ?? []).map((p) => this.normalizeProfile(p)),
164
+ nextOffset: response.next_offset,
165
+ };
166
+ }
167
+ async createProfile(request) {
168
+ const response = await this.client.profiles.create(request);
169
+ return this.normalizeProfile(response);
170
+ }
171
+ async updateProfile(profileId, request) {
172
+ const response = await this.client.profiles.update(profileId, request);
173
+ return this.normalizeProfile(response);
174
+ }
175
+ async deleteProfile(profileId) {
176
+ const response = await this.client.profiles.delete(profileId);
177
+ return { message: response.message };
178
+ }
179
+ async forceDeleteProfile(profileId, updatedBy) {
180
+ const response = await this.client.profiles.forceDelete(profileId, updatedBy);
181
+ return { message: response.message };
182
+ }
183
+ // -------------------------------------------------------------------------
184
+ // API Keys
185
+ // -------------------------------------------------------------------------
186
+ normalizeApiKey(k) {
187
+ return {
188
+ id: (k.id ?? k.api_key_id ?? ''),
189
+ name: (k.name ?? k.api_key_name ?? ''),
190
+ createdAt: k.created_at,
191
+ expiresAt: k.expires_at,
192
+ };
193
+ }
194
+ async listApiKeys(opts) {
195
+ const response = await this.client.apiKeys.list(opts);
196
+ const raw = response;
197
+ const keys = (raw.api_keys ?? []);
198
+ return {
199
+ apiKeys: keys.map((k) => this.normalizeApiKey(k)),
200
+ nextOffset: raw.next_offset,
201
+ };
202
+ }
203
+ async createApiKey(request) {
204
+ const response = await this.client.apiKeys.create(request);
205
+ return this.normalizeApiKey(response);
206
+ }
207
+ async regenerateApiKey(apiKeyId, request) {
208
+ const response = await this.client.apiKeys.regenerate(apiKeyId, request);
209
+ return this.normalizeApiKey(response);
210
+ }
211
+ async deleteApiKey(apiKeyName, updatedBy) {
212
+ const response = await this.client.apiKeys.delete(apiKeyName, updatedBy);
213
+ return { message: response.message };
214
+ }
215
+ // -------------------------------------------------------------------------
216
+ // Customer Apps
217
+ // -------------------------------------------------------------------------
218
+ normalizeCustomerApp(a) {
219
+ return {
220
+ id: (a.customer_app_id ?? a.id),
221
+ name: (a.app_name ?? a.name ?? ''),
222
+ description: a.description,
223
+ raw: a,
224
+ };
225
+ }
226
+ async listCustomerApps(opts) {
227
+ const response = await this.client.customerApps.list(opts);
228
+ const raw = response;
229
+ const apps = (raw.customer_apps ?? []);
230
+ return {
231
+ apps: apps.map((a) => this.normalizeCustomerApp(a)),
232
+ nextOffset: raw.next_offset,
233
+ };
234
+ }
235
+ async getCustomerApp(appName) {
236
+ const response = await this.client.customerApps.get(appName);
237
+ return this.normalizeCustomerApp(response);
238
+ }
239
+ async updateCustomerApp(appId, request) {
240
+ const response = await this.client.customerApps.update(appId, request);
241
+ return this.normalizeCustomerApp(response);
242
+ }
243
+ async deleteCustomerApp(appName, updatedBy) {
244
+ const response = await this.client.customerApps.delete(appName, updatedBy);
245
+ return this.normalizeCustomerApp(response);
246
+ }
247
+ // -------------------------------------------------------------------------
248
+ // Deployment Profiles (read-only)
249
+ // -------------------------------------------------------------------------
250
+ async listDeploymentProfiles(opts) {
251
+ const response = await this.client.deploymentProfiles.list(opts);
252
+ const raw = response;
253
+ const profiles = (raw.deployment_profiles ?? []);
254
+ return profiles.map((p) => ({ raw: p }));
255
+ }
256
+ // -------------------------------------------------------------------------
257
+ // DLP Profiles (read-only)
258
+ // -------------------------------------------------------------------------
259
+ async listDlpProfiles() {
260
+ const response = await this.client.dlpProfiles.list();
261
+ const raw = response;
262
+ const profiles = (raw.dlp_profiles ?? []);
263
+ return profiles.map((p) => ({ raw: p }));
264
+ }
265
+ // -------------------------------------------------------------------------
266
+ // Scan Logs
267
+ // -------------------------------------------------------------------------
268
+ async queryScanLogs(opts) {
269
+ const response = await this.client.scanLogs.query({
270
+ time_interval: opts.timeInterval,
271
+ time_unit: opts.timeUnit,
272
+ pageNumber: opts.pageNumber,
273
+ pageSize: opts.pageSize,
274
+ filter: opts.filter,
275
+ page_token: opts.pageToken,
276
+ });
277
+ const raw = response;
278
+ const dashboard = (raw.scan_result_for_dashboard ?? {});
279
+ const entries = (dashboard.scan_result_entries ?? raw.results ?? []);
280
+ return {
281
+ results: entries,
282
+ pageToken: raw.page_token,
283
+ raw,
284
+ };
285
+ }
286
+ }
287
+ //# sourceMappingURL=management.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"management.js","sourceRoot":"","sources":["../../src/airs/management.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,gBAAgB,GAGjB,MAAM,yBAAyB,CAAC;AAkBjC;;;GAGG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Q,GAAG,CAAC,GAAG,CAAC,YAAY,IAAI,EAAE,CAA8B,CAAC;QACvE,OAAO,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;IAC3C,CAAC;IAED,4EAA4E;IAC5E,YAAY;IACZ,4EAA4E;IAE5E,KAAK,CAAC,aAAa,CAAC,IAAyB;QAC3C,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC;YAChD,aAAa,EAAE,IAAI,CAAC,YAAY;YAChC,SAAS,EAAE,IAAI,CAAC,QAAQ;YACxB,UAAU,EAAE,IAAI,CAAC,UAAU;YAC3B,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,UAAU,EAAE,IAAI,CAAC,SAAS;SAC3B,CAAC,CAAC;QACH,MAAM,GAAG,GAAG,QAA8C,CAAC;QAC3D,MAAM,SAAS,GAAG,CAAC,GAAG,CAAC,yBAAyB,IAAI,EAAE,CAA4B,CAAC;QACnF,MAAM,OAAO,GAAG,CAAC,SAAS,CAAC,mBAAmB,IAAI,GAAG,CAAC,OAAO,IAAI,EAAE,CAGhE,CAAC;QACJ,OAAO;YACL,OAAO,EAAE,OAAO;YAChB,SAAS,EAAE,GAAG,CAAC,UAAgC;YAC/C,GAAG;SACJ,CAAC;IACJ,CAAC;CACF"}
@@ -0,0 +1,74 @@
1
+ import { type ModelSecurityClientOptions } from '@cdot65/prisma-airs-sdk';
2
+ import type { ModelSecurityEvaluation, ModelSecurityFile, ModelSecurityFileListOptions, ModelSecurityGroup, ModelSecurityGroupCreateRequest, ModelSecurityGroupListOptions, ModelSecurityGroupUpdateRequest, ModelSecurityLabel, ModelSecurityPyPIAuth, ModelSecurityRule, ModelSecurityRuleInstance, ModelSecurityRuleInstanceListOptions, ModelSecurityRuleInstanceUpdateRequest, ModelSecurityRuleListOptions, ModelSecurityScan, ModelSecurityScanListOptions, ModelSecurityService, ModelSecurityViolation } from './types.js';
3
+ /**
4
+ * Wraps the SDK's ModelSecurityClient to implement ModelSecurityService.
5
+ * Provides security group CRUD, rule browsing, scan operations, and label management.
6
+ */
7
+ export declare class SdkModelSecurityService implements ModelSecurityService {
8
+ private client;
9
+ constructor(opts?: ModelSecurityClientOptions);
10
+ listGroups(opts?: ModelSecurityGroupListOptions): Promise<{
11
+ totalItems: number;
12
+ groups: ModelSecurityGroup[];
13
+ }>;
14
+ getGroup(uuid: string): Promise<ModelSecurityGroup>;
15
+ createGroup(request: ModelSecurityGroupCreateRequest): Promise<ModelSecurityGroup>;
16
+ updateGroup(uuid: string, request: ModelSecurityGroupUpdateRequest): Promise<ModelSecurityGroup>;
17
+ deleteGroup(uuid: string): Promise<void>;
18
+ listRuleInstances(groupUuid: string, opts?: ModelSecurityRuleInstanceListOptions): Promise<{
19
+ totalItems: number;
20
+ ruleInstances: ModelSecurityRuleInstance[];
21
+ }>;
22
+ getRuleInstance(groupUuid: string, instanceUuid: string): Promise<ModelSecurityRuleInstance>;
23
+ updateRuleInstance(groupUuid: string, instanceUuid: string, request: ModelSecurityRuleInstanceUpdateRequest): Promise<ModelSecurityRuleInstance>;
24
+ listRules(opts?: ModelSecurityRuleListOptions): Promise<{
25
+ totalItems: number;
26
+ rules: ModelSecurityRule[];
27
+ }>;
28
+ getRule(uuid: string): Promise<ModelSecurityRule>;
29
+ createScan(request: Record<string, unknown>): Promise<ModelSecurityScan>;
30
+ listScans(opts?: ModelSecurityScanListOptions): Promise<{
31
+ totalItems: number;
32
+ scans: ModelSecurityScan[];
33
+ }>;
34
+ getScan(uuid: string): Promise<ModelSecurityScan>;
35
+ getEvaluations(scanUuid: string, opts?: {
36
+ skip?: number;
37
+ limit?: number;
38
+ }): Promise<{
39
+ totalItems: number;
40
+ evaluations: ModelSecurityEvaluation[];
41
+ }>;
42
+ getEvaluation(uuid: string): Promise<ModelSecurityEvaluation>;
43
+ getViolations(scanUuid: string, opts?: {
44
+ skip?: number;
45
+ limit?: number;
46
+ }): Promise<{
47
+ totalItems: number;
48
+ violations: ModelSecurityViolation[];
49
+ }>;
50
+ getViolation(uuid: string): Promise<ModelSecurityViolation>;
51
+ getFiles(scanUuid: string, opts?: ModelSecurityFileListOptions): Promise<{
52
+ totalItems: number;
53
+ files: ModelSecurityFile[];
54
+ }>;
55
+ addLabels(scanUuid: string, labels: ModelSecurityLabel[]): Promise<void>;
56
+ setLabels(scanUuid: string, labels: ModelSecurityLabel[]): Promise<void>;
57
+ deleteLabels(scanUuid: string, keys: string[]): Promise<void>;
58
+ getLabelKeys(opts?: {
59
+ skip?: number;
60
+ limit?: number;
61
+ }): Promise<{
62
+ totalItems: number;
63
+ keys: string[];
64
+ }>;
65
+ getLabelValues(key: string, opts?: {
66
+ skip?: number;
67
+ limit?: number;
68
+ }): Promise<{
69
+ totalItems: number;
70
+ values: string[];
71
+ }>;
72
+ getPyPIAuth(): Promise<ModelSecurityPyPIAuth>;
73
+ }
74
+ //# sourceMappingURL=modelsecurity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"modelsecurity.d.ts","sourceRoot":"","sources":["../../src/airs/modelsecurity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,KAAK,0BAA0B,EAAE,MAAM,yBAAyB,CAAC;AAC/F,OAAO,KAAK,EACV,uBAAuB,EACvB,iBAAiB,EACjB,4BAA4B,EAC5B,kBAAkB,EAClB,+BAA+B,EAC/B,6BAA6B,EAC7B,+BAA+B,EAC/B,kBAAkB,EAClB,qBAAqB,EACrB,iBAAiB,EAEjB,yBAAyB,EACzB,oCAAoC,EACpC,sCAAsC,EACtC,4BAA4B,EAC5B,iBAAiB,EACjB,4BAA4B,EAC5B,oBAAoB,EACpB,sBAAsB,EACvB,MAAM,YAAY,CAAC;AAqHpB;;;GAGG;AACH,qBAAa,uBAAwB,YAAW,oBAAoB;IAClE,OAAO,CAAC,MAAM,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