@sentry/warden 0.12.0 → 0.14.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 (145) hide show
  1. package/agents.lock +66 -0
  2. package/dist/cli/args.d.ts +17 -9
  3. package/dist/cli/args.d.ts.map +1 -1
  4. package/dist/cli/args.js +51 -2
  5. package/dist/cli/args.js.map +1 -1
  6. package/dist/cli/commands/add.js +1 -1
  7. package/dist/cli/commands/add.js.map +1 -1
  8. package/dist/cli/commands/init.d.ts +0 -3
  9. package/dist/cli/commands/init.d.ts.map +1 -1
  10. package/dist/cli/commands/init.js +219 -24
  11. package/dist/cli/commands/init.js.map +1 -1
  12. package/dist/cli/commands/logs.d.ts +19 -0
  13. package/dist/cli/commands/logs.d.ts.map +1 -0
  14. package/dist/cli/commands/logs.js +419 -0
  15. package/dist/cli/commands/logs.js.map +1 -0
  16. package/dist/cli/commands/sync.d.ts.map +1 -1
  17. package/dist/cli/commands/sync.js +16 -4
  18. package/dist/cli/commands/sync.js.map +1 -1
  19. package/dist/cli/fix.d.ts.map +1 -1
  20. package/dist/cli/fix.js +6 -1
  21. package/dist/cli/fix.js.map +1 -1
  22. package/dist/cli/log-cleanup.d.ts +6 -5
  23. package/dist/cli/log-cleanup.d.ts.map +1 -1
  24. package/dist/cli/log-cleanup.js +11 -10
  25. package/dist/cli/log-cleanup.js.map +1 -1
  26. package/dist/cli/main.d.ts.map +1 -1
  27. package/dist/cli/main.js +87 -29
  28. package/dist/cli/main.js.map +1 -1
  29. package/dist/cli/output/formatters.d.ts +8 -2
  30. package/dist/cli/output/formatters.d.ts.map +1 -1
  31. package/dist/cli/output/formatters.js +40 -19
  32. package/dist/cli/output/formatters.js.map +1 -1
  33. package/dist/cli/output/index.d.ts +2 -2
  34. package/dist/cli/output/index.d.ts.map +1 -1
  35. package/dist/cli/output/index.js +2 -2
  36. package/dist/cli/output/index.js.map +1 -1
  37. package/dist/cli/output/ink-runner.js +1 -1
  38. package/dist/cli/output/ink-runner.js.map +1 -1
  39. package/dist/cli/output/jsonl.d.ts +51 -14
  40. package/dist/cli/output/jsonl.d.ts.map +1 -1
  41. package/dist/cli/output/jsonl.js +140 -7
  42. package/dist/cli/output/jsonl.js.map +1 -1
  43. package/dist/cli/output/reporter.d.ts +4 -0
  44. package/dist/cli/output/reporter.d.ts.map +1 -1
  45. package/dist/cli/output/reporter.js +14 -0
  46. package/dist/cli/output/reporter.js.map +1 -1
  47. package/dist/cli/output/tasks.d.ts +3 -1
  48. package/dist/cli/output/tasks.d.ts.map +1 -1
  49. package/dist/cli/output/tasks.js +7 -4
  50. package/dist/cli/output/tasks.js.map +1 -1
  51. package/dist/cli/terminal.d.ts +4 -3
  52. package/dist/cli/terminal.d.ts.map +1 -1
  53. package/dist/cli/terminal.js +22 -11
  54. package/dist/cli/terminal.js.map +1 -1
  55. package/dist/config/loader.d.ts +3 -1
  56. package/dist/config/loader.d.ts.map +1 -1
  57. package/dist/config/loader.js +2 -0
  58. package/dist/config/loader.js.map +1 -1
  59. package/dist/config/schema.d.ts +84 -70
  60. package/dist/config/schema.d.ts.map +1 -1
  61. package/dist/config/schema.js +7 -1
  62. package/dist/config/schema.js.map +1 -1
  63. package/dist/evals/types.d.ts +9 -15
  64. package/dist/evals/types.d.ts.map +1 -1
  65. package/dist/index.d.ts +2 -2
  66. package/dist/index.d.ts.map +1 -1
  67. package/dist/index.js +2 -0
  68. package/dist/index.js.map +1 -1
  69. package/dist/output/dedup.d.ts +14 -10
  70. package/dist/output/dedup.d.ts.map +1 -1
  71. package/dist/output/dedup.js +39 -17
  72. package/dist/output/dedup.js.map +1 -1
  73. package/dist/output/github-checks.d.ts +5 -3
  74. package/dist/output/github-checks.d.ts.map +1 -1
  75. package/dist/output/github-checks.js +14 -16
  76. package/dist/output/github-checks.js.map +1 -1
  77. package/dist/output/issue-renderer.js +1 -1
  78. package/dist/output/issue-renderer.js.map +1 -1
  79. package/dist/output/renderer.d.ts.map +1 -1
  80. package/dist/output/renderer.js +11 -7
  81. package/dist/output/renderer.js.map +1 -1
  82. package/dist/output/types.d.ts +3 -1
  83. package/dist/output/types.d.ts.map +1 -1
  84. package/dist/sdk/analyze.d.ts.map +1 -1
  85. package/dist/sdk/analyze.js +12 -5
  86. package/dist/sdk/analyze.js.map +1 -1
  87. package/dist/sdk/auth.d.ts +16 -0
  88. package/dist/sdk/auth.d.ts.map +1 -0
  89. package/dist/sdk/auth.js +37 -0
  90. package/dist/sdk/auth.js.map +1 -0
  91. package/dist/sdk/errors.d.ts +5 -0
  92. package/dist/sdk/errors.d.ts.map +1 -1
  93. package/dist/sdk/errors.js +20 -0
  94. package/dist/sdk/errors.js.map +1 -1
  95. package/dist/sdk/prompt.d.ts.map +1 -1
  96. package/dist/sdk/prompt.js +3 -1
  97. package/dist/sdk/prompt.js.map +1 -1
  98. package/dist/sdk/runner.d.ts +2 -1
  99. package/dist/sdk/runner.d.ts.map +1 -1
  100. package/dist/sdk/runner.js +3 -1
  101. package/dist/sdk/runner.js.map +1 -1
  102. package/dist/skills/remote.d.ts +4 -0
  103. package/dist/skills/remote.d.ts.map +1 -1
  104. package/dist/skills/remote.js +47 -27
  105. package/dist/skills/remote.js.map +1 -1
  106. package/dist/types/index.d.ts +42 -22
  107. package/dist/types/index.d.ts.map +1 -1
  108. package/dist/types/index.js +45 -7
  109. package/dist/types/index.js.map +1 -1
  110. package/package.json +1 -1
  111. package/{plugins/warden/skills → skills}/warden/SKILL.md +2 -4
  112. package/{plugins/warden/skills → skills}/warden/references/cli-reference.md +7 -9
  113. package/{plugins/warden/skills → skills}/warden/references/config-schema.md +5 -7
  114. package/{plugins/warden/skills → skills}/warden/references/configuration.md +10 -8
  115. package/{plugins/warden/skills → skills}/warden/references/creating-skills.md +6 -6
  116. package/skills/warden-sweep/SKILL.md +407 -0
  117. package/skills/warden-sweep/scripts/_utils.py +37 -0
  118. package/skills/warden-sweep/scripts/extract_findings.py +219 -0
  119. package/skills/warden-sweep/scripts/find_reviewers.py +115 -0
  120. package/skills/warden-sweep/scripts/generate_report.py +271 -0
  121. package/skills/warden-sweep/scripts/index_prs.py +187 -0
  122. package/skills/warden-sweep/scripts/organize.py +315 -0
  123. package/skills/warden-sweep/scripts/scan.py +632 -0
  124. package/.claude-plugin/marketplace.json +0 -20
  125. package/.mcp.json +0 -8
  126. package/agents.toml +0 -7
  127. package/conductor.json +0 -8
  128. package/evals/README.md +0 -154
  129. package/evals/bug-detection.yaml +0 -56
  130. package/evals/fixtures/ignores-style-issues/utils.ts +0 -48
  131. package/evals/fixtures/missing-await/cache.ts +0 -45
  132. package/evals/fixtures/null-property-access/handler.ts +0 -36
  133. package/evals/fixtures/off-by-one/paginator.ts +0 -38
  134. package/evals/fixtures/sql-injection/api.ts +0 -59
  135. package/evals/fixtures/stale-closure/counter.tsx +0 -33
  136. package/evals/fixtures/wrong-comparison/validator.ts +0 -52
  137. package/evals/fixtures/xss-reflected/server.ts +0 -55
  138. package/evals/precision.yaml +0 -15
  139. package/evals/security-scanning.yaml +0 -24
  140. package/evals/skills/bug-detection.md +0 -33
  141. package/evals/skills/precision.md +0 -18
  142. package/evals/skills/security-scanning.md +0 -32
  143. package/plugins/.claude-plugin/marketplace.json +0 -14
  144. package/plugins/warden/.claude-plugin/plugin.json +0 -7
  145. package/scripts/update-pricing.ts +0 -88
