grepleaks 1.0.1 → 1.0.2

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 (2) hide show
  1. package/bin/grepleaks.js +50 -7
  2. package/package.json +1 -1
package/bin/grepleaks.js CHANGED
@@ -9,7 +9,7 @@ const readline = require('readline');
9
9
  const { exec } = require('child_process');
10
10
  const archiver = require('archiver');
11
11
 
12
- const VERSION = '1.0.1';
12
+ const VERSION = '1.0.2';
13
13
  const API_URL = 'https://grepleaks.com/api/v1';
14
14
  const WEB_URL = 'https://grepleaks.com';
15
15
  const CONFIG_DIR = path.join(os.homedir(), '.grepleaks');
@@ -521,12 +521,55 @@ function generateMarkdownReport(result) {
521
521
  md += `### ${emoji} ${severity} (${items.length})\n\n`;
522
522
 
523
523
  for (const v of items) {
524
- md += `#### ${v.title || 'Vulnerability'}\n\n`;
525
- md += `- **${t('reportFile')}** \`${v.file || 'N/A'}\`\n`;
526
- if (v.line) md += `- **${t('reportLine')}** ${v.line}\n`;
527
- md += `- **${t('reportScanner')}** ${v.scanner || 'N/A'}\n`;
528
- if (v.description) md += `\n${v.description}\n`;
529
- if (v.recommendation) md += `\n**${t('reportRecommendation')}** ${v.recommendation}\n`;
524
+ // Title: use rule_id or description snippet
525
+ const title = v.rule_id || (v.description ? v.description.substring(0, 50) + '...' : 'Vulnerability');
526
+ md += `#### ${title}\n\n`;
527
+
528
+ // Location (file/line)
529
+ if (v.location) {
530
+ md += `- **${t('reportFile')}** \`${v.location}\`\n`;
531
+ }
532
+
533
+ // Scanner source
534
+ if (v.source) {
535
+ md += `- **${t('reportScanner')}** ${v.source}\n`;
536
+ }
537
+
538
+ // CVE if available
539
+ if (v.cve) {
540
+ md += `- **CVE:** ${v.cve}\n`;
541
+ }
542
+
543
+ // Package info (for Trivy findings)
544
+ if (v.package_name) {
545
+ md += `- **Package:** ${v.package_name}`;
546
+ if (v.current_version) md += ` (${v.current_version})`;
547
+ md += `\n`;
548
+ if (v.fixed_version) {
549
+ md += `- **Fix:** Upgrade to ${v.fixed_version}\n`;
550
+ }
551
+ }
552
+
553
+ // Description
554
+ if (v.description) {
555
+ md += `\n${v.description}\n`;
556
+ }
557
+
558
+ // Code snippet
559
+ if (v.code_snippet) {
560
+ md += `\n\`\`\`\n${v.code_snippet}\n\`\`\`\n`;
561
+ }
562
+
563
+ // Recommendation
564
+ if (v.recommendation || v.llm_recommendation) {
565
+ md += `\n**${t('reportRecommendation')}** ${v.llm_recommendation || v.recommendation}\n`;
566
+ }
567
+
568
+ // Reference URL
569
+ if (v.reference_url) {
570
+ md += `\n**Reference:** ${v.reference_url}\n`;
571
+ }
572
+
530
573
  md += `\n---\n\n`;
531
574
  }
532
575
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "grepleaks",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "Security scanner for your code - detect vulnerabilities, secrets, and misconfigurations",
5
5
  "main": "bin/grepleaks.js",
6
6
  "bin": {