@cdot65/prisma-airs-cli 4.4.0 → 5.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.
- package/README.md +13 -3
- package/dist/{chunk-LF6JPUA4.js → chunk-IRLIFMGQ.js} +781 -16
- package/dist/cli/index.js +433 -173
- package/dist/index.d.ts +141 -2
- package/dist/index.js +11 -3
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CreateCustomTopicRequest, CustomTopic as CustomTopic$1, CreateSecurityProfileRequest, ManagementClientOptions, ModelSecurityClientOptions, RedTeamClientOptions, InitOptions } from '@cdot65/prisma-airs-sdk';
|
|
1
|
+
import { CreateCustomTopicRequest, CustomTopic as CustomTopic$1, CreateSecurityProfileRequest, ManagementClientOptions, ModelSecurityClientOptions, RedTeamClientOptions, InitOptions, ManagementClient } from '@cdot65/prisma-airs-sdk';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -1645,6 +1645,7 @@ declare const ConfigSchema: z.ZodObject<{
|
|
|
1645
1645
|
mgmtClientSecret: z.ZodOptional<z.ZodString>;
|
|
1646
1646
|
mgmtTsgId: z.ZodOptional<z.ZodString>;
|
|
1647
1647
|
mgmtEndpoint: z.ZodOptional<z.ZodString>;
|
|
1648
|
+
mgmtDashboardEndpoint: z.ZodOptional<z.ZodString>;
|
|
1648
1649
|
mgmtTokenEndpoint: z.ZodOptional<z.ZodString>;
|
|
1649
1650
|
dlpEndpoint: z.ZodOptional<z.ZodString>;
|
|
1650
1651
|
redTeamDataEndpoint: z.ZodOptional<z.ZodString>;
|
|
@@ -1675,6 +1676,7 @@ declare const ConfigSchema: z.ZodObject<{
|
|
|
1675
1676
|
mgmtClientSecret?: string | undefined;
|
|
1676
1677
|
mgmtTsgId?: string | undefined;
|
|
1677
1678
|
mgmtEndpoint?: string | undefined;
|
|
1679
|
+
mgmtDashboardEndpoint?: string | undefined;
|
|
1678
1680
|
mgmtTokenEndpoint?: string | undefined;
|
|
1679
1681
|
dlpEndpoint?: string | undefined;
|
|
1680
1682
|
redTeamDataEndpoint?: string | undefined;
|
|
@@ -1701,6 +1703,7 @@ declare const ConfigSchema: z.ZodObject<{
|
|
|
1701
1703
|
mgmtClientSecret?: string | undefined;
|
|
1702
1704
|
mgmtTsgId?: string | undefined;
|
|
1703
1705
|
mgmtEndpoint?: string | undefined;
|
|
1706
|
+
mgmtDashboardEndpoint?: string | undefined;
|
|
1704
1707
|
mgmtTokenEndpoint?: string | undefined;
|
|
1705
1708
|
dlpEndpoint?: string | undefined;
|
|
1706
1709
|
redTeamDataEndpoint?: string | undefined;
|
|
@@ -1842,4 +1845,140 @@ declare function computeMetrics(results: TestResult[]): EfficacyMetrics;
|
|
|
1842
1845
|
/** Compute per-category error breakdown from test results. Sorted by error rate descending. */
|
|
1843
1846
|
declare function computeCategoryBreakdown(results: TestResult[]): CategoryBreakdown[];
|
|
1844
1847
|
|
|
1845
|
-
|
|
1848
|
+
/** Atomically publish a private report without overwriting a file or following a symlink. */
|
|
1849
|
+
declare function writeReportFile(path: string, content: string): Promise<void>;
|
|
1850
|
+
|
|
1851
|
+
/** Read-only SDK surface needed by the first product report. */
|
|
1852
|
+
interface RuntimeReportClient {
|
|
1853
|
+
dashboard: Pick<ManagementClient['dashboard'], 'applicationsOverview' | 'sessionsOverview' | 'sessionsChart' | 'topApplicationsViolations' | 'applicationsViolationsTrend'>;
|
|
1854
|
+
profiles: Pick<ManagementClient['profiles'], 'list'>;
|
|
1855
|
+
customerApps: Pick<ManagementClient['customerApps'], 'list'>;
|
|
1856
|
+
}
|
|
1857
|
+
type ReportSourceStatus = 'complete' | 'partial' | 'unavailable';
|
|
1858
|
+
type ReportPriority = 'attention' | 'review' | 'info';
|
|
1859
|
+
type ReportFormat = 'html' | 'markdown';
|
|
1860
|
+
interface ReportSource {
|
|
1861
|
+
name: string;
|
|
1862
|
+
method: string;
|
|
1863
|
+
window: string;
|
|
1864
|
+
status: ReportSourceStatus;
|
|
1865
|
+
records: number;
|
|
1866
|
+
pages: number;
|
|
1867
|
+
notes: string[];
|
|
1868
|
+
}
|
|
1869
|
+
interface ReportFinding {
|
|
1870
|
+
priority: ReportPriority;
|
|
1871
|
+
title: string;
|
|
1872
|
+
evidence: string;
|
|
1873
|
+
recommendation: string;
|
|
1874
|
+
source: string;
|
|
1875
|
+
}
|
|
1876
|
+
interface ReportApplication {
|
|
1877
|
+
name: string;
|
|
1878
|
+
sessions: number | null;
|
|
1879
|
+
violatingSessions: number | null;
|
|
1880
|
+
registered: boolean | null;
|
|
1881
|
+
}
|
|
1882
|
+
interface ReportProfile {
|
|
1883
|
+
name: string;
|
|
1884
|
+
revision: number | null;
|
|
1885
|
+
active: boolean | null;
|
|
1886
|
+
modified: string | null;
|
|
1887
|
+
timeoutActions: string[];
|
|
1888
|
+
storageMasking: string;
|
|
1889
|
+
}
|
|
1890
|
+
interface ReportRegisteredApp {
|
|
1891
|
+
name: string;
|
|
1892
|
+
environment: string;
|
|
1893
|
+
cloud: string;
|
|
1894
|
+
model: string;
|
|
1895
|
+
keyAssociations: number | null;
|
|
1896
|
+
}
|
|
1897
|
+
interface ReportSessionSummary {
|
|
1898
|
+
entries: number | null;
|
|
1899
|
+
statuses: Array<{
|
|
1900
|
+
name: string;
|
|
1901
|
+
count: number;
|
|
1902
|
+
}>;
|
|
1903
|
+
violatingSessions: number | null;
|
|
1904
|
+
missingTimestamps: number;
|
|
1905
|
+
outsideWindow: number;
|
|
1906
|
+
}
|
|
1907
|
+
interface ReportSeverity {
|
|
1908
|
+
critical: number | null;
|
|
1909
|
+
high: number | null;
|
|
1910
|
+
medium: number | null;
|
|
1911
|
+
low: number | null;
|
|
1912
|
+
total: number | null;
|
|
1913
|
+
}
|
|
1914
|
+
interface ReportDailyTelemetry {
|
|
1915
|
+
chart: {
|
|
1916
|
+
sessions: number | null;
|
|
1917
|
+
violatingSessions: number | null;
|
|
1918
|
+
buckets: Array<{
|
|
1919
|
+
time: string;
|
|
1920
|
+
sessions: number | null;
|
|
1921
|
+
violatingSessions: number | null;
|
|
1922
|
+
violations: ReportSeverity;
|
|
1923
|
+
}>;
|
|
1924
|
+
};
|
|
1925
|
+
topApplications: Array<{
|
|
1926
|
+
name: string;
|
|
1927
|
+
violations: number | null;
|
|
1928
|
+
detectors: Array<{
|
|
1929
|
+
name: string;
|
|
1930
|
+
count: number | null;
|
|
1931
|
+
}>;
|
|
1932
|
+
}>;
|
|
1933
|
+
violationTrend: Array<{
|
|
1934
|
+
time: string;
|
|
1935
|
+
violations: ReportSeverity;
|
|
1936
|
+
}>;
|
|
1937
|
+
}
|
|
1938
|
+
/** Allowlisted, credential-free projection; never contains raw responses or scan content. */
|
|
1939
|
+
interface RuntimeDailyReport {
|
|
1940
|
+
schemaVersion: 2;
|
|
1941
|
+
product: 'Prisma AIRS AI Runtime Security';
|
|
1942
|
+
title: string;
|
|
1943
|
+
generatedAt: string;
|
|
1944
|
+
collectionStartedAt: string;
|
|
1945
|
+
window: {
|
|
1946
|
+
start: string;
|
|
1947
|
+
end: string;
|
|
1948
|
+
description: string;
|
|
1949
|
+
};
|
|
1950
|
+
health: 'attention' | 'review' | 'no-findings' | 'unknown';
|
|
1951
|
+
sources: ReportSource[];
|
|
1952
|
+
findings: ReportFinding[];
|
|
1953
|
+
activity: {
|
|
1954
|
+
sessions: number | null;
|
|
1955
|
+
violatingSessions: number | null;
|
|
1956
|
+
violationRate: number | null;
|
|
1957
|
+
applications: ReportApplication[];
|
|
1958
|
+
};
|
|
1959
|
+
profiles: ReportProfile[];
|
|
1960
|
+
registeredApps: ReportRegisteredApp[];
|
|
1961
|
+
sessions: ReportSessionSummary;
|
|
1962
|
+
dailyTelemetry: ReportDailyTelemetry;
|
|
1963
|
+
limitations: string[];
|
|
1964
|
+
}
|
|
1965
|
+
interface RuntimeReportOptions {
|
|
1966
|
+
title?: string;
|
|
1967
|
+
/** Per-source page budget (1–100); partial results are explicitly marked. Default 40. */
|
|
1968
|
+
maxPages?: number;
|
|
1969
|
+
/** Inject a clock for deterministic tests. */
|
|
1970
|
+
now?: () => Date;
|
|
1971
|
+
}
|
|
1972
|
+
|
|
1973
|
+
/** Render the same evidence model as a portable, inert Markdown deliverable. */
|
|
1974
|
+
declare function renderRuntimeReportMarkdown(report: RuntimeDailyReport): string;
|
|
1975
|
+
/** Standalone HTML: inline CSS/JS, no dependencies, external requests, or embedded raw data. */
|
|
1976
|
+
declare function renderRuntimeReportHtml(report: RuntimeDailyReport): string;
|
|
1977
|
+
|
|
1978
|
+
/**
|
|
1979
|
+
* Build a daily environment report through SDK reads only. No scan submissions or mutations.
|
|
1980
|
+
* Application buckets, session inventory and detector violations remain separate units of evidence.
|
|
1981
|
+
*/
|
|
1982
|
+
declare function collectRuntimeDailyReport(client: RuntimeReportClient, options?: RuntimeReportOptions): Promise<RuntimeDailyReport>;
|
|
1983
|
+
|
|
1984
|
+
export { AirsScanService, type AnalysisReport, type ApiKeyInfo, type ApiKeyListResult, type BackupEnvelope, type BackupFormat, type BackupResult, type BatchEntry, type BulkScanAction, type BulkScanResult, type CategoryBreakdown, type ConsumptionAppListEntry, type ConsumptionQueryOptions, type ConsumptionTimeInterval, type CustomTopic, type CustomerAppConsumption, type CustomerAppInfo, type CustomerAppListResult, type DeleteResponse, type DeploymentProfileInfo, type EfficacyMetrics, type EulaContent, type EulaStatus, type IndexedPrompt, type InstanceDetail, type InstanceRequest, type InstanceResponse, type IterationResult, type ManagementService, type ModelSecurityEvaluation, type ModelSecurityFile, type ModelSecurityFileListOptions, type ModelSecurityGroup, type ModelSecurityGroupCreateRequest, type ModelSecurityGroupListOptions, type ModelSecurityGroupUpdateRequest, type ModelSecurityLabel, type ModelSecurityModel, type ModelSecurityModelListOptions, type ModelSecurityModelVersion, type ModelSecurityModelVersionListOptions, type ModelSecurityPyPIAuth, type ModelSecurityRule, type ModelSecurityRuleEditableField, type ModelSecurityRuleInstance, type ModelSecurityRuleInstanceListOptions, type ModelSecurityRuleInstanceUpdateRequest, type ModelSecurityRuleListOptions, type ModelSecurityScan, type ModelSecurityScanListOptions, type ModelSecurityService, type ModelSecurityViolation, type MutationResponse, type PaginationOptions, type PollRetryOptions, type ProfileTopic, type PromptDetail, type PromptSetDetail, type PromptSetService, type PromptSetVersionInfo, type PropertyValueList, type RedTeamAdapterCreateRequest, type RedTeamAdapterDetail, type RedTeamAdapterListItem, type RedTeamAdapterListOptions, type RedTeamAdapterUpdateOverrides, type RedTeamAdapterValidateRequest, type RedTeamAdapterValidationResult, type RedTeamAdapterVar, type RedTeamAttack, type RedTeamCategory, type RedTeamChannel, type RedTeamChannelCreateRequest, type RedTeamChannelListOptions, type RedTeamChannelStats, type RedTeamChannelUpdateRequest, type RedTeamCustomAttack, type RedTeamCustomReport, type RedTeamDynamicReport, type RedTeamErrorLog, type RedTeamJob, type RedTeamLanguages, type RedTeamService, type RedTeamStaticReport, type RedTeamTarget, type RedTeamTargetCreateRequest, type RedTeamTargetDetail, type RedTeamTargetUpdateRequest, type RegistryCredentials, type ReliableRuntimeService, type ReportApplication, type ReportDailyTelemetry, type ReportFinding, type ReportFormat, type ReportPriority, type ReportProfile, type ReportRegisteredApp, type ReportSessionSummary, type ReportSeverity, type ReportSource, type ReportSourceStatus, type ResourceType, type RestoreResult, type RunState, type RuntimeDailyReport, type RuntimeReportClient, type RuntimeReportOptions, type RuntimeScanResult, type RuntimeService, SDK_ASYNC_BATCH_SIZE, type ScanLogQueryOptions, type ScanLogQueryResult, type ScanResult, type ScanService, SdkManagementService, SdkModelSecurityService, SdkPromptSetService, SdkRedTeamService, SdkRuntimeService, type SecurityProfileInfo, type SecurityProfileListResult, type SubmittedBatch, type TargetAuthValidationRequest, type TargetAuthValidationResult, type TargetOperationOptions, type TestCase, type TestResult, type UserInput, type ValidationError, collectRuntimeDailyReport, computeCategoryBreakdown, computeMetrics, loadConfig, readBackupDir, readBackupFile, renderRuntimeReportHtml, renderRuntimeReportMarkdown, resolveOutputDir, sanitizeFilename, validateDescription, validateExamples, validateName, validateTopic, writeBackupFile, writeReportFile };
|
package/dist/index.js
CHANGED
|
@@ -6,19 +6,23 @@ import {
|
|
|
6
6
|
SdkPromptSetService,
|
|
7
7
|
SdkRedTeamService,
|
|
8
8
|
SdkRuntimeService,
|
|
9
|
+
collectRuntimeDailyReport,
|
|
9
10
|
computeCategoryBreakdown,
|
|
10
11
|
computeMetrics,
|
|
11
12
|
loadConfig,
|
|
12
13
|
readBackupDir,
|
|
13
14
|
readBackupFile,
|
|
15
|
+
renderRuntimeReportHtml,
|
|
16
|
+
renderRuntimeReportMarkdown,
|
|
14
17
|
resolveOutputDir,
|
|
15
18
|
sanitizeFilename,
|
|
16
19
|
validateDescription,
|
|
17
20
|
validateExamples,
|
|
18
21
|
validateName,
|
|
19
22
|
validateTopic,
|
|
20
|
-
writeBackupFile
|
|
21
|
-
|
|
23
|
+
writeBackupFile,
|
|
24
|
+
writeReportFile
|
|
25
|
+
} from "./chunk-IRLIFMGQ.js";
|
|
22
26
|
export {
|
|
23
27
|
AirsScanService,
|
|
24
28
|
SDK_ASYNC_BATCH_SIZE,
|
|
@@ -27,16 +31,20 @@ export {
|
|
|
27
31
|
SdkPromptSetService,
|
|
28
32
|
SdkRedTeamService,
|
|
29
33
|
SdkRuntimeService,
|
|
34
|
+
collectRuntimeDailyReport,
|
|
30
35
|
computeCategoryBreakdown,
|
|
31
36
|
computeMetrics,
|
|
32
37
|
loadConfig,
|
|
33
38
|
readBackupDir,
|
|
34
39
|
readBackupFile,
|
|
40
|
+
renderRuntimeReportHtml,
|
|
41
|
+
renderRuntimeReportMarkdown,
|
|
35
42
|
resolveOutputDir,
|
|
36
43
|
sanitizeFilename,
|
|
37
44
|
validateDescription,
|
|
38
45
|
validateExamples,
|
|
39
46
|
validateName,
|
|
40
47
|
validateTopic,
|
|
41
|
-
writeBackupFile
|
|
48
|
+
writeBackupFile,
|
|
49
|
+
writeReportFile
|
|
42
50
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cdot65/prisma-airs-cli",
|
|
3
3
|
"packageManager": "pnpm@10.6.5",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "5.0.0",
|
|
5
5
|
"description": "CLI and library for Palo Alto Prisma AIRS — guardrail refinement, AI red teaming, model security scanning, profile audits",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "dist/index.js",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
},
|
|
60
60
|
"license": "MIT",
|
|
61
61
|
"dependencies": {
|
|
62
|
-
"@cdot65/prisma-airs-sdk": "0.
|
|
62
|
+
"@cdot65/prisma-airs-sdk": "0.26.0",
|
|
63
63
|
"@inquirer/prompts": "^8.3.0",
|
|
64
64
|
"chalk": "^5.6.2",
|
|
65
65
|
"commander": "^14.0.3",
|