@@ -1,32 +0,0 @@
1
- ---
2
- name: eval-security-scanning
3
- description: Test skill for security scanning evals. Finds injection, XSS, and other OWASP Top 10 vulnerabilities.
4
- ---
5
-
6
- You are a security expert analyzing code changes for vulnerabilities.
7
-
8
- ## What to Report
9
-
10
- Find security vulnerabilities that could be exploited:
11
-
12
- - SQL injection (unsanitized input in queries)
13
- - Cross-site scripting (XSS) - reflected and stored
14
- - Command injection
15
- - Path traversal
16
- - Authentication/authorization bypasses
17
- - Insecure cryptography
18
-
19
- ## What NOT to Report
20
-
21
- - Code quality or style issues
22
- - Performance concerns
23
- - Missing but non-security error handling
24
- - Hardcoded configuration values (unless they are secrets)
25
- - Missing HTTPS (unless specifically relevant)
26
-
27
- ## Output Requirements
28
-
29
- For each vulnerability:
30
- - The exact file and line
31
- - The attack vector (how it could be exploited)
32
- - Severity based on exploitability and impact
@@ -1,14 +0,0 @@
1
- {
2
- "name": "warden-local",
3
- "owner": {
4
- "name": "dcramer"
5
- },
6
- "plugins": [
7
- {
8
- "name": "warden",
9
- "source": "./warden",
10
- "version": "0.0.0",
11
- "skills": ["warden"]
12
- }
13
- ]
14
- }
@@ -1,7 +0,0 @@
1
- {
2
- "name": "warden",
3
- "description": "Run Warden to analyze code changes before committing",
4
- "author": {
5
- "name": "Sentry"
6
- }
7
- }
@@ -1,88 +0,0 @@
1
- /**
2
- * Fetches Anthropic model pricing from pydantic/genai-prices and writes
3
- * src/sdk/model-pricing.json. Rerun whenever prices change.
4
- *
5
- * Usage: pnpm update-pricing
6
- */
7
-
8
- const SOURCE_URL =
9
- 'https://raw.githubusercontent.com/pydantic/genai-prices/main/prices/data.json';
10
- const OUTPUT_PATH = new URL('../src/sdk/model-pricing.json', import.meta.url);
11
-
12
- type PriceValue = number | { base: number; tiers: unknown[] };
13
-
14
- interface PriceEntry {
15
- input_mtok?: PriceValue;
16
- output_mtok?: PriceValue;
17
- cache_read_mtok?: PriceValue;
18
- cache_write_mtok?: PriceValue;
19
- }
20
-
21
- /** Extract the base price from a flat number or tiered pricing object. */
22
- function basePrice(v: PriceValue | undefined): number {
23
- if (v == null) return 0;
24
- if (typeof v === 'number') return v;
25
- return v.base;
26
- }
27
-
28
- interface ModelEntry {
29
- id: string;
30
- name: string;
31
- prices: PriceEntry;
32
- }
33
-
34
- interface ProviderEntry {
35
- id: string;
36
- models: ModelEntry[];
37
- }
38
-
39
- interface ModelPricingRecord {
40
- inputPerMTok: number;
41
- outputPerMTok: number;
42
- cacheReadPerMTok: number;
43
- cacheWritePerMTok: number;
44
- }
45
-
46
- async function main() {
47
- const res = await fetch(SOURCE_URL);
48
- if (!res.ok) {
49
- throw new Error(`Failed to fetch pricing data: ${res.status} ${res.statusText}`);
50
- }
51
-
52
- const providers: ProviderEntry[] = await res.json();
53
- const anthropic = providers.find((p) => p.id === 'anthropic');
54
- if (!anthropic) {
55
- throw new Error('Anthropic provider not found in pricing data');
56
- }
57
-
58
- const pricing: Record<string, ModelPricingRecord> = {};
59
-
60
- if (!anthropic.models || !Array.isArray(anthropic.models)) {
61
- throw new Error('Anthropic provider has invalid or missing models array');
62
- }
63
-
64
- for (const model of anthropic.models) {
65
- const p = model.prices;
66
- if (!p || typeof p !== 'object') {
67
- continue;
68
- }
69
- pricing[model.id] = {
70
- inputPerMTok: basePrice(p.input_mtok),
71
- outputPerMTok: basePrice(p.output_mtok),
72
- cacheReadPerMTok: basePrice(p.cache_read_mtok),
73
- cacheWritePerMTok: basePrice(p.cache_write_mtok),
74
- };
75
- }
76
-
77
- const { writeFileSync } = await import('node:fs');
78
- const { fileURLToPath } = await import('node:url');
79
- writeFileSync(fileURLToPath(OUTPUT_PATH), JSON.stringify(pricing, null, 2) + '\n');
80
-
81
- const count = Object.keys(pricing).length;
82
- console.log(`Wrote ${count} model(s) to src/sdk/model-pricing.json`);
83
- }
84
-
85
- main().catch((err) => {
86
- console.error(err);
87
- process.exit(1);
88
- });