@oculum/scanner 1.0.11 → 1.0.12

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 (309) hide show
  1. package/dist/ai-context/index.d.ts +6 -0
  2. package/dist/ai-context/index.d.ts.map +1 -0
  3. package/dist/ai-context/index.js +13 -0
  4. package/dist/ai-context/index.js.map +1 -0
  5. package/dist/ai-context/manager.d.ts +67 -0
  6. package/dist/ai-context/manager.d.ts.map +1 -0
  7. package/dist/ai-context/manager.js +104 -0
  8. package/dist/ai-context/manager.js.map +1 -0
  9. package/dist/category-filter.d.ts +125 -0
  10. package/dist/category-filter.d.ts.map +1 -0
  11. package/dist/category-filter.js +360 -0
  12. package/dist/category-filter.js.map +1 -0
  13. package/dist/filtering/context-adjustments.d.ts +23 -0
  14. package/dist/filtering/context-adjustments.d.ts.map +1 -0
  15. package/dist/filtering/context-adjustments.js +100 -0
  16. package/dist/filtering/context-adjustments.js.map +1 -0
  17. package/dist/filtering/index.d.ts +3 -0
  18. package/dist/filtering/index.d.ts.map +1 -0
  19. package/dist/filtering/index.js +8 -0
  20. package/dist/filtering/index.js.map +1 -0
  21. package/dist/filtering/pipeline.d.ts +48 -0
  22. package/dist/filtering/pipeline.d.ts.map +1 -0
  23. package/dist/filtering/pipeline.js +76 -0
  24. package/dist/filtering/pipeline.js.map +1 -0
  25. package/dist/formatters/ai-context.d.ts +23 -0
  26. package/dist/formatters/ai-context.d.ts.map +1 -0
  27. package/dist/formatters/ai-context.js +238 -0
  28. package/dist/formatters/ai-context.js.map +1 -0
  29. package/dist/formatters/github-comment.d.ts +1 -1
  30. package/dist/formatters/github-comment.d.ts.map +1 -1
  31. package/dist/formatters/github-comment.js +2 -2
  32. package/dist/formatters/github-comment.js.map +1 -1
  33. package/dist/formatters/ide/claude-code.d.ts +17 -0
  34. package/dist/formatters/ide/claude-code.d.ts.map +1 -0
  35. package/dist/formatters/ide/claude-code.js +94 -0
  36. package/dist/formatters/ide/claude-code.js.map +1 -0
  37. package/dist/formatters/ide/cursor.d.ts +13 -0
  38. package/dist/formatters/ide/cursor.d.ts.map +1 -0
  39. package/dist/formatters/ide/cursor.js +125 -0
  40. package/dist/formatters/ide/cursor.js.map +1 -0
  41. package/dist/formatters/ide/index.d.ts +62 -0
  42. package/dist/formatters/ide/index.d.ts.map +1 -0
  43. package/dist/formatters/ide/index.js +184 -0
  44. package/dist/formatters/ide/index.js.map +1 -0
  45. package/dist/formatters/ide/windsurf.d.ts +13 -0
  46. package/dist/formatters/ide/windsurf.d.ts.map +1 -0
  47. package/dist/formatters/ide/windsurf.js +117 -0
  48. package/dist/formatters/ide/windsurf.js.map +1 -0
  49. package/dist/formatters/index.d.ts +2 -0
  50. package/dist/formatters/index.d.ts.map +1 -1
  51. package/dist/formatters/index.js +17 -1
  52. package/dist/formatters/index.js.map +1 -1
  53. package/dist/index.d.ts +4 -0
  54. package/dist/index.d.ts.map +1 -1
  55. package/dist/index.js +272 -44
  56. package/dist/index.js.map +1 -1
  57. package/dist/layer1/comments.d.ts +4 -1
  58. package/dist/layer1/comments.d.ts.map +1 -1
  59. package/dist/layer1/comments.js +1 -1
  60. package/dist/layer1/comments.js.map +1 -1
  61. package/dist/layer1/config-audit.d.ts +4 -1
  62. package/dist/layer1/config-audit.d.ts.map +1 -1
  63. package/dist/layer1/config-audit.js +45 -11
  64. package/dist/layer1/config-audit.js.map +1 -1
  65. package/dist/layer1/config-mcp-audit.d.ts +4 -1
  66. package/dist/layer1/config-mcp-audit.d.ts.map +1 -1
  67. package/dist/layer1/config-mcp-audit.js +2 -2
  68. package/dist/layer1/config-mcp-audit.js.map +1 -1
  69. package/dist/layer1/entropy.d.ts +4 -1
  70. package/dist/layer1/entropy.d.ts.map +1 -1
  71. package/dist/layer1/entropy.js +212 -1
  72. package/dist/layer1/entropy.js.map +1 -1
  73. package/dist/layer1/file-flags.d.ts +4 -1
  74. package/dist/layer1/file-flags.d.ts.map +1 -1
  75. package/dist/layer1/file-flags.js +12 -5
  76. package/dist/layer1/file-flags.js.map +1 -1
  77. package/dist/layer1/index.d.ts.map +1 -1
  78. package/dist/layer1/index.js +14 -19
  79. package/dist/layer1/index.js.map +1 -1
  80. package/dist/layer1/patterns.d.ts +4 -1
  81. package/dist/layer1/patterns.d.ts.map +1 -1
  82. package/dist/layer1/patterns.js +34 -4
  83. package/dist/layer1/patterns.js.map +1 -1
  84. package/dist/layer1/urls.d.ts +4 -1
  85. package/dist/layer1/urls.d.ts.map +1 -1
  86. package/dist/layer1/urls.js +162 -14
  87. package/dist/layer1/urls.js.map +1 -1
  88. package/dist/layer1/weak-crypto.d.ts +4 -1
  89. package/dist/layer1/weak-crypto.d.ts.map +1 -1
  90. package/dist/layer1/weak-crypto.js +144 -7
  91. package/dist/layer1/weak-crypto.js.map +1 -1
  92. package/dist/layer2/ai-agent-tools.d.ts +4 -1
  93. package/dist/layer2/ai-agent-tools.d.ts.map +1 -1
  94. package/dist/layer2/ai-agent-tools.js +661 -2
  95. package/dist/layer2/ai-agent-tools.js.map +1 -1
  96. package/dist/layer2/ai-endpoint-protection.d.ts +2 -0
  97. package/dist/layer2/ai-endpoint-protection.d.ts.map +1 -1
  98. package/dist/layer2/ai-endpoint-protection.js +1 -1
  99. package/dist/layer2/ai-endpoint-protection.js.map +1 -1
  100. package/dist/layer2/ai-execution-sinks.d.ts +4 -1
  101. package/dist/layer2/ai-execution-sinks.d.ts.map +1 -1
  102. package/dist/layer2/ai-execution-sinks.js +252 -43
  103. package/dist/layer2/ai-execution-sinks.js.map +1 -1
  104. package/dist/layer2/ai-fingerprinting.d.ts +4 -1
  105. package/dist/layer2/ai-fingerprinting.d.ts.map +1 -1
  106. package/dist/layer2/ai-fingerprinting.js +25 -32
  107. package/dist/layer2/ai-fingerprinting.js.map +1 -1
  108. package/dist/layer2/ai-mcp-security.d.ts +4 -1
  109. package/dist/layer2/ai-mcp-security.d.ts.map +1 -1
  110. package/dist/layer2/ai-mcp-security.js +200 -2
  111. package/dist/layer2/ai-mcp-security.js.map +1 -1
  112. package/dist/layer2/ai-package-hallucination.d.ts +4 -1
  113. package/dist/layer2/ai-package-hallucination.d.ts.map +1 -1
  114. package/dist/layer2/ai-package-hallucination.js +136 -4
  115. package/dist/layer2/ai-package-hallucination.js.map +1 -1
  116. package/dist/layer2/ai-prompt-hygiene.d.ts +4 -1
  117. package/dist/layer2/ai-prompt-hygiene.d.ts.map +1 -1
  118. package/dist/layer2/ai-prompt-hygiene.js +342 -28
  119. package/dist/layer2/ai-prompt-hygiene.js.map +1 -1
  120. package/dist/layer2/ai-rag-safety.d.ts +4 -1
  121. package/dist/layer2/ai-rag-safety.d.ts.map +1 -1
  122. package/dist/layer2/ai-rag-safety.js +82 -2
  123. package/dist/layer2/ai-rag-safety.js.map +1 -1
  124. package/dist/layer2/ai-schema-validation.d.ts +4 -1
  125. package/dist/layer2/ai-schema-validation.d.ts.map +1 -1
  126. package/dist/layer2/ai-schema-validation.js +2 -2
  127. package/dist/layer2/ai-schema-validation.js.map +1 -1
  128. package/dist/layer2/auth-antipatterns.d.ts +2 -0
  129. package/dist/layer2/auth-antipatterns.d.ts.map +1 -1
  130. package/dist/layer2/auth-antipatterns.js +205 -20
  131. package/dist/layer2/auth-antipatterns.js.map +1 -1
  132. package/dist/layer2/byok-patterns.d.ts +4 -1
  133. package/dist/layer2/byok-patterns.d.ts.map +1 -1
  134. package/dist/layer2/byok-patterns.js +2 -2
  135. package/dist/layer2/byok-patterns.js.map +1 -1
  136. package/dist/layer2/dangerous-functions/dom-xss.d.ts +9 -4
  137. package/dist/layer2/dangerous-functions/dom-xss.d.ts.map +1 -1
  138. package/dist/layer2/dangerous-functions/dom-xss.js +73 -22
  139. package/dist/layer2/dangerous-functions/dom-xss.js.map +1 -1
  140. package/dist/layer2/dangerous-functions/index.d.ts +4 -1
  141. package/dist/layer2/dangerous-functions/index.d.ts.map +1 -1
  142. package/dist/layer2/dangerous-functions/index.js +551 -20
  143. package/dist/layer2/dangerous-functions/index.js.map +1 -1
  144. package/dist/layer2/dangerous-functions/math-random.d.ts +54 -4
  145. package/dist/layer2/dangerous-functions/math-random.d.ts.map +1 -1
  146. package/dist/layer2/dangerous-functions/math-random.js +241 -16
  147. package/dist/layer2/dangerous-functions/math-random.js.map +1 -1
  148. package/dist/layer2/dangerous-functions/patterns.d.ts.map +1 -1
  149. package/dist/layer2/dangerous-functions/patterns.js +3 -1
  150. package/dist/layer2/dangerous-functions/patterns.js.map +1 -1
  151. package/dist/layer2/dangerous-functions/utils/control-flow.d.ts +3 -2
  152. package/dist/layer2/dangerous-functions/utils/control-flow.d.ts.map +1 -1
  153. package/dist/layer2/dangerous-functions/utils/control-flow.js +41 -120
  154. package/dist/layer2/dangerous-functions/utils/control-flow.js.map +1 -1
  155. package/dist/layer2/dangerous-functions/utils/helpers.d.ts.map +1 -1
  156. package/dist/layer2/dangerous-functions/utils/helpers.js +26 -3
  157. package/dist/layer2/dangerous-functions/utils/helpers.js.map +1 -1
  158. package/dist/layer2/dangerous-functions/utils/schema-validation.d.ts.map +1 -1
  159. package/dist/layer2/dangerous-functions/utils/schema-validation.js +14 -1
  160. package/dist/layer2/dangerous-functions/utils/schema-validation.js.map +1 -1
  161. package/dist/layer2/data-exposure.d.ts +4 -1
  162. package/dist/layer2/data-exposure.d.ts.map +1 -1
  163. package/dist/layer2/data-exposure.js +11 -38
  164. package/dist/layer2/data-exposure.js.map +1 -1
  165. package/dist/layer2/framework-checks.d.ts +4 -1
  166. package/dist/layer2/framework-checks.d.ts.map +1 -1
  167. package/dist/layer2/framework-checks.js +2 -2
  168. package/dist/layer2/framework-checks.js.map +1 -1
  169. package/dist/layer2/index.d.ts +9 -1
  170. package/dist/layer2/index.d.ts.map +1 -1
  171. package/dist/layer2/index.js +57 -51
  172. package/dist/layer2/index.js.map +1 -1
  173. package/dist/layer2/logic-gates.d.ts +4 -1
  174. package/dist/layer2/logic-gates.d.ts.map +1 -1
  175. package/dist/layer2/logic-gates.js +54 -20
  176. package/dist/layer2/logic-gates.js.map +1 -1
  177. package/dist/layer2/model-supply-chain.d.ts +4 -1
  178. package/dist/layer2/model-supply-chain.d.ts.map +1 -1
  179. package/dist/layer2/model-supply-chain.js +72 -4
  180. package/dist/layer2/model-supply-chain.js.map +1 -1
  181. package/dist/layer2/risky-imports.d.ts +4 -1
  182. package/dist/layer2/risky-imports.d.ts.map +1 -1
  183. package/dist/layer2/risky-imports.js +2 -2
  184. package/dist/layer2/risky-imports.js.map +1 -1
  185. package/dist/layer2/variables.d.ts +4 -1
  186. package/dist/layer2/variables.d.ts.map +1 -1
  187. package/dist/layer2/variables.js +2 -2
  188. package/dist/layer2/variables.js.map +1 -1
  189. package/dist/layer3/anthropic/auto-dismiss.d.ts.map +1 -1
  190. package/dist/layer3/anthropic/auto-dismiss.js +11 -0
  191. package/dist/layer3/anthropic/auto-dismiss.js.map +1 -1
  192. package/dist/modes/incremental.js +1 -1
  193. package/dist/tiers.d.ts +2 -2
  194. package/dist/tiers.d.ts.map +1 -1
  195. package/dist/tiers.js +7 -7
  196. package/dist/tiers.js.map +1 -1
  197. package/dist/types.d.ts +78 -8
  198. package/dist/types.d.ts.map +1 -1
  199. package/dist/types.js +34 -0
  200. package/dist/types.js.map +1 -1
  201. package/dist/utils/code-analysis.d.ts +39 -0
  202. package/dist/utils/code-analysis.d.ts.map +1 -0
  203. package/dist/utils/code-analysis.js +159 -0
  204. package/dist/utils/code-analysis.js.map +1 -0
  205. package/dist/utils/comment-analyzer.d.ts +38 -0
  206. package/dist/utils/comment-analyzer.d.ts.map +1 -0
  207. package/dist/utils/comment-analyzer.js +218 -0
  208. package/dist/utils/comment-analyzer.js.map +1 -0
  209. package/dist/utils/context-helpers.d.ts +108 -1
  210. package/dist/utils/context-helpers.d.ts.map +1 -1
  211. package/dist/utils/context-helpers.js +351 -2
  212. package/dist/utils/context-helpers.js.map +1 -1
  213. package/dist/utils/environment-context.d.ts +76 -0
  214. package/dist/utils/environment-context.d.ts.map +1 -0
  215. package/dist/utils/environment-context.js +271 -0
  216. package/dist/utils/environment-context.js.map +1 -0
  217. package/dist/utils/intent-detector.d.ts +66 -0
  218. package/dist/utils/intent-detector.d.ts.map +1 -0
  219. package/dist/utils/intent-detector.js +282 -0
  220. package/dist/utils/intent-detector.js.map +1 -0
  221. package/dist/utils/parsed-file.d.ts +51 -0
  222. package/dist/utils/parsed-file.d.ts.map +1 -0
  223. package/dist/utils/parsed-file.js +95 -0
  224. package/dist/utils/parsed-file.js.map +1 -0
  225. package/dist/utils/route-hierarchy.d.ts +50 -0
  226. package/dist/utils/route-hierarchy.d.ts.map +1 -0
  227. package/dist/utils/route-hierarchy.js +226 -0
  228. package/dist/utils/route-hierarchy.js.map +1 -0
  229. package/dist/utils/schema-semantics.d.ts +45 -0
  230. package/dist/utils/schema-semantics.d.ts.map +1 -0
  231. package/dist/utils/schema-semantics.js +193 -0
  232. package/dist/utils/schema-semantics.js.map +1 -0
  233. package/package.json +1 -1
  234. package/src/__tests__/benchmark/fixtures/layer2/index.ts +12 -0
  235. package/src/__tests__/benchmark/fixtures/layer2/phase5-excessive-agency.ts +580 -0
  236. package/src/__tests__/benchmark/fixtures/layer2/sprint6-ai-enhancements.ts +515 -0
  237. package/src/__tests__/benchmark/run-depth-validation.ts +9 -9
  238. package/src/__tests__/category-filter.test.ts +478 -0
  239. package/src/__tests__/regression/known-false-positives.test.ts +490 -0
  240. package/src/__tests__/snapshots/__snapshots__/anthropic-validation-refactor.test.ts.snap +18 -14
  241. package/src/__tests__/snapshots/__snapshots__/scan-depth.test.ts.snap +0 -9
  242. package/src/__tests__/snapshots/anthropic-validation-refactor.test.ts +1 -1
  243. package/src/__tests__/validation/run-validation.ts +7 -7
  244. package/src/ai-context/__tests__/manager.test.ts +193 -0
  245. package/src/ai-context/index.ts +15 -0
  246. package/src/ai-context/manager.ts +145 -0
  247. package/src/baseline/__tests__/manager.test.ts +2 -2
  248. package/src/category-filter.ts +400 -0
  249. package/src/filtering/__tests__/pipeline.test.ts +134 -0
  250. package/src/filtering/context-adjustments.ts +111 -0
  251. package/src/filtering/index.ts +10 -0
  252. package/src/filtering/pipeline.ts +130 -0
  253. package/src/formatters/__tests__/ai-context.test.ts +254 -0
  254. package/src/formatters/ai-context.ts +302 -0
  255. package/src/formatters/github-comment.ts +3 -3
  256. package/src/formatters/ide/__tests__/ide.test.ts +319 -0
  257. package/src/formatters/ide/claude-code.ts +110 -0
  258. package/src/formatters/ide/cursor.ts +147 -0
  259. package/src/formatters/ide/index.ts +216 -0
  260. package/src/formatters/ide/windsurf.ts +135 -0
  261. package/src/formatters/index.ts +24 -0
  262. package/src/index.ts +312 -34
  263. package/src/layer1/comments.ts +3 -1
  264. package/src/layer1/config-audit.ts +50 -11
  265. package/src/layer1/config-mcp-audit.ts +4 -2
  266. package/src/layer1/entropy.ts +234 -1
  267. package/src/layer1/file-flags.ts +17 -6
  268. package/src/layer1/index.ts +14 -18
  269. package/src/layer1/patterns.ts +42 -4
  270. package/src/layer1/urls.ts +188 -14
  271. package/src/layer1/weak-crypto.ts +168 -16
  272. package/src/layer2/ai-agent-tools.ts +707 -2
  273. package/src/layer2/ai-endpoint-protection.ts +3 -1
  274. package/src/layer2/ai-execution-sinks.ts +265 -43
  275. package/src/layer2/ai-fingerprinting.ts +28 -32
  276. package/src/layer2/ai-mcp-security.ts +206 -3
  277. package/src/layer2/ai-package-hallucination.ts +153 -4
  278. package/src/layer2/ai-prompt-hygiene.ts +369 -26
  279. package/src/layer2/ai-rag-safety.ts +85 -2
  280. package/src/layer2/ai-schema-validation.ts +4 -2
  281. package/src/layer2/auth-antipatterns.ts +230 -20
  282. package/src/layer2/byok-patterns.ts +4 -2
  283. package/src/layer2/dangerous-functions/dom-xss.ts +94 -22
  284. package/src/layer2/dangerous-functions/index.ts +635 -51
  285. package/src/layer2/dangerous-functions/math-random.ts +268 -16
  286. package/src/layer2/dangerous-functions/patterns.ts +3 -1
  287. package/src/layer2/dangerous-functions/utils/control-flow.ts +8 -135
  288. package/src/layer2/dangerous-functions/utils/schema-validation.ts +16 -1
  289. package/src/layer2/data-exposure.ts +13 -38
  290. package/src/layer2/framework-checks.ts +4 -2
  291. package/src/layer2/index.ts +69 -50
  292. package/src/layer2/logic-gates.ts +59 -22
  293. package/src/layer2/model-supply-chain.ts +79 -4
  294. package/src/layer2/risky-imports.ts +4 -2
  295. package/src/layer2/variables.ts +4 -2
  296. package/src/layer3/anthropic/auto-dismiss.ts +11 -0
  297. package/src/modes/incremental.ts +1 -1
  298. package/src/tiers.ts +9 -9
  299. package/src/types.ts +122 -8
  300. package/src/utils/__tests__/code-analysis.test.ts +165 -0
  301. package/src/utils/__tests__/parsed-file.test.ts +124 -0
  302. package/src/utils/code-analysis.ts +179 -0
  303. package/src/utils/comment-analyzer.ts +249 -0
  304. package/src/utils/context-helpers.ts +408 -2
  305. package/src/utils/environment-context.ts +304 -0
  306. package/src/utils/intent-detector.ts +318 -0
  307. package/src/utils/parsed-file.ts +103 -0
  308. package/src/utils/route-hierarchy.ts +250 -0
  309. package/src/utils/schema-semantics.ts +233 -0
