@bryan-thompson/inspector-assessment 1.41.0 → 1.42.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 (123) hide show
  1. package/cli/build/__tests__/assessment-runner/config-builder.test.js +34 -0
  2. package/cli/build/__tests__/flag-parsing.test.js +2 -1
  3. package/cli/build/__tests__/profiles.test.js +73 -14
  4. package/cli/build/lib/assessment-runner/config-builder.js +7 -0
  5. package/cli/build/lib/cli-parser.js +30 -14
  6. package/cli/build/lib/cli-parserSchemas.js +3 -0
  7. package/cli/build/profiles.js +88 -25
  8. package/cli/package.json +1 -1
  9. package/client/dist/assets/{OAuthCallback-BncWs0fE.js → OAuthCallback-Bbgu1k5Q.js} +1 -1
  10. package/client/dist/assets/{OAuthDebugCallback-C7SkhlxI.js → OAuthDebugCallback-BNMp3ajr.js} +1 -1
  11. package/client/dist/assets/{index-BfUEP2vZ.js → index-DhZHooka.js} +4 -4
  12. package/client/dist/index.html +1 -1
  13. package/client/lib/lib/assessment/aupComplianceTypes.d.ts +57 -0
  14. package/client/lib/lib/assessment/aupComplianceTypes.d.ts.map +1 -1
  15. package/client/lib/lib/assessment/capabilityAssessmentTypes.d.ts +141 -0
  16. package/client/lib/lib/assessment/capabilityAssessmentTypes.d.ts.map +1 -1
  17. package/client/lib/lib/assessment/externalServicesTypes.d.ts +94 -0
  18. package/client/lib/lib/assessment/externalServicesTypes.d.ts.map +1 -1
  19. package/client/lib/lib/assessment/jsonlEventSchemas.d.ts +62 -62
  20. package/client/lib/lib/assessment/policyComplianceTypes.d.ts +144 -0
  21. package/client/lib/lib/assessment/policyComplianceTypes.d.ts.map +1 -1
  22. package/client/lib/lib/assessment/summarizer/stageBEnrichmentBuilder.d.ts +14 -2
  23. package/client/lib/lib/assessment/summarizer/stageBEnrichmentBuilder.d.ts.map +1 -1
  24. package/client/lib/lib/assessment/summarizer/stageBEnrichmentBuilder.js +57 -1
  25. package/client/lib/lib/assessment/summarizer/stageBTypes.d.ts +41 -0
  26. package/client/lib/lib/assessment/summarizer/stageBTypes.d.ts.map +1 -1
  27. package/client/lib/lib/assessment/summarizer/stageBTypes.js +3 -0
  28. package/client/lib/services/assessment/config/annotationPatterns.d.ts +8 -0
  29. package/client/lib/services/assessment/config/annotationPatterns.d.ts.map +1 -1
  30. package/client/lib/services/assessment/config/annotationPatterns.js +10 -198
  31. package/client/lib/services/assessment/config/sanitizationPatterns.d.ts +19 -12
  32. package/client/lib/services/assessment/config/sanitizationPatterns.d.ts.map +1 -1
  33. package/client/lib/services/assessment/config/sanitizationPatterns.js +18 -193
  34. package/client/lib/services/assessment/lib/moduleEnrichment.d.ts +71 -0
  35. package/client/lib/services/assessment/lib/moduleEnrichment.d.ts.map +1 -0
  36. package/client/lib/services/assessment/lib/moduleEnrichment.js +307 -0
  37. package/client/lib/services/assessment/modules/AUPComplianceAssessor.d.ts +9 -0
  38. package/client/lib/services/assessment/modules/AUPComplianceAssessor.d.ts.map +1 -1
  39. package/client/lib/services/assessment/modules/AUPComplianceAssessor.js +31 -3
  40. package/client/lib/services/assessment/modules/AuthenticationAssessor.d.ts +35 -0
  41. package/client/lib/services/assessment/modules/AuthenticationAssessor.d.ts.map +1 -1
  42. package/client/lib/services/assessment/modules/AuthenticationAssessor.js +201 -1
  43. package/client/lib/services/assessment/modules/ErrorHandlingAssessor.deprecated.d.ts +19 -63
  44. package/client/lib/services/assessment/modules/ErrorHandlingAssessor.deprecated.d.ts.map +1 -1
  45. package/client/lib/services/assessment/modules/ErrorHandlingAssessor.deprecated.js +27 -1032
  46. package/client/lib/services/assessment/modules/ManifestValidationAssessor.d.ts +20 -0
  47. package/client/lib/services/assessment/modules/ManifestValidationAssessor.d.ts.map +1 -1
  48. package/client/lib/services/assessment/modules/ManifestValidationAssessor.js +210 -0
  49. package/client/lib/services/assessment/modules/ProhibitedLibrariesAssessor.d.ts +21 -0
  50. package/client/lib/services/assessment/modules/ProhibitedLibrariesAssessor.d.ts.map +1 -1
  51. package/client/lib/services/assessment/modules/ProhibitedLibrariesAssessor.js +148 -1
  52. package/client/lib/services/assessment/modules/PromptAssessor.d.ts +25 -0
  53. package/client/lib/services/assessment/modules/PromptAssessor.d.ts.map +1 -1
  54. package/client/lib/services/assessment/modules/PromptAssessor.js +199 -0
  55. package/client/lib/services/assessment/modules/ResourceAssessor.d.ts +29 -0
  56. package/client/lib/services/assessment/modules/ResourceAssessor.d.ts.map +1 -1
  57. package/client/lib/services/assessment/modules/ResourceAssessor.js +286 -0
  58. package/client/lib/services/assessment/modules/SecurityAssessor.d.ts +21 -5
  59. package/client/lib/services/assessment/modules/SecurityAssessor.d.ts.map +1 -1
  60. package/client/lib/services/assessment/modules/SecurityAssessor.js +48 -41
  61. package/client/lib/services/assessment/modules/securityTests/SecurityPatternLibrary.d.ts +18 -2
  62. package/client/lib/services/assessment/modules/securityTests/SecurityPatternLibrary.d.ts.map +1 -1
  63. package/client/lib/services/assessment/modules/securityTests/SecurityPatternLibrary.js +73 -25
  64. package/client/lib/services/assessment/modules/securityTests/SecurityResponseAnalyzer.d.ts +50 -217
  65. package/client/lib/services/assessment/modules/securityTests/SecurityResponseAnalyzer.d.ts.map +1 -1
  66. package/client/lib/services/assessment/modules/securityTests/SecurityResponseAnalyzer.js +67 -861
  67. package/client/lib/services/assessment/modules/securityTests/analyzers/AuthBypassAnalyzer.d.ts +29 -0
  68. package/client/lib/services/assessment/modules/securityTests/analyzers/AuthBypassAnalyzer.d.ts.map +1 -0
  69. package/client/lib/services/assessment/modules/securityTests/analyzers/AuthBypassAnalyzer.js +37 -0
  70. package/client/lib/services/assessment/modules/securityTests/analyzers/BlacklistBypassAnalyzer.d.ts +44 -0
  71. package/client/lib/services/assessment/modules/securityTests/analyzers/BlacklistBypassAnalyzer.d.ts.map +1 -0
  72. package/client/lib/services/assessment/modules/securityTests/analyzers/BlacklistBypassAnalyzer.js +109 -0
  73. package/client/lib/services/assessment/modules/securityTests/analyzers/ChainExploitationAnalyzer.d.ts +54 -0
  74. package/client/lib/services/assessment/modules/securityTests/analyzers/ChainExploitationAnalyzer.d.ts.map +1 -0
  75. package/client/lib/services/assessment/modules/securityTests/analyzers/ChainExploitationAnalyzer.js +81 -0
  76. package/client/lib/services/assessment/modules/securityTests/analyzers/CryptographicFailureAnalyzer.d.ts +84 -0
  77. package/client/lib/services/assessment/modules/securityTests/analyzers/CryptographicFailureAnalyzer.d.ts.map +1 -0
  78. package/client/lib/services/assessment/modules/securityTests/analyzers/CryptographicFailureAnalyzer.js +290 -0
  79. package/client/lib/services/assessment/modules/securityTests/analyzers/ExcessivePermissionsAnalyzer.d.ts +41 -0
  80. package/client/lib/services/assessment/modules/securityTests/analyzers/ExcessivePermissionsAnalyzer.d.ts.map +1 -0
  81. package/client/lib/services/assessment/modules/securityTests/analyzers/ExcessivePermissionsAnalyzer.js +91 -0
  82. package/client/lib/services/assessment/modules/securityTests/analyzers/OutputInjectionAnalyzer.d.ts +52 -0
  83. package/client/lib/services/assessment/modules/securityTests/analyzers/OutputInjectionAnalyzer.d.ts.map +1 -0
  84. package/client/lib/services/assessment/modules/securityTests/analyzers/OutputInjectionAnalyzer.js +112 -0
  85. package/client/lib/services/assessment/modules/securityTests/analyzers/SecretLeakageDetector.d.ts +53 -0
  86. package/client/lib/services/assessment/modules/securityTests/analyzers/SecretLeakageDetector.d.ts.map +1 -0
  87. package/client/lib/services/assessment/modules/securityTests/analyzers/SecretLeakageDetector.js +80 -0
  88. package/client/lib/services/assessment/modules/securityTests/analyzers/SessionManagementAnalyzer.d.ts +62 -0
  89. package/client/lib/services/assessment/modules/securityTests/analyzers/SessionManagementAnalyzer.d.ts.map +1 -0
  90. package/client/lib/services/assessment/modules/securityTests/analyzers/SessionManagementAnalyzer.js +184 -0
  91. package/client/lib/services/assessment/modules/securityTests/analyzers/StateBasedAuthAnalyzer.d.ts +36 -0
  92. package/client/lib/services/assessment/modules/securityTests/analyzers/StateBasedAuthAnalyzer.d.ts.map +1 -0
  93. package/client/lib/services/assessment/modules/securityTests/analyzers/StateBasedAuthAnalyzer.js +58 -0
  94. package/client/lib/services/assessment/modules/securityTests/analyzers/index.d.ts +36 -0
  95. package/client/lib/services/assessment/modules/securityTests/analyzers/index.d.ts.map +1 -0
  96. package/client/lib/services/assessment/modules/securityTests/analyzers/index.js +27 -0
  97. package/client/lib/services/assessment/modules/securityTests/factory.d.ts +80 -0
  98. package/client/lib/services/assessment/modules/securityTests/factory.d.ts.map +1 -0
  99. package/client/lib/services/assessment/modules/securityTests/factory.js +76 -0
  100. package/client/lib/services/assessment/modules/securityTests/index.d.ts +3 -1
  101. package/client/lib/services/assessment/modules/securityTests/index.d.ts.map +1 -1
  102. package/client/lib/services/assessment/modules/securityTests/index.js +4 -0
  103. package/client/lib/services/assessment/orchestratorHelpers.d.ts +513 -0
  104. package/client/lib/services/assessment/orchestratorHelpers.d.ts.map +1 -1
  105. package/client/lib/services/assessment/orchestratorHelpers.js +225 -5
  106. package/client/lib/services/assessment/patterns/annotation-patterns.json +200 -0
  107. package/client/lib/services/assessment/patterns/index.d.ts +12 -0
  108. package/client/lib/services/assessment/patterns/index.d.ts.map +1 -0
  109. package/client/lib/services/assessment/patterns/index.js +11 -0
  110. package/client/lib/services/assessment/patterns/patternLoader.d.ts +134 -0
  111. package/client/lib/services/assessment/patterns/patternLoader.d.ts.map +1 -0
  112. package/client/lib/services/assessment/patterns/patternLoader.js +144 -0
  113. package/client/lib/services/assessment/patterns/sanitization-patterns.json +190 -0
  114. package/client/lib/services/assessment/registry/AssessorDefinitions.d.ts.map +1 -1
  115. package/client/lib/services/assessment/registry/AssessorDefinitions.js +5 -1
  116. package/client/lib/services/assessment/registry/types.d.ts +13 -0
  117. package/client/lib/services/assessment/registry/types.d.ts.map +1 -1
  118. package/client/package.json +1 -1
  119. package/package.json +1 -1
  120. package/server/package.json +1 -1
  121. package/client/lib/services/assessment/modules/ErrorHandlingAssessor.d.ts +0 -74
  122. package/client/lib/services/assessment/modules/ErrorHandlingAssessor.d.ts.map +0 -1
  123. package/client/lib/services/assessment/modules/ErrorHandlingAssessor.js +0 -1043
