cognium-dev 4.12.0 → 4.13.1

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 (3) hide show
  1. package/README.md +14 -21
  2. package/dist/cli.js +919 -84
  3. package/package.json +2 -2
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  [![npm version](https://img.shields.io/npm/v/cognium-dev.svg)](https://www.npmjs.com/package/cognium-dev)
4
4
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/cogniumhq/cognium-dev/blob/main/LICENSE)
5
- [![OWASP Benchmark](https://img.shields.io/badge/OWASP%20Benchmark-100%25%20TPR%2C%200%25%20FPR-brightgreen)](https://github.com/cogniumhq/cognium-dev#benchmark-results)
5
+ [![OWASP Benchmark](https://img.shields.io/badge/OWASP%20BenchmarkJava-90.0%25%20TPR%2C%203.0%25%20FPR-green)](https://github.com/cogniumhq/cognium-dev#benchmark-results)
6
6
  [![GitHub Action](https://img.shields.io/badge/GitHub%20Action-available-blue?logo=github)](https://github.com/marketplace/actions/cognium-dev-scan)
7
7
  ![Trust Score](https://raw.githubusercontent.com/cogniumhq/cognium-dev/badges/trust-badge.svg)
8
8
  ![Quality Score](https://raw.githubusercontent.com/cogniumhq/cognium-dev/badges/quality-badge.svg)
@@ -467,35 +467,28 @@ For details on LLM integration and benchmark improvements (42.5% → 78.3% on CW
467
467
 
468
468
  ## Benchmark Results
469
469
 
470
- **All scores below are from the static analysis engine** — fully deterministic, no LLM required:
470
+ Measured on cognium-dev **4.12.0**, the CLI as published. Fully deterministic.
471
471
 
472
- | Benchmark | Score | Details |
473
- |-----------|-------|---------|
474
- | OWASP Benchmark | +100% | TPR 100%, FPR 0% (1415 test cases) |
475
- | Juliet Test Suite | +100% | 156/156 test cases, 9 CWEs |
476
- | SecuriBench Micro | 97.7% TPR | 105/108 vulns detected, 6.7% FPR |
477
- | CWE-Bench-Java | 42.5% | 51/120 real-world CVEs |
472
+ | Benchmark | TPR | FPR | Scope and rule |
473
+ |-----------|-----|-----|----------------|
474
+ | OWASP BenchmarkJava 1.2 | 90.0% | 3.0% | All 2,740 cases; scorecard rule (file-level CWE match) |
475
+ | Juliet Test Suite 1.3 | 99.4% | 21.9% | `_01` cases of 9 injection CWEs; `bad()` vs `good*()` methods; `require-entry-path` disabled |
476
+ | SecuriBench Micro | 88.0% | 6.7% | 123 annotated cases; found sink lines vs `vuln_count` |
477
+ | CWE-Bench-Java | 32.5% (39/120) | n/a | 120 real CVEs; a finding of the CVE's CWE inside the fix method |
478
478
 
479
479
  ### Reproducing Benchmarks
480
480
 
481
- The benchmark scores are verifiable and reproducible:
481
+ Each number above comes from a `cognium-dev scan` JSON report and a scoring script in this repository. For example, OWASP:
482
482
 
483
483
  ```bash
484
- # Install cognium
485
- npm install -g cognium
486
-
487
- # Clone benchmark repositories
484
+ npm install -g cognium-dev
488
485
  git clone https://github.com/OWASP-Benchmark/BenchmarkJava
489
- git clone https://github.com/juliet-test-suite/juliet-test-suite-for-java
490
- git clone https://github.com/CWE-Bench/cwe-bench-java
491
-
492
- # Run scans
493
- cognium-dev scan BenchmarkJava/src --format json -o owasp-results.json
494
- cognium-dev scan juliet-test-suite-for-java --format json -o juliet-results.json
495
- cognium-dev scan cwe-bench-java --format json -o cwe-bench-results.json
486
+ cd BenchmarkJava
487
+ cognium-dev scan . --format json --category security -l java > owasp.json
488
+ node <cognium-dev repo>/bench/sast/score-owasp.mjs expectedresults-1.2.csv owasp.json
496
489
  ```
497
490
 
498
- For detailed benchmark methodology and comparison with other tools, see [cognium.dev](https://cognium.dev).
491
+ The scoring rule and command for every benchmark are in [`bench/README.md`](https://github.com/cogniumhq/cognium-dev/blob/main/bench/README.md#sast-accuracy-benchsast).
499
492
 
500
493
  ## Links
501
494