@@ -0,0 +1,62 @@
1
+ /**
2
+ * IDE Integration Module
3
+ * Exports formatters and utilities for IDE-specific config files
4
+ */
5
+ export { formatCursorRules } from './cursor';
6
+ export { formatWindsurfRules } from './windsurf';
7
+ export { formatClaudeCodeSection, OCULUM_SECTION_START, OCULUM_SECTION_END } from './claude-code';
8
+ /** Supported IDE types */
9
+ export type IDEType = 'cursor' | 'windsurf' | 'claude-code';
10
+ /** Default file paths for each IDE */
11
+ export declare const IDE_FILE_PATHS: Record<IDEType, string>;
12
+ /** Result of a file write operation */
13
+ export interface WriteIDEFileResult {
14
+ success: boolean;
15
+ path: string;
16
+ error?: string;
17
+ }
18
+ /** Result of a file clear operation */
19
+ export interface ClearIDEFilesResult {
20
+ success: boolean;
21
+ clearedFiles: string[];
22
+ errors: string[];
23
+ }
24
+ /**
25
+ * Detect which IDE configurations exist in the project
26
+ *
27
+ * @param projectPath - Path to the project root
28
+ * @returns Array of detected IDE types
29
+ */
30
+ export declare function detectIDEConfigs(projectPath: string): IDEType[];
31
+ /**
32
+ * Write an IDE-specific file
33
+ *
34
+ * @param projectPath - Path to the project root
35
+ * @param relativePath - Relative path for the file
36
+ * @param content - Content to write
37
+ * @returns Result object
38
+ */
39
+ export declare function writeIDEFile(projectPath: string, relativePath: string, content: string): WriteIDEFileResult;
40
+ /**
41
+ * Update the Oculum section in CLAUDE.md
42
+ * Replaces content between OCULUM_SECURITY_START and OCULUM_SECURITY_END markers
43
+ * If markers don't exist, appends the section at the end
44
+ *
45
+ * @param projectPath - Path to the project root
46
+ * @param section - The section content (including markers)
47
+ * @returns Result object
48
+ */
49
+ export declare function updateClaudeMdSection(projectPath: string, section: string): WriteIDEFileResult;
50
+ /**
51
+ * Clear IDE rule files
52
+ *
53
+ * @param projectPath - Path to the project root
54
+ * @param types - Optional array of IDE types to clear. If not provided, clears all.
55
+ * @returns Result object with list of cleared files
56
+ */
57
+ export declare function clearIDEFiles(projectPath: string, types?: IDEType[]): ClearIDEFilesResult;
58
+ /**
59
+ * Get the default file path for an IDE type
60
+ */
61
+ export declare function getIDEFilePath(ide: IDEType): string;
62
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/formatters/ide/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAMH,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAA;AAC5C,OAAO,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAA;AAChD,OAAO,EAAE,uBAAuB,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAA;AAEjG,0BAA0B;AAC1B,MAAM,MAAM,OAAO,GAAG,QAAQ,GAAG,UAAU,GAAG,aAAa,CAAA;AAE3D,sCAAsC;AACtC,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,OAAO,EAAE,MAAM,CAIlD,CAAA;AAED,uCAAuC;AACvC,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,OAAO,CAAA;IAChB,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED,uCAAuC;AACvC,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,OAAO,CAAA;IAChB,YAAY,EAAE,MAAM,EAAE,CAAA;IACtB,MAAM,EAAE,MAAM,EAAE,CAAA;CACjB;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,EAAE,CAmB/D;AAED;;;;;;;GAOG;AACH,wBAAgB,YAAY,CAC1B,WAAW,EAAE,MAAM,EACnB,YAAY,EAAE,MAAM,EACpB,OAAO,EAAE,MAAM,GACd,kBAAkB,CAqBpB;AAED;;;;;;;;GAQG;AACH,wBAAgB,qBAAqB,CACnC,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,MAAM,GACd,kBAAkB,CAwCpB;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,CAC3B,WAAW,EAAE,MAAM,EACnB,KAAK,CAAC,EAAE,OAAO,EAAE,GAChB,mBAAmB,CA6CrB;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,OAAO,GAAG,MAAM,CAEnD"}
@@ -0,0 +1,184 @@
1
+ "use strict";
2
+ /**
3
+ * IDE Integration Module
4
+ * Exports formatters and utilities for IDE-specific config files
5
+ */
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.IDE_FILE_PATHS = exports.OCULUM_SECTION_END = exports.OCULUM_SECTION_START = exports.formatClaudeCodeSection = exports.formatWindsurfRules = exports.formatCursorRules = void 0;
8
+ exports.detectIDEConfigs = detectIDEConfigs;
9
+ exports.writeIDEFile = writeIDEFile;
10
+ exports.updateClaudeMdSection = updateClaudeMdSection;
11
+ exports.clearIDEFiles = clearIDEFiles;
12
+ exports.getIDEFilePath = getIDEFilePath;
13
+ const fs_1 = require("fs");
14
+ const path_1 = require("path");
15
+ // Export formatters
16
+ var cursor_1 = require("./cursor");
17
+ Object.defineProperty(exports, "formatCursorRules", { enumerable: true, get: function () { return cursor_1.formatCursorRules; } });
18
+ var windsurf_1 = require("./windsurf");
19
+ Object.defineProperty(exports, "formatWindsurfRules", { enumerable: true, get: function () { return windsurf_1.formatWindsurfRules; } });
20
+ var claude_code_1 = require("./claude-code");
21
+ Object.defineProperty(exports, "formatClaudeCodeSection", { enumerable: true, get: function () { return claude_code_1.formatClaudeCodeSection; } });
22
+ Object.defineProperty(exports, "OCULUM_SECTION_START", { enumerable: true, get: function () { return claude_code_1.OCULUM_SECTION_START; } });
23
+ Object.defineProperty(exports, "OCULUM_SECTION_END", { enumerable: true, get: function () { return claude_code_1.OCULUM_SECTION_END; } });
24
+ /** Default file paths for each IDE */
25
+ exports.IDE_FILE_PATHS = {
26
+ cursor: '.cursor/rules/security.mdc',
27
+ windsurf: '.windsurfrules',
28
+ 'claude-code': 'CLAUDE.md',
29
+ };
30
+ /**
31
+ * Detect which IDE configurations exist in the project
32
+ *
33
+ * @param projectPath - Path to the project root
34
+ * @returns Array of detected IDE types
35
+ */
36
+ function detectIDEConfigs(projectPath) {
37
+ const detected = [];
38
+ // Check for Cursor
39
+ if ((0, fs_1.existsSync)((0, path_1.join)(projectPath, '.cursor'))) {
40
+ detected.push('cursor');
41
+ }
42
+ // Check for Windsurf rules
43
+ if ((0, fs_1.existsSync)((0, path_1.join)(projectPath, '.windsurfrules'))) {
44
+ detected.push('windsurf');
45
+ }
46
+ // Check for Claude Code
47
+ if ((0, fs_1.existsSync)((0, path_1.join)(projectPath, 'CLAUDE.md'))) {
48
+ detected.push('claude-code');
49
+ }
50
+ return detected;
51
+ }
52
+ /**
53
+ * Write an IDE-specific file
54
+ *
55
+ * @param projectPath - Path to the project root
56
+ * @param relativePath - Relative path for the file
57
+ * @param content - Content to write
58
+ * @returns Result object
59
+ */
60
+ function writeIDEFile(projectPath, relativePath, content) {
61
+ const fullPath = (0, path_1.join)(projectPath, relativePath);
62
+ try {
63
+ // Ensure directory exists
64
+ const dir = (0, path_1.dirname)(fullPath);
65
+ if (!(0, fs_1.existsSync)(dir)) {
66
+ (0, fs_1.mkdirSync)(dir, { recursive: true });
67
+ }
68
+ // Write file
69
+ (0, fs_1.writeFileSync)(fullPath, content);
70
+ return { success: true, path: fullPath };
71
+ }
72
+ catch (err) {
73
+ return {
74
+ success: false,
75
+ path: fullPath,
76
+ error: `Failed to write ${relativePath}: ${err instanceof Error ? err.message : 'Unknown error'}`,
77
+ };
78
+ }
79
+ }
80
+ /**
81
+ * Update the Oculum section in CLAUDE.md
82
+ * Replaces content between OCULUM_SECURITY_START and OCULUM_SECURITY_END markers
83
+ * If markers don't exist, appends the section at the end
84
+ *
85
+ * @param projectPath - Path to the project root
86
+ * @param section - The section content (including markers)
87
+ * @returns Result object
88
+ */
89
+ function updateClaudeMdSection(projectPath, section) {
90
+ const filePath = (0, path_1.join)(projectPath, 'CLAUDE.md');
91
+ try {
92
+ let content;
93
+ if ((0, fs_1.existsSync)(filePath)) {
94
+ content = (0, fs_1.readFileSync)(filePath, 'utf-8');
95
+ // Check if markers exist
96
+ const startMarker = '<!-- OCULUM_SECURITY_START -->';
97
+ const endMarker = '<!-- OCULUM_SECURITY_END -->';
98
+ const startIndex = content.indexOf(startMarker);
99
+ const endIndex = content.indexOf(endMarker);
100
+ if (startIndex !== -1 && endIndex !== -1 && endIndex > startIndex) {
101
+ // Replace existing section
102
+ content =
103
+ content.substring(0, startIndex) +
104
+ section +
105
+ content.substring(endIndex + endMarker.length);
106
+ }
107
+ else {
108
+ // Append section at end
109
+ content = content.trimEnd() + '\n\n' + section;
110
+ }
111
+ }
112
+ else {
113
+ // Create new file with section
114
+ content = `# CLAUDE.md\n\n${section}`;
115
+ }
116
+ (0, fs_1.writeFileSync)(filePath, content);
117
+ return { success: true, path: filePath };
118
+ }
119
+ catch (err) {
120
+ return {
121
+ success: false,
122
+ path: filePath,
123
+ error: `Failed to update CLAUDE.md: ${err instanceof Error ? err.message : 'Unknown error'}`,
124
+ };
125
+ }
126
+ }
127
+ /**
128
+ * Clear IDE rule files
129
+ *
130
+ * @param projectPath - Path to the project root
131
+ * @param types - Optional array of IDE types to clear. If not provided, clears all.
132
+ * @returns Result object with list of cleared files
133
+ */
134
+ function clearIDEFiles(projectPath, types) {
135
+ const toCheck = types || ['cursor', 'windsurf', 'claude-code'];
136
+ const clearedFiles = [];
137
+ const errors = [];
138
+ for (const ide of toCheck) {
139
+ const relativePath = exports.IDE_FILE_PATHS[ide];
140
+ const fullPath = (0, path_1.join)(projectPath, relativePath);
141
+ try {
142
+ if (ide === 'claude-code') {
143
+ // For CLAUDE.md, remove only the Oculum section, not the whole file
144
+ if ((0, fs_1.existsSync)(fullPath)) {
145
+ const content = (0, fs_1.readFileSync)(fullPath, 'utf-8');
146
+ const startMarker = '<!-- OCULUM_SECURITY_START -->';
147
+ const endMarker = '<!-- OCULUM_SECURITY_END -->';
148
+ const startIndex = content.indexOf(startMarker);
149
+ const endIndex = content.indexOf(endMarker);
150
+ if (startIndex !== -1 && endIndex !== -1) {
151
+ // Remove section (including potential surrounding newlines)
152
+ let newContent = content.substring(0, startIndex) + content.substring(endIndex + endMarker.length);
153
+ // Clean up extra newlines
154
+ newContent = newContent.replace(/\n{3,}/g, '\n\n').trimEnd() + '\n';
155
+ (0, fs_1.writeFileSync)(fullPath, newContent);
156
+ clearedFiles.push(relativePath);
157
+ }
158
+ }
159
+ }
160
+ else {
161
+ // For other IDEs, delete the file
162
+ if ((0, fs_1.existsSync)(fullPath)) {
163
+ (0, fs_1.unlinkSync)(fullPath);
164
+ clearedFiles.push(relativePath);
165
+ }
166
+ }
167
+ }
168
+ catch (err) {
169
+ errors.push(`Failed to clear ${relativePath}: ${err instanceof Error ? err.message : 'Unknown error'}`);
170
+ }
171
+ }
172
+ return {
173
+ success: errors.length === 0,
174
+ clearedFiles,
175
+ errors,
176
+ };
177
+ }
178
+ /**
179
+ * Get the default file path for an IDE type
180
+ */
181
+ function getIDEFilePath(ide) {
182
+ return exports.IDE_FILE_PATHS[ide];
183
+ }
184
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/formatters/ide/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAwCH,4CAmBC;AAUD,oCAyBC;AAWD,sDA2CC;AASD,sCAgDC;AAKD,wCAEC;AAlND,2BAAmF;AACnF,+BAAoC;AAEpC,oBAAoB;AACpB,mCAA4C;AAAnC,2GAAA,iBAAiB,OAAA;AAC1B,uCAAgD;AAAvC,+GAAA,mBAAmB,OAAA;AAC5B,6CAAiG;AAAxF,sHAAA,uBAAuB,OAAA;AAAE,mHAAA,oBAAoB,OAAA;AAAE,iHAAA,kBAAkB,OAAA;AAK1E,sCAAsC;AACzB,QAAA,cAAc,GAA4B;IACrD,MAAM,EAAE,4BAA4B;IACpC,QAAQ,EAAE,gBAAgB;IAC1B,aAAa,EAAE,WAAW;CAC3B,CAAA;AAgBD;;;;;GAKG;AACH,SAAgB,gBAAgB,CAAC,WAAmB;IAClD,MAAM,QAAQ,GAAc,EAAE,CAAA;IAE9B,mBAAmB;IACnB,IAAI,IAAA,eAAU,EAAC,IAAA,WAAI,EAAC,WAAW,EAAE,SAAS,CAAC,CAAC,EAAE,CAAC;QAC7C,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA;IACzB,CAAC;IAED,2BAA2B;IAC3B,IAAI,IAAA,eAAU,EAAC,IAAA,WAAI,EAAC,WAAW,EAAE,gBAAgB,CAAC,CAAC,EAAE,CAAC;QACpD,QAAQ,CAAC,IAAI,CAAC,UAAU,CAAC,CAAA;IAC3B,CAAC;IAED,wBAAwB;IACxB,IAAI,IAAA,eAAU,EAAC,IAAA,WAAI,EAAC,WAAW,EAAE,WAAW,CAAC,CAAC,EAAE,CAAC;QAC/C,QAAQ,CAAC,IAAI,CAAC,aAAa,CAAC,CAAA;IAC9B,CAAC;IAED,OAAO,QAAQ,CAAA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IAAI,CAAC,YAAY,CAAC,CAAA;gBACjC,CAAC;YACH,CAAC;QACH,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,MAAM,CAAC,IAAI,CAAC,mBAAmB,YAAY,KAAK,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,eAAe,EAAE,CAAC,CAAA;QACzG,CAAC;IACH,CAAC;IAED,OAAO;QACL,OAAO,EAAE,MAAM,CAAC,MAAM,KAAK,CAAC;QAC5B,YAAY;QACZ,MAAM;KACP,CAAA;AACH,CAAC;AAED;;GAEG;AACH,SAAgB,cAAc,CAAC,GAAY;IACzC,OAAO,sBAAc,CAAC,GAAG,CAAC,CAAA;AAC5B,CAAC"}
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Windsurf IDE Integration
3
+ * Generates .windsurfrules format
4
+ */
5
+ import type { ScanResult } from '../../types';
6
+ /**
7
+ * Format scan result as Windsurf rules
8
+ *
9
+ * @param result - The scan result to format
10
+ * @returns Markdown string for .windsurfrules
11
+ */
12
+ export declare function formatWindsurfRules(result: ScanResult): string;
13
+ //# sourceMappingURL=windsurf.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"windsurf.d.ts","sourceRoot":"","sources":["../../../src/formatters/ide/windsurf.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAwC,MAAM,aAAa,CAAA;AA0BnF;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,UAAU,GAAG,MAAM,CAiG9D"}
@@ -0,0 +1,117 @@
1
+ "use strict";
2
+ /**
3
+ * Windsurf IDE Integration
4
+ * Generates .windsurfrules format
5
+ */
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.formatWindsurfRules = formatWindsurfRules;
8
+ const grouping_1 = require("../grouping");
9
+ /**
10
+ * Get security pattern rule for a category
11
+ */
12
+ function getPatternRule(category) {
13
+ const rules = {
14
+ sql_injection: 'ALWAYS use parameterized queries for database operations.',
15
+ xss: 'ALWAYS escape user input before inserting into HTML.',
16
+ hardcoded_secret: 'NEVER hardcode secrets, API keys, or credentials in source code.',
17
+ high_entropy_string: 'NEVER commit high-entropy strings that could be secrets.',
18
+ missing_auth: 'ALWAYS add authentication middleware to API endpoints.',
19
+ dangerous_function: 'NEVER use eval(), exec(), or similar functions with user input.',
20
+ command_injection: 'ALWAYS sanitize input before passing to shell commands.',
21
+ sensitive_url: 'NEVER hardcode localhost or internal URLs in production code.',
22
+ insecure_config: 'ALWAYS review configuration files for security issues.',
23
+ data_exposure: 'NEVER log or expose sensitive data in error messages.',
24
+ weak_crypto: 'ALWAYS use strong cryptographic algorithms (avoid MD5, SHA1).',
25
+ ai_prompt_injection: 'ALWAYS sanitize user input before including in AI prompts.',
26
+ ai_unsafe_execution: 'NEVER execute code generated by AI without validation.',
27
+ };
28
+ return rules[category] || null;
29
+ }
30
+ /**
31
+ * Format scan result as Windsurf rules
32
+ *
33
+ * @param result - The scan result to format
34
+ * @returns Markdown string for .windsurfrules
35
+ */
36
+ function formatWindsurfRules(result) {
37
+ const { vulnerabilities, timestamp } = result;
38
+ // Sort by severity
39
+ const sorted = (0, grouping_1.sortBySeverity)(vulnerabilities);
40
+ let md = '';
41
+ // Header
42
+ md += `# Oculum Security Rules\n\n`;
43
+ md += `> Generated: ${timestamp}\n\n`;
44
+ // No findings case
45
+ if (vulnerabilities.length === 0) {
46
+ md += `## Status\n\n`;
47
+ md += `No security issues found.\n\n`;
48
+ md += `*Run \`oculum scan --windsurf --clear\` to remove this file.*\n`;
49
+ return md;
50
+ }
51
+ // Security Issues Section
52
+ md += `## Security Issues\n\n`;
53
+ md += `The following security issues were detected and need attention:\n\n`;
54
+ // Group by file
55
+ const byFile = new Map();
56
+ for (const vuln of sorted) {
57
+ const group = byFile.get(vuln.filePath) || [];
58
+ group.push(vuln);
59
+ byFile.set(vuln.filePath, group);
60
+ }
61
+ // List by file
62
+ for (const [filePath, vulns] of byFile) {
63
+ md += `### ${filePath}\n\n`;
64
+ for (const vuln of vulns) {
65
+ const severityEmoji = vuln.severity === 'critical' ? '!!' :
66
+ vuln.severity === 'high' ? '!' :
67
+ vuln.severity === 'medium' ? '*' : '-';
68
+ md += `- ${severityEmoji} **Line ${vuln.lineNumber}:** ${vuln.title}`;
69
+ if (vuln.suggestedFix) {
70
+ md += ` - ${vuln.suggestedFix}`;
71
+ }
72
+ md += '\n';
73
+ }
74
+ md += '\n';
75
+ }
76
+ // Code Patterns Section
77
+ md += `## Code Patterns\n\n`;
78
+ md += `Follow these security patterns when writing code:\n\n`;
79
+ // Collect unique pattern rules
80
+ const patternRules = new Set();
81
+ for (const vuln of vulnerabilities) {
82
+ const rule = getPatternRule(vuln.category);
83
+ if (rule) {
84
+ patternRules.add(rule);
85
+ }
86
+ }
87
+ for (const rule of patternRules) {
88
+ md += `- ${rule}\n`;
89
+ }
90
+ md += '\n';
91
+ // Quick Reference
92
+ md += `## Quick Reference\n\n`;
93
+ md += `| Severity | Count | Action |\n`;
94
+ md += `|----------|-------|--------|\n`;
95
+ const { severityCounts } = result;
96
+ if (severityCounts.critical > 0) {
97
+ md += `| Critical | ${severityCounts.critical} | Fix immediately |\n`;
98
+ }
99
+ if (severityCounts.high > 0) {
100
+ md += `| High | ${severityCounts.high} | Fix before commit |\n`;
101
+ }
102
+ if (severityCounts.medium > 0) {
103
+ md += `| Medium | ${severityCounts.medium} | Review and fix |\n`;
104
+ }
105
+ if (severityCounts.low > 0) {
106
+ md += `| Low | ${severityCounts.low} | Consider fixing |\n`;
107
+ }
108
+ if (severityCounts.info > 0) {
109
+ md += `| Info | ${severityCounts.info} | For awareness |\n`;
110
+ }
111
+ md += '\n';
112
+ // Footer
113
+ md += `---\n\n`;
114
+ md += `*Run \`oculum scan\` to verify fixes. Run \`oculum scan --windsurf --clear\` to remove this file.*\n`;
115
+ return md;
116
+ }
117
+ //# sourceMappingURL=windsurf.js.map
@@ -0,0 +1 @@
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AAC"}
@@ -3,6 +3,8 @@
3
3
  * Export all formatting utilities for different workflows