@@ -293,6 +293,40 @@ describe("buildConfig", () => {
293
293
  expect(result.logging?.level).toBe("error");
294
294
  });
295
295
  });
296
+ describe("deprecation warning for v2.0 default change (Issue #190)", () => {
297
+ let consoleWarnSpy;
298
+ beforeEach(() => {
299
+ consoleWarnSpy = jest
300
+ .spyOn(console, "warn")
301
+ .mockImplementation(() => { });
302
+ });
303
+ afterEach(() => {
304
+ consoleWarnSpy.mockRestore();
305
+ });
306
+ it("should warn when running without --profile and no module filters", () => {
307
+ buildConfig({ serverName: "test" });
308
+ expect(consoleWarnSpy).toHaveBeenCalledWith(expect.stringContaining("Running without --profile will default to --profile security in v2.0"));
309
+ });
310
+ it("should NOT warn when using --profile", () => {
311
+ buildConfig({ serverName: "test", profile: "security" });
312
+ expect(consoleWarnSpy).not.toHaveBeenCalledWith(expect.stringContaining("Running without --profile"));
313
+ });
314
+ it("should NOT warn when using --only-modules", () => {
315
+ resolveModuleNames.mockReturnValue(["functionality"]);
316
+ buildConfig({ serverName: "test", onlyModules: ["functionality"] });
317
+ expect(consoleWarnSpy).not.toHaveBeenCalledWith(expect.stringContaining("Running without --profile"));
318
+ });
319
+ it("should NOT warn when using --skip-modules", () => {
320
+ resolveModuleNames.mockReturnValue(["temporal"]);
321
+ buildConfig({ serverName: "test", skipModules: ["temporal"] });
322
+ expect(consoleWarnSpy).not.toHaveBeenCalledWith(expect.stringContaining("Running without --profile"));
323
+ });
324
+ it("should include migration guidance in warning message", () => {
325
+ buildConfig({ serverName: "test" });
326
+ expect(consoleWarnSpy).toHaveBeenCalledWith(expect.stringContaining("--profile full or --profile dev"));
327
+ expect(consoleWarnSpy).toHaveBeenCalledWith(expect.stringContaining("docs/CLI_ASSESSMENT_GUIDE.md"));
328
+ });
329
+ });
296
330
  describe("config version validation (Issue #107)", () => {
297
331
  let consoleWarnSpy;
298
332
  beforeEach(() => {
@@ -468,7 +468,7 @@ describe("Profile Validation", () => {
468
468
  /**
469
469
  * Profile validation logic from assess-full.ts
470
470
  */
471
- const VALID_PROFILES = ["quick", "security", "compliance", "full"];
471
+ const VALID_PROFILES = ["quick", "security", "compliance", "full", "dev"];
472
472
  function isValidProfileName(name) {
473
473
  return VALID_PROFILES.includes(name);
474
474
  }
@@ -478,6 +478,7 @@ describe("Profile Validation", () => {
478
478
  expect(isValidProfileName("security")).toBe(true);
479
479
  expect(isValidProfileName("compliance")).toBe(true);
480
480
  expect(isValidProfileName("full")).toBe(true);
481
+ expect(isValidProfileName("dev")).toBe(true);
481
482
  });
482
483
  });
483
484
  describe("Invalid profiles", () => {
@@ -5,15 +5,22 @@
5
5
  */
6
6
  /* eslint-disable @typescript-eslint/no-explicit-any */
7
7
  import { jest, describe, it, expect } from "@jest/globals";
8
- import { ASSESSMENT_PROFILES, PROFILE_METADATA, MODULE_ALIASES, DEPRECATED_MODULES, TIER_1_CORE_SECURITY, TIER_2_COMPLIANCE, TIER_3_CAPABILITY, TIER_4_EXTENDED, ALL_MODULES, resolveModuleNames, getProfileModules, isValidProfileName, getProfileHelpText, mapLegacyConfigToModules, modulesToLegacyConfig, } from "../profiles.js";
8
+ import { ASSESSMENT_PROFILES, PROFILE_METADATA, MODULE_ALIASES, DEPRECATED_MODULES, TIER_1_CORE_SECURITY, TIER_2_COMPLIANCE, TIER_3_CAPABILITY, TIER_4_DEVELOPMENT, ALL_MODULES, OPT_IN_MODULES, STANDARD_MODULES, resolveModuleNames, getProfileModules, isValidProfileName, getProfileHelpText, mapLegacyConfigToModules, modulesToLegacyConfig, } from "../profiles.js";
9
9
  describe("Profile Definitions", () => {
10
10
  afterEach(() => {
11
11
  jest.restoreAllMocks();
12
12
  });
13
13
  describe("Profile Constants", () => {
14
- it("should have four profiles defined", () => {
14
+ it("should have six profiles defined", () => {
15
15
  const profiles = Object.keys(ASSESSMENT_PROFILES);
16
- expect(profiles).toEqual(["quick", "security", "compliance", "full"]);
16
+ expect(profiles).toEqual([
17
+ "quick",
18
+ "security",
19
+ "compliance",
20
+ "full",
21
+ "dev",
22
+ "all",
23
+ ]);
17
24
  });
18
25
  it("should have metadata for all profiles", () => {
19
26
  const profileNames = Object.keys(ASSESSMENT_PROFILES);
@@ -38,26 +45,36 @@ describe("Profile Definitions", () => {
38
45
  });
39
46
  it("should have Tier 2 compliance modules", () => {
40
47
  expect(TIER_2_COMPLIANCE).toContain("toolAnnotations");
41
- expect(TIER_2_COMPLIANCE).toContain("prohibitedLibraries");
42
- expect(TIER_2_COMPLIANCE).toContain("manifestValidation");
43
48
  expect(TIER_2_COMPLIANCE).toContain("authentication");
49
+ expect(TIER_2_COMPLIANCE).toHaveLength(2);
44
50
  });
45
51
  it("should have Tier 3 capability modules", () => {
46
52
  expect(TIER_3_CAPABILITY).toContain("resources");
47
53
  expect(TIER_3_CAPABILITY).toContain("prompts");
48
54
  expect(TIER_3_CAPABILITY).toContain("crossCapability");
49
55
  });
50
- it("should have Tier 4 extended modules", () => {
51
- expect(TIER_4_EXTENDED).toContain("developerExperience");
52
- expect(TIER_4_EXTENDED).toContain("portability");
53
- expect(TIER_4_EXTENDED).toContain("externalAPIScanner");
56
+ it("should have Tier 4 development modules", () => {
57
+ expect(TIER_4_DEVELOPMENT).toContain("developerExperience");
58
+ expect(TIER_4_DEVELOPMENT).toContain("portability");
59
+ expect(TIER_4_DEVELOPMENT).toHaveLength(2);
54
60
  });
55
- it("should combine all tiers in ALL_MODULES", () => {
61
+ it("should have Opt-In modules", () => {
62
+ expect(OPT_IN_MODULES).toContain("prohibitedLibraries");
63
+ expect(OPT_IN_MODULES).toContain("manifestValidation");
64
+ expect(OPT_IN_MODULES).toContain("fileModularization");
65
+ expect(OPT_IN_MODULES).toContain("externalAPIScanner");
66
+ expect(OPT_IN_MODULES).toHaveLength(4);
67
+ });
68
+ it("should combine all tiers plus opt-in in ALL_MODULES", () => {
69
+ const expectedLength = STANDARD_MODULES.length + OPT_IN_MODULES.length;
70
+ expect(ALL_MODULES.length).toBe(expectedLength);
71
+ });
72
+ it("should have STANDARD_MODULES without opt-in", () => {
56
73
  const expectedLength = TIER_1_CORE_SECURITY.length +
57
74
  TIER_2_COMPLIANCE.length +
58
75
  TIER_3_CAPABILITY.length +
59
- TIER_4_EXTENDED.length;
60
- expect(ALL_MODULES.length).toBe(expectedLength);
76
+ TIER_4_DEVELOPMENT.length;
77
+ expect(STANDARD_MODULES.length).toBe(expectedLength);
61
78
  });
62
79
  });
63
80
  describe("Profile Compositions", () => {
@@ -77,10 +94,32 @@ describe("Profile Definitions", () => {
77
94
  expect(ASSESSMENT_PROFILES.compliance).toContain(module);
78
95
  }
79
96
  });
80
- it("full profile should include all tiers", () => {
81
- for (const module of ALL_MODULES) {
97
+ it("full profile should include all standard modules (excludes opt-in)", () => {
98
+ for (const module of STANDARD_MODULES) {
82
99
  expect(ASSESSMENT_PROFILES.full).toContain(module);
83
100
  }
101
+ // Verify opt-in modules are NOT included
102
+ for (const module of OPT_IN_MODULES) {
103
+ expect(ASSESSMENT_PROFILES.full).not.toContain(module);
104
+ }
105
+ });
106
+ it("dev profile should include all standard modules (excludes opt-in)", () => {
107
+ for (const module of STANDARD_MODULES) {
108
+ expect(ASSESSMENT_PROFILES.dev).toContain(module);
109
+ }
110
+ // Verify opt-in modules are NOT included
111
+ for (const module of OPT_IN_MODULES) {
112
+ expect(ASSESSMENT_PROFILES.dev).not.toContain(module);
113
+ }
114
+ });
115
+ it("dev and full profiles should be equivalent in v1.x", () => {
116
+ expect(ASSESSMENT_PROFILES.dev).toEqual(ASSESSMENT_PROFILES.full);
117
+ });
118
+ it("all profile should include all modules including opt-in", () => {
119
+ for (const module of ALL_MODULES) {
120
+ expect(ASSESSMENT_PROFILES.all).toContain(module);
121
+ }
122
+ expect(ASSESSMENT_PROFILES.all.length).toBe(ALL_MODULES.length);
84
123
  });
85
124
  });
86
125
  });
@@ -188,6 +227,12 @@ describe("isValidProfileName", () => {
188
227
  expect(isValidProfileName("compliance")).toBe(true);
189
228
  expect(isValidProfileName("full")).toBe(true);
190
229
  });
230
+ it("should return true for dev profile", () => {
231
+ expect(isValidProfileName("dev")).toBe(true);
232
+ });
233
+ it("should return true for all profile", () => {
234
+ expect(isValidProfileName("all")).toBe(true);
235
+ });
191
236
  it("should return false for invalid profile names", () => {
192
237
  expect(isValidProfileName("invalid")).toBe(false);
193
238
  expect(isValidProfileName("")).toBe(false);
@@ -206,6 +251,8 @@ describe("getProfileHelpText", () => {
206
251
  expect(help).toContain("security");
207
252
  expect(help).toContain("compliance");
208
253
  expect(help).toContain("full");
254
+ expect(help).toContain("dev");
255
+ expect(help).toContain("all");
209
256
  });
210
257
  it("should contain module counts", () => {
211
258
  const help = getProfileHelpText();
@@ -308,5 +355,17 @@ describe("Profile Metadata", () => {
308
355
  expect(PROFILE_METADATA.security.tiers.length).toBe(1);
309
356
  expect(PROFILE_METADATA.compliance.tiers.length).toBe(2);
310
357
  expect(PROFILE_METADATA.full.tiers.length).toBe(4);
358
+ expect(PROFILE_METADATA.dev.tiers.length).toBe(4);
359
+ expect(PROFILE_METADATA.all.tiers.length).toBe(5); // All 4 tiers + Opt-In
360
+ });
361
+ it("should have dev profile metadata", () => {
362
+ expect(PROFILE_METADATA.dev).toBeDefined();
363
+ expect(PROFILE_METADATA.dev.description).toContain("development");
364
+ expect(PROFILE_METADATA.dev.moduleCount).toBe(ASSESSMENT_PROFILES.dev.length);
365
+ });
366
+ it("should have all profile metadata", () => {
367
+ expect(PROFILE_METADATA.all).toBeDefined();
368
+ expect(PROFILE_METADATA.all.description).toContain("opt-in");
369
+ expect(PROFILE_METADATA.all.moduleCount).toBe(ASSESSMENT_PROFILES.all.length);
311
370
  });
312
371
  });
@@ -37,6 +37,13 @@ export function buildConfig(options) {
37
37
  config.assessmentCategories = modulesToLegacyConfig(profileModules);
38
38
  }
39
39
  else {
40
+ // Issue #190: Deprecation warning for v2.0 default change
41
+ // Only warn if user didn't specify --only-modules or --skip-modules
42
+ if (!options.onlyModules?.length && !options.skipModules?.length) {
43
+ console.warn("⚠️ Warning: Running without --profile will default to --profile security in v2.0.\n" +
44
+ " To preserve current behavior (all modules), use --profile full or --profile dev.\n" +
45
+ " See docs/CLI_ASSESSMENT_GUIDE.md for profile details.");
46
+ }
40
47
  // Derive module config from ASSESSMENT_CATEGORY_METADATA (single source of truth)
41
48
  const allModules = getAllModulesConfig({
42
49
  sourceCodePath: Boolean(options.sourceCodePath),
@@ -9,7 +9,7 @@
9
9
  * @module cli/lib/cli-parser
10
10
  */
11
11
  import { ASSESSMENT_CATEGORY_METADATA, } from "../../../client/lib/lib/assessmentTypes.js";
12
- import { ASSESSMENT_PROFILES, getProfileHelpText, TIER_1_CORE_SECURITY, TIER_2_COMPLIANCE, TIER_3_CAPABILITY, TIER_4_EXTENDED, } from "../profiles.js";
12
+ import { ASSESSMENT_PROFILES, getProfileHelpText, TIER_1_CORE_SECURITY, TIER_2_COMPLIANCE, TIER_3_CAPABILITY, TIER_4_DEVELOPMENT, OPT_IN_MODULES, } from "../profiles.js";
13
13
  import packageJson from "../../package.json" with { type: "json" };
14
14
  import { safeParseModuleNames, LogLevelSchema, ReportFormatSchema, OutputFormatSchema, AssessmentProfileNameSchema, } from "./cli-parserSchemas.js";
15
15
  // ============================================================================
@@ -508,7 +508,7 @@ Options:
508
508
  --claude-http Enable Claude Code via HTTP transport (connects to mcp-auditor proxy)
509
509
  --mcp-auditor-url <url> mcp-auditor URL for HTTP transport (default: http://localhost:8085)
510
510
  --full Enable all assessment modules (default)
511
- --profile <name> Use predefined module profile (quick, security, compliance, full)
511
+ --profile <name> Use predefined module profile (quick, security, compliance, full, dev)
512
512
  --temporal-invocations <n> Number of invocations per tool for rug pull detection (default: 3)
513
513
  --skip-temporal Skip temporal/rug pull testing (faster assessment)
514
514
  --conformance Enable official MCP conformance tests (experimental, requires HTTP/SSE transport)
@@ -557,7 +557,7 @@ Module Selection:
557
557
  mcpSpecCompliance -> protocolCompliance
558
558
  protocolConformance -> protocolCompliance
559
559
 
560
- Module Tiers (16 total):
560
+ Module Tiers (13 standard + 4 opt-in):
561
561
  Tier 1 - Core Security (Always Run):
562
562
  • Functionality - Tests all tools work correctly
563
563
  • Security - Prompt injection & vulnerability testing
@@ -568,8 +568,6 @@ Module Tiers (16 total):
568
568
 
569
569
  Tier 2 - Compliance (MCP Directory):
570
570
  • Tool Annotations - readOnlyHint/destructiveHint validation
571
- • Prohibited Libs - Dependency security checks
572
- • Manifest - MCPB manifest.json validation
573
571
  • Authentication - OAuth/auth evaluation
574
572
 
575
573
  Tier 3 - Capability-Based (Conditional):
@@ -577,10 +575,15 @@ Module Tiers (16 total):
577
575
  • Prompts - Prompt capability assessment
578
576
  • Cross-Capability - Chained vulnerability detection
579
577
 
580
- Tier 4 - Extended (Optional):
578
+ Tier 4 - Development:
581
579
  • Developer Experience - Documentation + usability assessment
582
580
  • Portability - Cross-platform compatibility
583
- • External API - External service detection
581
+
582
+ Opt-In Only (requires --profile all):
583
+ • Prohibited Libs - Dependency security checks (narrow scope)
584
+ • Manifest - MCPB manifest.json validation (bundles only)
585
+ • File Modularization - Code quality metrics (not security)
586
+ • External API - External service detection (informational)
584
587
 
585
588
  Transport Options:
586
589
  --config, --http, and --sse are mutually exclusive.
@@ -597,6 +600,8 @@ Examples:
597
600
  mcp-assess-full my-server --profile security # Security audit (~2-3min)
598
601
  mcp-assess-full my-server --profile compliance # Directory submission (~5min)
599
602
  mcp-assess-full my-server --profile full # Comprehensive audit (~10-15min)
603
+ mcp-assess-full my-server --profile dev # Development-focused (standard modules)
604
+ mcp-assess-full my-server --profile all # Everything including opt-in modules
600
605
 
601
606
  # Single module (fastest - bypasses orchestrator):
602
607
  mcp-assess-full my-server --http http://localhost:10900/mcp --module toolAnnotations
@@ -625,15 +630,17 @@ const MODULE_DESCRIPTIONS = {
625
630
  protocolCompliance: "MCP protocol + JSON-RPC validation",
626
631
  aupCompliance: "Acceptable use policy compliance",
627
632
  toolAnnotations: "Tool annotation validation (readOnlyHint, destructiveHint)",
628
- prohibitedLibraries: "Prohibited library detection",
629
- manifestValidation: "MCPB manifest.json validation",
630
633
  authentication: "OAuth/auth evaluation",
631
634
  resources: "Resource path traversal + sensitive data exposure",
632
635
  prompts: "Prompt AUP compliance + injection testing",
633
636
  crossCapability: "Cross-capability attack chain detection",
634
637
  developerExperience: "Documentation + usability assessment",
635
638
  portability: "Cross-platform compatibility",
636
- externalAPIScanner: "External API detection (requires --source)",
639
+ // Opt-in modules (Issue #200)
640
+ prohibitedLibraries: "Prohibited library detection (~25 libs, opt-in)",
641
+ manifestValidation: "MCPB manifest.json validation (bundles only, opt-in)",
642
+ fileModularization: "Code quality metrics (not security, opt-in)",
643
+ externalAPIScanner: "External API detection (informational, opt-in)",
637
644
  };
638
645
  /**
639
646
  * Print available modules organized by tier
@@ -645,8 +652,13 @@ export function printModules() {
645
652
  "";
646
653
  return ` ${name.padEnd(22)} ${desc}`;
647
654
  };
655
+ const standardCount = TIER_1_CORE_SECURITY.length +
656
+ TIER_2_COMPLIANCE.length +
657
+ TIER_3_CAPABILITY.length +
658
+ TIER_4_DEVELOPMENT.length;
659
+ const totalCount = standardCount + OPT_IN_MODULES.length;
648
660
  console.log(`
649
- Available Assessment Modules (16 total):
661
+ Available Assessment Modules (${standardCount} standard + ${OPT_IN_MODULES.length} opt-in = ${totalCount} total):
650
662
 
651
663
  Tier 1 - Core Security (${TIER_1_CORE_SECURITY.length} modules):
652
664
  ${TIER_1_CORE_SECURITY.map(formatModule).join("\n")}
@@ -657,17 +669,21 @@ ${TIER_2_COMPLIANCE.map(formatModule).join("\n")}
657
669
  Tier 3 - Capability-Based (${TIER_3_CAPABILITY.length} modules):
658
670
  ${TIER_3_CAPABILITY.map(formatModule).join("\n")}
659
671
 
660
- Tier 4 - Extended (${TIER_4_EXTENDED.length} modules):
661
- ${TIER_4_EXTENDED.map(formatModule).join("\n")}
672
+ Tier 4 - Development (${TIER_4_DEVELOPMENT.length} modules):
673
+ ${TIER_4_DEVELOPMENT.map(formatModule).join("\n")}
674
+
675
+ Opt-In Only (${OPT_IN_MODULES.length} modules - requires --profile all):
676
+ ${OPT_IN_MODULES.map(formatModule).join("\n")}
662
677
 
663
678
  Usage:
664
679
  --only-modules <list> Run only specified modules (comma-separated)
665
680
  --skip-modules <list> Skip specified modules (comma-separated)
666
- --profile <name> Use predefined profile (quick, security, compliance, full)
681
+ --profile <name> Use predefined profile (quick, security, compliance, full, dev, all)
667
682
 
668
683
  Examples:
669
684
  mcp-assess-full my-server --only-modules functionality,security
670
685
  mcp-assess-full my-server --skip-modules temporal,portability
671
686
  mcp-assess-full my-server --profile compliance
687
+ mcp-assess-full my-server --profile all # Include opt-in modules
672
688
  `);
673
689
  }
@@ -15,12 +15,15 @@ export { LogLevelSchema, ReportFormatSchema, OutputFormatSchema, TransportTypeSc
15
15
  export { ZOD_SCHEMA_VERSION };
16
16
  /**
17
17
  * Valid assessment profile names.
18
+ * Note: 'all' profile includes opt-in modules (Issue #200)
18
19
  */
19
20
  export const AssessmentProfileNameSchema = z.enum([
20
21
  "quick",
21
22
  "security",
22
23
  "compliance",
23
24
  "full",
25
+ "dev",
26
+ "all",
24
27
  ]);
25
28
  /**
26
29
  * Valid assessment module names.
@@ -2,19 +2,25 @@
2
2
  * Assessment Profiles
3
3
  *
4
4
  * Pre-configured module sets for common assessment scenarios.
5
- * Profiles map to the 4-tier module organization:
5
+ * Profiles map to the 4-tier + opt-in module organization:
6
6
  *
7
7
  * Tier 1: Core Security (Always Run)
8
8
  * - functionality, security, temporal, errorHandling, protocolCompliance, aupCompliance
9
9
  *
10
10
  * Tier 2: Compliance (MCP Directory)
11
- * - toolAnnotations, prohibitedLibraries, manifestValidation, authentication
11
+ * - toolAnnotations, authentication
12
12
  *
13
13
  * Tier 3: Capability-Based (Conditional)
14
14
  * - resources, prompts, crossCapability
15
15
  *
16
- * Tier 4: Extended (Optional)
17
- * - developerExperience, portability, externalAPIScanner
16
+ * Tier 4: Development
17
+ * - developerExperience, portability
18
+ *
19
+ * Opt-In Only (Issue #200 - requires explicit --profile all or --enable-*)
20
+ * - prohibitedLibraries: Narrow scope (~25 libs)
21
+ * - manifestValidation: Only for MCPB bundles
22
+ * - fileModularization: Code quality metric, not security
23
+ * - externalAPIScanner: Informational only
18
24
  *
19
25
  * @module cli/profiles
20
26
  */
@@ -49,13 +55,9 @@ export const TIER_1_CORE_SECURITY = [
49
55
  /**
50
56
  * Tier 2: Compliance modules
51
57
  * Required for MCP Directory submission compliance
58
+ * Note: prohibitedLibraries and manifestValidation moved to OPT_IN_MODULES (Issue #200)
52
59
  */
53
- export const TIER_2_COMPLIANCE = [
54
- "toolAnnotations",
55
- "prohibitedLibraries",
56
- "manifestValidation",
57
- "authentication",
58
- ];
60
+ export const TIER_2_COMPLIANCE = ["toolAnnotations", "authentication"];
59
61
  /**
60
62
  * Tier 3: Capability-Based modules
61
63
  * Only run when server has corresponding capabilities
@@ -66,23 +68,50 @@ export const TIER_3_CAPABILITY = [
66
68
  "crossCapability",
67
69
  ];
68
70
  /**
69
- * Tier 4: Extended modules
70
- * Optional assessments for comprehensive audits
71
+ * Tier 4: Development modules
72
+ * Development-focused assessments (code quality, portability)
73
+ * Note: externalAPIScanner moved to OPT_IN_MODULES (Issue #200)
71
74
  */
72
- export const TIER_4_EXTENDED = [
75
+ export const TIER_4_DEVELOPMENT = [
73
76
  "developerExperience",
74
77
  "portability",
78
+ ];
79
+ /**
80
+ * @deprecated Use TIER_4_DEVELOPMENT instead. Will be removed in v2.0.
81
+ */
82
+ export const TIER_4_EXTENDED = TIER_4_DEVELOPMENT;
83
+ /**
84
+ * Opt-in only modules (Issue #200)
85
+ * These modules NEVER run by default, even in --profile full or --profile dev.
86
+ * Requires explicit --profile all or --enable-<module> flag.
87
+ *
88
+ * Rationale for each:
89
+ * - prohibitedLibraries: Very narrow scope (~25 financial/media libs)
90
+ * - manifestValidation: Only applicable to MCPB bundles with manifest.json
91
+ * - fileModularization: Code quality metric, not security-relevant
92
+ * - externalAPIScanner: Informational only, doesn't detect vulnerabilities
93
+ */
94
+ export const OPT_IN_MODULES = [
95
+ "prohibitedLibraries",
96
+ "manifestValidation",
97
+ "fileModularization",
75
98
  "externalAPIScanner",
76
99
  ];
77
100
  /**
78
- * All available modules (new naming)
101
+ * Standard modules (excludes opt-in)
102
+ * These run with --profile full
79
103
  */
80
- export const ALL_MODULES = [
104
+ export const STANDARD_MODULES = [
81
105
  ...TIER_1_CORE_SECURITY,
82
106
  ...TIER_2_COMPLIANCE,
83
107
  ...TIER_3_CAPABILITY,
84
- ...TIER_4_EXTENDED,
108
+ ...TIER_4_DEVELOPMENT,
85
109
  ];
110
+ /**
111
+ * All available modules including opt-in (new naming)
112
+ * These run with --profile all
113
+ */
114
+ export const ALL_MODULES = [...STANDARD_MODULES, ...OPT_IN_MODULES];
86
115
  /**
87
116
  * Assessment profile definitions
88
117
  * Each profile includes a specific set of modules optimized for the use case.
@@ -111,16 +140,26 @@ export const ASSESSMENT_PROFILES = {
111
140
  */
112
141
  compliance: [...TIER_1_CORE_SECURITY, ...TIER_2_COMPLIANCE],
113
142
  /**
114
- * Full profile: All modules (Tier 1 + 2 + 3 + 4)
143
+ * Full profile: All standard modules (Tier 1 + 2 + 3 + 4, excludes opt-in)
115
144
  * Use when: Comprehensive audits, initial server review
116
145
  * Time: ~8-12 minutes
146
+ * Note: Does NOT include opt-in modules (Issue #200)
147
+ */
148
+ full: [...STANDARD_MODULES],
149
+ /**
150
+ * Dev profile: Same as full (standard modules, no opt-in)
151
+ * Use when: Development-focused testing
152
+ * Time: ~8-12 minutes
153
+ * Note: Does NOT include opt-in modules (Issue #200)
154
+ */
155
+ dev: [...STANDARD_MODULES],
156
+ /**
157
+ * All profile: Every module including opt-in (Issue #200)
158
+ * Use when: Comprehensive audit including niche modules
159
+ * Time: ~10-15 minutes
160
+ * Includes: Tier 1-4 + opt-in (prohibitedLibraries, manifestValidation, etc.)
117
161
  */
118
- full: [
119
- ...TIER_1_CORE_SECURITY,
120
- ...TIER_2_COMPLIANCE,
121
- ...TIER_3_CAPABILITY,
122
- ...TIER_4_EXTENDED,
123
- ],
162
+ all: [...ALL_MODULES],
124
163
  };
125
164
  export const PROFILE_METADATA = {
126
165
  quick: {
@@ -142,14 +181,37 @@ export const PROFILE_METADATA = {
142
181
  tiers: ["Tier 1 (Core Security)", "Tier 2 (Compliance)"],
143
182
  },
144
183
  full: {
145
- description: "Comprehensive audit with all assessment modules",
184
+ description: "All standard modules (excludes opt-in)",
146
185
  estimatedTime: "~8-12 minutes",
147
186
  moduleCount: ASSESSMENT_PROFILES.full.length,
148
187
  tiers: [
149
188
  "Tier 1 (Core Security)",
150
189
  "Tier 2 (Compliance)",
151
190
  "Tier 3 (Capability)",
152
- "Tier 4 (Extended)",
191
+ "Tier 4 (Development)",
192
+ ],
193
+ },
194
+ dev: {
195
+ description: "Same as full - standard modules for development",
196
+ estimatedTime: "~8-12 minutes",
197
+ moduleCount: ASSESSMENT_PROFILES.dev.length,
198
+ tiers: [
199
+ "Tier 1 (Core Security)",
200
+ "Tier 2 (Compliance)",
201
+ "Tier 3 (Capability)",
202
+ "Tier 4 (Development)",
203
+ ],
204
+ },
205
+ all: {
206
+ description: "Every module including opt-in (niche modules)",
207
+ estimatedTime: "~10-15 minutes",
208
+ moduleCount: ASSESSMENT_PROFILES.all.length,
209
+ tiers: [
210
+ "Tier 1 (Core Security)",
211
+ "Tier 2 (Compliance)",
212
+ "Tier 3 (Capability)",
213
+ "Tier 4 (Development)",
214
+ "Opt-In",
153
215
  ],
154
216
  },
155
217
  };
@@ -269,6 +331,7 @@ export function modulesToLegacyConfig(modules) {
269
331
  prompts: false,
270
332
  crossCapability: false,
271
333
  protocolConformance: false,
334
+ fileModularization: false, // Issue #200: Opt-in module
272
335
  };
273
336
  // Enable requested modules, mapping new names to old where needed
274
337
  for (const module of modules) {
package/cli/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bryan-thompson/inspector-assessment-cli",
3
- "version": "1.41.0",
3
+ "version": "1.42.0",
4
4
  "description": "CLI for the Enhanced MCP Inspector with assessment capabilities",
5
5
  "license": "MIT",
6
6
  "author": "Bryan Thompson <bryan@triepod.ai>",
@@ -1,4 +1,4 @@
1
- import { u as useToast, r as reactExports, j as jsxRuntimeExports, p as parseOAuthCallbackParams, g as generateOAuthErrorDescription, S as SESSION_KEYS, I as InspectorOAuthClientProvider, a as auth } from "./index-BfUEP2vZ.js";
1
+ import { u as useToast, r as reactExports, j as jsxRuntimeExports, p as parseOAuthCallbackParams, g as generateOAuthErrorDescription, S as SESSION_KEYS, I as InspectorOAuthClientProvider, a as auth } from "./index-DhZHooka.js";
2
2
  const OAuthCallback = ({ onConnect }) => {
3
3
  const { toast } = useToast();
4
4
  const hasProcessedRef = reactExports.useRef(false);
@@ -1,4 +1,4 @@
1
- import { r as reactExports, S as SESSION_KEYS, p as parseOAuthCallbackParams, j as jsxRuntimeExports, g as generateOAuthErrorDescription } from "./index-BfUEP2vZ.js";
1
+ import { r as reactExports, S as SESSION_KEYS, p as parseOAuthCallbackParams, j as jsxRuntimeExports, g as generateOAuthErrorDescription } from "./index-DhZHooka.js";
2
2
  const OAuthDebugCallback = ({ onConnect }) => {
3
3
  reactExports.useEffect(() => {
4
4
  let isProcessed = false;
@@ -16373,7 +16373,7 @@ object({
16373
16373
  token_type_hint: string().optional()
16374
16374
  }).strip();
16375
16375
  const name = "@bryan-thompson/inspector-assessment-client";
16376
- const version$1 = "1.41.0";
16376
+ const version$1 = "1.42.0";
16377
16377
  const packageJson = {
16378
16378
  name,
16379
16379
  version: version$1
@@ -49456,7 +49456,7 @@ const useTheme = () => {
49456
49456
  [theme, setThemeWithSideEffect]
49457
49457
  );
49458
49458
  };
49459
- const version = "1.41.0";
49459
+ const version = "1.42.0";
49460
49460
  var [createTooltipContext] = createContextScope("Tooltip", [
49461
49461
  createPopperScope
49462
49462
  ]);
@@ -52799,13 +52799,13 @@ const App = () => {
52799
52799
  };
52800
52800
  if (window.location.pathname === "/oauth/callback") {
52801
52801
  const OAuthCallback = React.lazy(
52802
- () => __vitePreload(() => import("./OAuthCallback-BncWs0fE.js"), true ? [] : void 0)
52802
+ () => __vitePreload(() => import("./OAuthCallback-Bbgu1k5Q.js"), true ? [] : void 0)
52803
52803
  );
52804
52804
  return /* @__PURE__ */ jsxRuntimeExports.jsx(reactExports.Suspense, { fallback: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: "Loading..." }), children: /* @__PURE__ */ jsxRuntimeExports.jsx(OAuthCallback, { onConnect: onOAuthConnect }) });
52805
52805
  }
52806
52806
  if (window.location.pathname === "/oauth/callback/debug") {
52807
52807
  const OAuthDebugCallback = React.lazy(
52808
- () => __vitePreload(() => import("./OAuthDebugCallback-C7SkhlxI.js"), true ? [] : void 0)
52808
+ () => __vitePreload(() => import("./OAuthDebugCallback-BNMp3ajr.js"), true ? [] : void 0)
52809
52809
  );
52810
52810
  return /* @__PURE__ */ jsxRuntimeExports.jsx(reactExports.Suspense, { fallback: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: "Loading..." }), children: /* @__PURE__ */ jsxRuntimeExports.jsx(OAuthDebugCallback, { onConnect: onOAuthDebugConnect }) });
52811
52811
  }
@@ -5,7 +5,7 @@
5
5
  <link rel="icon" type="image/svg+xml" href="/mcp.svg" />
6
6
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
7
  <title>MCP Inspector</title>
8
- <script type="module" crossorigin src="/assets/index-BfUEP2vZ.js"></script>
8
+ <script type="module" crossorigin src="/assets/index-DhZHooka.js"></script>
9
9
  <link rel="stylesheet" crossorigin href="/assets/index-BoUA5OL1.css">
10
10
  </head>
11
11
  <body>