4
4
  */
5
5
  export { groupByTheme, limitPerGroup, sortBySeverity, getBlockingIssues, getActionableIssues, getRiskTheme, THEME_CONFIG, type RiskTheme, type GroupedFindings, } from './grouping';
6
+ export { formatAIContext, type AIContextOptions, } from './ai-context';
7
+ export { formatCursorRules, formatWindsurfRules, formatClaudeCodeSection, detectIDEConfigs, writeIDEFile, updateClaudeMdSection, clearIDEFiles, getIDEFilePath, OCULUM_SECTION_START, OCULUM_SECTION_END, IDE_FILE_PATHS, type IDEType, type WriteIDEFileResult, type ClearIDEFilesResult, } from './ide';
6
8
  export { formatGitHubComment, formatShortStatus, formatAnnotation, type GitHubCommentOptions, } from './github-comment';
7
9
  export { formatDiagnostic, formatDiagnosticsByFile, generateCodeAction, formatForProblemsPanel, DiagnosticSeverity, type Diagnostic, type DiagnosticsByFile, type CodeAction, type Position, type Range, } from './vscode-diagnostic';
8
10
  export { formatTerminalOutput, formatSimpleList, formatJSON, formatSARIF, formatCompactSummary, getNumberedFindings, formatFindingDetail, type CompactSummaryOptions, } from './cli-terminal';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/formatters/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EACL,YAAY,EACZ,aAAa,EACb,cAAc,EACd,iBAAiB,EACjB,mBAAmB,EACnB,YAAY,EACZ,YAAY,EACZ,KAAK,SAAS,EACd,KAAK,eAAe,GACrB,MAAM,YAAY,CAAA;AAGnB,OAAO,EACL,mBAAmB,EACnB,iBAAiB,EACjB,gBAAgB,EAChB,KAAK,oBAAoB,GAC1B,MAAM,kBAAkB,CAAA;AAGzB,OAAO,EACL,gBAAgB,EAChB,uBAAuB,EACvB,kBAAkB,EAClB,sBAAsB,EACtB,kBAAkB,EAClB,KAAK,UAAU,EACf,KAAK,iBAAiB,EACtB,KAAK,UAAU,EACf,KAAK,QAAQ,EACb,KAAK,KAAK,GACX,MAAM,qBAAqB,CAAA;AAG5B,OAAO,EACL,oBAAoB,EACpB,gBAAgB,EAChB,UAAU,EACV,WAAW,EACX,oBAAoB,EACpB,mBAAmB,EACnB,mBAAmB,EACnB,KAAK,qBAAqB,GAC3B,MAAM,gBAAgB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/formatters/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EACL,YAAY,EACZ,aAAa,EACb,cAAc,EACd,iBAAiB,EACjB,mBAAmB,EACnB,YAAY,EACZ,YAAY,EACZ,KAAK,SAAS,EACd,KAAK,eAAe,GACrB,MAAM,YAAY,CAAA;AAGnB,OAAO,EACL,eAAe,EACf,KAAK,gBAAgB,GACtB,MAAM,cAAc,CAAA;AAGrB,OAAO,EACL,iBAAiB,EACjB,mBAAmB,EACnB,uBAAuB,EACvB,gBAAgB,EAChB,YAAY,EACZ,qBAAqB,EACrB,aAAa,EACb,cAAc,EACd,oBAAoB,EACpB,kBAAkB,EAClB,cAAc,EACd,KAAK,OAAO,EACZ,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,GACzB,MAAM,OAAO,CAAA;AAGd,OAAO,EACL,mBAAmB,EACnB,iBAAiB,EACjB,gBAAgB,EAChB,KAAK,oBAAoB,GAC1B,MAAM,kBAAkB,CAAA;AAGzB,OAAO,EACL,gBAAgB,EAChB,uBAAuB,EACvB,kBAAkB,EAClB,sBAAsB,EACtB,kBAAkB,EAClB,KAAK,UAAU,EACf,KAAK,iBAAiB,EACtB,KAAK,UAAU,EACf,KAAK,QAAQ,EACb,KAAK,KAAK,GACX,MAAM,qBAAqB,CAAA;AAG5B,OAAO,EACL,oBAAoB,EACpB,gBAAgB,EAChB,UAAU,EACV,WAAW,EACX,oBAAoB,EACpB,mBAAmB,EACnB,mBAAmB,EACnB,KAAK,qBAAqB,GAC3B,MAAM,gBAAgB,CAAA"}
@@ -4,7 +4,7 @@
4
4
  * Export all formatting utilities for different workflows
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.formatFindingDetail = exports.getNumberedFindings = exports.formatCompactSummary = exports.formatSARIF = exports.formatJSON = exports.formatSimpleList = exports.formatTerminalOutput = exports.DiagnosticSeverity = exports.formatForProblemsPanel = exports.generateCodeAction = exports.formatDiagnosticsByFile = exports.formatDiagnostic = exports.formatAnnotation = exports.formatShortStatus = exports.formatGitHubComment = exports.THEME_CONFIG = exports.getRiskTheme = exports.getActionableIssues = exports.getBlockingIssues = exports.sortBySeverity = exports.limitPerGroup = exports.groupByTheme = void 0;
7
+ exports.formatFindingDetail = exports.getNumberedFindings = exports.formatCompactSummary = exports.formatSARIF = exports.formatJSON = exports.formatSimpleList = exports.formatTerminalOutput = exports.DiagnosticSeverity = exports.formatForProblemsPanel = exports.generateCodeAction = exports.formatDiagnosticsByFile = exports.formatDiagnostic = exports.formatAnnotation = exports.formatShortStatus = exports.formatGitHubComment = exports.IDE_FILE_PATHS = exports.OCULUM_SECTION_END = exports.OCULUM_SECTION_START = exports.getIDEFilePath = exports.clearIDEFiles = exports.updateClaudeMdSection = exports.writeIDEFile = exports.detectIDEConfigs = exports.formatClaudeCodeSection = exports.formatWindsurfRules = exports.formatCursorRules = exports.formatAIContext = exports.THEME_CONFIG = exports.getRiskTheme = exports.getActionableIssues = exports.getBlockingIssues = exports.sortBySeverity = exports.limitPerGroup = exports.groupByTheme = void 0;
8
8
  // Grouping utilities
9
9
  var grouping_1 = require("./grouping");
10
10
  Object.defineProperty(exports, "groupByTheme", { enumerable: true, get: function () { return grouping_1.groupByTheme; } });
@@ -14,6 +14,22 @@ Object.defineProperty(exports, "getBlockingIssues", { enumerable: true, get: fun
14
14
  Object.defineProperty(exports, "getActionableIssues", { enumerable: true, get: function () { return grouping_1.getActionableIssues; } });
15
15
  Object.defineProperty(exports, "getRiskTheme", { enumerable: true, get: function () { return grouping_1.getRiskTheme; } });
16
16
  Object.defineProperty(exports, "THEME_CONFIG", { enumerable: true, get: function () { return grouping_1.THEME_CONFIG; } });
17
+ // AI Context formatter
18
+ var ai_context_1 = require("./ai-context");
19
+ Object.defineProperty(exports, "formatAIContext", { enumerable: true, get: function () { return ai_context_1.formatAIContext; } });
20
+ // IDE integrations
21
+ var ide_1 = require("./ide");
22
+ Object.defineProperty(exports, "formatCursorRules", { enumerable: true, get: function () { return ide_1.formatCursorRules; } });
23
+ Object.defineProperty(exports, "formatWindsurfRules", { enumerable: true, get: function () { return ide_1.formatWindsurfRules; } });
24
+ Object.defineProperty(exports, "formatClaudeCodeSection", { enumerable: true, get: function () { return ide_1.formatClaudeCodeSection; } });
25
+ Object.defineProperty(exports, "detectIDEConfigs", { enumerable: true, get: function () { return ide_1.detectIDEConfigs; } });
26
+ Object.defineProperty(exports, "writeIDEFile", { enumerable: true, get: function () { return ide_1.writeIDEFile; } });
27
+ Object.defineProperty(exports, "updateClaudeMdSection", { enumerable: true, get: function () { return ide_1.updateClaudeMdSection; } });
28
+ Object.defineProperty(exports, "clearIDEFiles", { enumerable: true, get: function () { return ide_1.clearIDEFiles; } });
29
+ Object.defineProperty(exports, "getIDEFilePath", { enumerable: true, get: function () { return ide_1.getIDEFilePath; } });
30
+ Object.defineProperty(exports, "OCULUM_SECTION_START", { enumerable: true, get: function () { return ide_1.OCULUM_SECTION_START; } });
31
+ Object.defineProperty(exports, "OCULUM_SECTION_END", { enumerable: true, get: function () { return ide_1.OCULUM_SECTION_END; } });
32
+ Object.defineProperty(exports, "IDE_FILE_PATHS", { enumerable: true, get: function () { return ide_1.IDE_FILE_PATHS; } });
17
33
  // GitHub comment formatter
18
34
  var github_comment_1 = require("./github-comment");
19
35
  Object.defineProperty(exports, "formatGitHubComment", { enumerable: true, get: function () { return github_comment_1.formatGitHubComment; } });
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/formatters/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,qBAAqB;AACrB,uCAUmB;AATjB,wGAAA,YAAY,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,qGAAA,cAAc,OAAA;AACd,2GAAA,oBAAoB,OAAA;AACpB,yGAAA,kBAAkB,OAAA;AAClB,qGAAA,cAAc,OAAA;AAMhB,2BAA2B;AAC3B,mDAKyB;AAJvB,qHAAA,mBAAmB,OAAA;AACnB,mHAAA,iBAAiB,OAAA;AACjB,kHAAA,gBAAgB,OAAA;AAIlB,+BAA+B;AAC/B,yDAW4B;AAV1B,qHAAA,gBAAgB,OAAA;AAChB,4HAAA,uBAAuB,OAAA;AACvB,uHAAA,kBAAkB,OAAA;AAClB,2HAAA,sBAAsB,OAAA;AACtB,uHAAA,kBAAkB,OAAA;AAQpB,yBAAyB;AACzB,+CASuB;AARrB,oHAAA,oBAAoB,OAAA;AACpB,gHAAA,gBAAgB,OAAA;AAChB,0GAAA,UAAU,OAAA;AACV,2GAAA,WAAW,OAAA;AACX,oHAAA,oBAAoB,OAAA;AACpB,mHAAA,mBAAmB,OAAA;AACnB,mHAAA,mBAAmB,OAAA"}
package/dist/index.d.ts CHANGED
@@ -22,6 +22,8 @@ export interface ScanOptions {
22
22
  projectPath?: string;
23
23
  /** Include suppressed findings in output (for --show-suppressed) */
24
24
  showSuppressed?: boolean;
25
+ /** Include filter audit trail in output (for debugging/explaining dismissals) */
26
+ includeFilterAudit?: boolean;
25
27
  }
26
28
  export interface ScanProgress {
27
29
  status: 'fetching' | 'layer1' | 'layer2' | 'layer3' | 'validating' | 'complete' | 'failed';
@@ -61,4 +63,6 @@ export { createCancellationToken } from './types';
61
63
  export { SuppressionManager, computeFindingHash, loadSuppressionConfig, addFindingSuppression, removeFindingSuppression, addRuleSuppression, listSuppressions, parseInlineSuppressions, generateSuppressionComment, isValidHash, type SuppressionConfig, type FindingSuppression, type RuleSuppression, type SuppressionResult, type SuppressedVulnerability, } from './suppression';
62
64
  export { BaselineManager, computeDiff, hasNewBlockingIssues, formatDiffSummary, BASELINE_FILE_PATH, OCULUM_DIR, type BaselineData, type BaselineFinding, type DiffResult, type BaselineDiff, type BaselineManagerOptions, type LoadBaselineResult, type SaveBaselineResult, type ClearBaselineResult, } from './baseline';
63
65
  export { RULE_REGISTRY, getRuleMetadata, getAllCategories, hasMetadata, type RuleMetadata, } from './rules';
66
+ export { AIContextManager, AI_CONTEXT_FILE, AI_CONTEXT_PATH, type AIContextManagerOptions, type SaveContextResult, type LoadContextResult, type ClearContextResult, } from './ai-context';
67
+ export { CATEGORY_GROUPS, ALL_CATEGORIES, normalizeCategory, expandCategoryPattern, matchesAnyCategory, shouldFailOnCategories, getMatchingCategories, parseCategoryList, validateCategories, getAvailableCategoryGroups, getCategoryGroupCounts, } from './category-filter';
64
68
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EACV,QAAQ,EACR,UAAU,EACV,aAAa,EACb,cAAc,EACd,cAAc,EAEd,QAAQ,EACR,cAAc,EACd,SAAS,EACT,iBAAiB,EAElB,MAAM,SAAS,CAAA;AA0HhB,MAAM,WAAW,WAAW;IAC1B,gDAAgD;IAChD,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,4BAA4B;IAC5B,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,2BAA2B;IAC3B,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,oDAAoD;IACpD,QAAQ,CAAC,EAAE,QAAQ,GAAG,cAAc,CAAA;IACpC,4DAA4D;IAC5D,SAAS,CAAC,EAAE,SAAS,CAAA;IACrB,6DAA6D;IAC7D,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,uDAAuD;IACvD,iBAAiB,CAAC,EAAE,iBAAiB,CAAA;IACrC,oEAAoE;IACpE,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,oEAAoE;IACpE,cAAc,CAAC,EAAE,OAAO,CAAA;CACzB;AAED,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,UAAU,GAAG,QAAQ,GAAG,QA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