@cejel/cejel 0.1.1 → 0.1.3
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.
- package/README.md +147 -79
- package/dist/{chunk-H5T65GGS.js → chunk-QQVCIG4N.js} +2803 -1208
- package/dist/index.js +124 -30
- package/dist/mcp/index.js +222 -218
- package/package.json +10 -9
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# cejel
|
|
2
2
|
|
|
3
|
-
[](https://github.com/BargLabs/cejel/releases/latest)
|
|
4
4
|
[](./LICENSE)
|
|
5
5
|
|
|
6
6
|
Cejel (*"SEH-jel"*) — a trust certificate for your codebase.
|
|
@@ -8,8 +8,8 @@ Cejel (*"SEH-jel"*) — a trust certificate for your codebase.
|
|
|
8
8
|
Free, offline, no-signup CLI that scores the engineering signals that tell you whether to
|
|
9
9
|
trust a repo — tests, secrets, isolation, claim-vs-reality, CI/audit discipline — and prints
|
|
10
10
|
a trust certificate + badge. Especially valuable when AI wrote a lot of the code: that's
|
|
11
|
-
exactly when you can't eyeball trust. Built on a deterministic, no-LLM
|
|
12
|
-
|
|
11
|
+
exactly when you can't eyeball trust. Built on a deterministic, no-LLM scoring core — the
|
|
12
|
+
free path makes zero network calls and requires no account.
|
|
13
13
|
|
|
14
14
|
Cejel is not another point scanner competing with the one you already run — it's the open,
|
|
15
15
|
portable, offline trust certificate that aggregates them. Pipe in SARIF-compatible output
|
|
@@ -20,57 +20,60 @@ certificate + badge over all of them. See "Aggregate your scanners" below.
|
|
|
20
20
|
> monorepo — the ten-product studio it was built inside — which it currently scores
|
|
21
21
|
> 3.1/4.0 ("Conditional"). We score ourselves before asking you to score yourself.
|
|
22
22
|
|
|
23
|
-
##
|
|
24
|
-
|
|
25
|
-
This repo ships the [Cejel OSS trust leaderboard](./leaderboard/leaderboard.md): the whole
|
|
26
|
-
corpus scored and published in the open — elite OSS projects, Cejel itself, and the private
|
|
27
|
-
studio monorepo Cejel was built inside — with a per-repository evidence report for every
|
|
28
|
-
row under [`leaderboard/reports/`](./leaderboard/reports/). The board is also hosted at
|
|
29
|
-
[cejel.dev](https://cejel.dev). Same deterministic rubric as `npx cejel .`; nobody is
|
|
30
|
-
exempt, including us.
|
|
31
|
-
|
|
32
|
-
### Redaction policy
|
|
33
|
-
|
|
34
|
-
A path is published exactly when the reader can check it. Every public repository on the
|
|
35
|
-
board cites full evidence paths and line numbers, everywhere, in every artifact — a
|
|
36
|
-
certificate whose evidence you cannot open is not evidence. The two private-repository
|
|
37
|
-
entries (this monorepo's own transparency entry, and Cejel's own source sub-package inside
|
|
38
|
-
it) never cite a source path, anywhere, in any field or format — but the finding itself, its
|
|
39
|
-
dimension, status, score, and content hash always survive; only the location is withheld,
|
|
40
|
-
marked uniformly as "path withheld — private repository". Redaction removes a location, never
|
|
41
|
-
a fact: a private repository failing its own check still shows up on its certificate, by
|
|
42
|
-
name. The B1 and B5 rubric dimensions are substrate-only (they measure signals specific to
|
|
43
|
-
this monorepo's own internal process, not applicable to any external repository) and are
|
|
44
|
-
excluded from the ranking for every repository, including ours — the same fairness rule
|
|
45
|
-
either way: nobody is scored on a dimension nobody else can have.
|
|
46
|
-
|
|
47
|
-
### Known false positives (fixed before publishing)
|
|
48
|
-
|
|
49
|
-
Calibrating a rubric against real, elite repositories surfaces mistakes; the record is part
|
|
50
|
-
of the trust claim, not something to bury. Two dimensions produced a punitive score for the
|
|
51
|
-
*absence* of a ratable surface rather than a real weakness, and both are fixed:
|
|
52
|
-
Django was flagged critical on dependency hygiene for using version ranges instead of exact
|
|
53
|
-
pins — normal, deliberate practice for a library, not an app; the rubric now scores
|
|
54
|
-
dependency hygiene against archetype-appropriate norms. OSSF Scorecard — Google's own
|
|
55
|
-
supply-chain security auditing tool — was flagged critical on audit-trail completeness for
|
|
56
|
-
publishing release notes via GitHub Releases instead of a committed `CHANGELOG.md`; a
|
|
57
|
-
repository with no ratable audit surface now returns "insufficient data" (excluded from the
|
|
58
|
-
composite) instead of a punitive score. The board also publishes a measured-coverage
|
|
59
|
-
indicator per row: a score reflects only its *measured* dimensions, and a row scored on fewer
|
|
60
|
-
than half of its applicable dimensions is shown as unranked rather than ordered against
|
|
61
|
-
better-evidenced rows.
|
|
23
|
+
## Install
|
|
62
24
|
|
|
63
|
-
|
|
25
|
+
No account, no key, no signup.
|
|
26
|
+
|
|
27
|
+
**Single-file binary.** One file. No Node, no npm, no `node_modules`, nothing installed.
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
curl -fsSL https://github.com/BargLabs/cejel/releases/latest/download/cejel-$(uname -s)-$(uname -m) -o cejel
|
|
31
|
+
chmod +x cejel
|
|
32
|
+
./cejel .
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
**Don't take the offline claim on trust — check it.** Turn your network off, then run the
|
|
36
|
+
binary. It will score your repository and write you a certificate anyway. That is the whole
|
|
37
|
+
product, and you can falsify it in ten seconds:
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
# with Wi-Fi off, or:
|
|
41
|
+
docker run --rm --network=none -v "$PWD:/w" -w /w -v "$PWD/cejel:/cejel:ro" debian:stable-slim /cejel .
|
|
42
|
+
```
|
|
64
43
|
|
|
65
|
-
|
|
66
|
-
these pull the same `cejel` package from the npm registry:
|
|
44
|
+
**npm.**
|
|
67
45
|
|
|
68
46
|
```bash
|
|
69
|
-
npx cejel .
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
47
|
+
npx @cejel/cejel .
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
> **On the name.** npm rejects the unscoped `cejel` package name as too similar to an
|
|
51
|
+
> existing package (`level`). The published package is the scoped `@cejel/cejel`.
|
|
52
|
+
|
|
53
|
+
**GitHub Action** — score every PR and publish the badge:
|
|
54
|
+
|
|
55
|
+
```yaml
|
|
56
|
+
- uses: BargLabs/cejel/action@v1
|
|
57
|
+
with:
|
|
58
|
+
min-score: "2.5" # optional: fail the build below this
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
**From source** — it is AGPL and it runs offline, so reading it is rather the point:
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
git clone https://github.com/BargLabs/cejel && cd cejel
|
|
65
|
+
pnpm install && pnpm build
|
|
66
|
+
node dist/index.js .
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
Released binaries: `cejel-Darwin-arm64`, `cejel-Linux-x86_64`. A Homebrew tap and the
|
|
70
|
+
remaining architectures are in progress; they are not listed here because they do not exist
|
|
71
|
+
yet.
|
|
72
|
+
|
|
73
|
+
## Usage
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
./cejel .
|
|
74
77
|
```
|
|
75
78
|
|
|
76
79
|
Scores the current directory with sensible defaults: no flags, no signup, fully offline.
|
|
@@ -85,13 +88,42 @@ Prints a concise terminal certificate and writes to `.cejel/`:
|
|
|
85
88
|
### Flags
|
|
86
89
|
|
|
87
90
|
- `<path>` — repo to score (default: current directory)
|
|
88
|
-
- `--out
|
|
91
|
+
- `--out <dir>` — where to write report/certificate/badge files (default: `.cejel`;
|
|
92
|
+
`--out-dir` remains available as a compatibility alias)
|
|
89
93
|
- `--min-score <n>` — exit non-zero if the overall score is below `n` (0–4); used by the
|
|
90
94
|
GitHub Action's optional threshold gate
|
|
91
95
|
- `--ingest <file|glob>` — fold another scanner's output into the score (repeatable). Accepts
|
|
92
96
|
SARIF, OpenSSF Scorecard JSON, or the generic Cejel external-signal shape — format is
|
|
93
97
|
auto-detected. See "Aggregate your scanners" below.
|
|
94
98
|
- `--quiet` — suppress the terminal certificate (files are still written)
|
|
99
|
+
- `-h`, `--help` — print usage and exit successfully
|
|
100
|
+
- `-v`, `--version` — print the version derived from the package manifest and exit successfully
|
|
101
|
+
|
|
102
|
+
## Supported languages
|
|
103
|
+
|
|
104
|
+
Cejel reads a repository's file tree, not its bytecode — it needs to recognise a file's
|
|
105
|
+
source extension to say anything about it. It does not support every language, and it says so
|
|
106
|
+
honestly rather than guessing:
|
|
107
|
+
|
|
108
|
+
- **Deeply modelled** — JS/TS, Python: test detection, coverage, and claim-vs-reality checks
|
|
109
|
+
are tuned specifically for these ecosystems.
|
|
110
|
+
- **Partially modelled** — Go, Rust, Java, Ruby, PHP, C#, C/C++, Swift, Kotlin, Dart, Elixir,
|
|
111
|
+
Scala: recognised as source and scored on the language-agnostic dimensions (CI discipline,
|
|
112
|
+
dependency hygiene, audit trail, secrets), but without ecosystem-specific test-framework
|
|
113
|
+
tuning.
|
|
114
|
+
- **Recognised but unmodelled** — shell, R, Lua, Julia, Haskell, Terraform, SQL, Perl, OCaml,
|
|
115
|
+
Clojure, Erlang, Nim, Zig, F#, Groovy: counted as source so a repo isn't misread as empty,
|
|
116
|
+
but with the least ecosystem-specific tuning of the three tiers.
|
|
117
|
+
- **Not yet recognised** — other ecosystems, including COBOL, Fortran, and MATLAB. Cejel does
|
|
118
|
+
not score these as "source" at all: a repository with zero
|
|
119
|
+
recognised-extension files gets the `unrecognised_ecosystem` archetype, an explicit
|
|
120
|
+
`insufficient_data` status, and **no verdict** — never a confident numeric score, and never
|
|
121
|
+
the word "Unverified" for the sole reason that cejel cannot read the language. The
|
|
122
|
+
certificate states plainly which of the 11 dimensions were and were not measured.
|
|
123
|
+
|
|
124
|
+
This list will grow. It will never be "any codebase" — that claim is a promise the parser
|
|
125
|
+
cannot keep, and an honest support matrix is worth more than a marketing line the code
|
|
126
|
+
contradicts on the first unsupported repository someone runs it against.
|
|
95
127
|
|
|
96
128
|
## Aggregate your scanners
|
|
97
129
|
|
|
@@ -101,7 +133,7 @@ Cejel folds those findings into the same rubric-scored, offline trust certificat
|
|
|
101
133
|
contributing tools shown in the certificate and report as provenance:
|
|
102
134
|
|
|
103
135
|
```bash
|
|
104
|
-
|
|
136
|
+
./cejel . --ingest munatrust.sarif --ingest scorecard.json
|
|
105
137
|
```
|
|
106
138
|
|
|
107
139
|
Or drop files in `.cejel/inputs/` and they're picked up automatically, no flag needed:
|
|
@@ -109,7 +141,7 @@ Or drop files in `.cejel/inputs/` and they're picked up automatically, no flag n
|
|
|
109
141
|
```bash
|
|
110
142
|
mkdir -p .cejel/inputs
|
|
111
143
|
cp munatrust-results.sarif .cejel/inputs/
|
|
112
|
-
|
|
144
|
+
./cejel .
|
|
113
145
|
```
|
|
114
146
|
|
|
115
147
|
External findings only ever adjust a dimension score *downward*, and by a bounded amount —
|
|
@@ -176,7 +208,7 @@ a configurable `min-score` threshold. The scoring step makes no network calls an
|
|
|
176
208
|
secrets.
|
|
177
209
|
|
|
178
210
|
```yaml
|
|
179
|
-
- uses: BargLabs/cejel/action@
|
|
211
|
+
- uses: BargLabs/cejel/action@v1
|
|
180
212
|
with:
|
|
181
213
|
min-score: '2.5' # optional; omit to never fail the check
|
|
182
214
|
```
|
|
@@ -195,7 +227,7 @@ Add it to an MCP client config:
|
|
|
195
227
|
"mcpServers": {
|
|
196
228
|
"cejel": {
|
|
197
229
|
"command": "npx",
|
|
198
|
-
"args": ["-y", "--package
|
|
230
|
+
"args": ["-y", "--package=@cejel/cejel", "cejel-mcp"]
|
|
199
231
|
}
|
|
200
232
|
}
|
|
201
233
|
}
|
|
@@ -206,18 +238,19 @@ The server exposes one tool and two resources:
|
|
|
206
238
|
- `scan` — input `{ path, format? }`; scores the repository at `path` and returns the trust
|
|
207
239
|
cert as JSON (`format: "summary"`, the default, is the compact digest; `format: "json"` is
|
|
208
240
|
the full report, identical to the CLI's `report.json`).
|
|
209
|
-
- `cejel://last-scan/certificate.html` and `cejel://last-scan/badge.svg` — the
|
|
210
|
-
certificate and SVG badge for the most recent scan
|
|
241
|
+
- `cejel-cejel://last-scan/certificate.html` and `cejel-cejel://last-scan/badge.svg` — the
|
|
242
|
+
HTML certificate and SVG badge for the most recent scan (the URI scheme derives from the
|
|
243
|
+
npm package name, `@cejel/cejel` → `cejel-cejel`).
|
|
211
244
|
|
|
212
245
|
Like the CLI, scoring over MCP is fully offline: no network calls, no telemetry, no signup,
|
|
213
246
|
and the server writes no files.
|
|
214
247
|
|
|
215
248
|
## What "offline" means here
|
|
216
249
|
|
|
217
|
-
Scoring a repo — `
|
|
218
|
-
calls: no telemetry, no signup, no model call. Fetching the
|
|
219
|
-
(like any npm-distributed CLI, including this Action's own dependency install)
|
|
220
|
-
network; that's a one-time install cost, not part of the scoring guarantee.
|
|
250
|
+
Scoring a repo — `cejel .` itself, and the Action's scoring step — makes zero network
|
|
251
|
+
calls: no telemetry, no signup, no model call. Fetching the `@cejel/cejel` package the
|
|
252
|
+
first time (like any npm-distributed CLI, including this Action's own dependency install)
|
|
253
|
+
does need network; that's a one-time install cost, not part of the scoring guarantee.
|
|
221
254
|
|
|
222
255
|
## The public leaderboard: what we redact, what we exclude, and where we were wrong
|
|
223
256
|
|
|
@@ -236,19 +269,20 @@ enforced structurally — the public artifacts are built from filtered data rath
|
|
|
236
269
|
rendered and then scrubbed — and a build that would emit a private path fails rather than
|
|
237
270
|
publishes.
|
|
238
271
|
|
|
239
|
-
**What we exclude from ranking.**
|
|
240
|
-
completeness)
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
272
|
+
**What we exclude from ranking.** The v3 repository scanner does not evaluate B1 (dispatch
|
|
273
|
+
trace completeness) or B5 (verified learning trace) for repository inputs, including ours:
|
|
274
|
+
both are always *not applicable* in a repository certificate. They remain defined in the
|
|
275
|
+
rubric for structured substrate evidence, but that evidence is not accepted by this scanner.
|
|
276
|
+
The ranking excludes both dimensions fail-closed, including when it reads a legacy or
|
|
277
|
+
separately produced structured report. We neither score you on evidence the public scanner
|
|
278
|
+
cannot collect nor award ourselves points for evidence you cannot contest.
|
|
279
|
+
|
|
280
|
+
**Where we were wrong.** Calibrating this rubric against real repositories — and running the
|
|
281
|
+
board itself like a stranger would — surfaced the errors below in our own tool, every one found
|
|
282
|
+
by us and every one fixed. The list is its own count; we do not keep a tally in this sentence,
|
|
283
|
+
because a number typed by hand beside a list that grows is exactly the kind of unchecked claim
|
|
284
|
+
this tool exists to catch. We publish them because a scoring tool that has never been wrong is a
|
|
285
|
+
scoring tool that has not been checked:
|
|
252
286
|
|
|
253
287
|
- **Django, scored a false critical on dependency hygiene.** We applied application-shaped
|
|
254
288
|
expectations to a library. Archetype now gates the dimension.
|
|
@@ -267,11 +301,45 @@ scoring tool that has never been wrong is a scoring tool that has not been check
|
|
|
267
301
|
the *shape* (a cron-scheduled workflow that runs the verification suite, and whether its
|
|
268
302
|
results are durably published or only handed to an ephemeral CI artifact); our own internal
|
|
269
303
|
nightly QA workflow is one recognized instance of that shape, not its definition.
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
304
|
+
- **Our board and our own certificates disagreed on four repositories' headline scores by
|
|
305
|
+
0.1** — two coherent bases (the board's fair cross-repo ranking basis, and each
|
|
306
|
+
certificate's own-dimension basis), one word, "Overall", printed on both. We found it on
|
|
307
|
+
launch day and fixed it: "Overall" is now byte-identical everywhere it appears — board,
|
|
308
|
+
certificate, badge, report, and JSON — and the ranking basis, where it genuinely differs,
|
|
309
|
+
has its own separate, explicitly labeled column instead of borrowing the same name.
|
|
310
|
+
- **Our own row used a scoring path nobody else could run.** The board generator could add
|
|
311
|
+
internal collectors after the public scan, so its reassuring collector blacklist was not
|
|
312
|
+
the invariant it claimed to be. Rubric v3 removes that second path: every corpus row now
|
|
313
|
+
passes through the same sealed public scorer, every external source is pinned to a commit,
|
|
314
|
+
and a required guard re-scores every row and compares score, verdict, coverage, and
|
|
315
|
+
evidence. The honest correction moved Alfred's Code score from 2.5 to 2.4 and A5 from 2.9
|
|
316
|
+
to 2.4. It is less flattering and more trustworthy.
|
|
317
|
+
- **Version 0.1.1 rejected `--help` and `--version` as unknown flags, and read `-h` as a
|
|
318
|
+
directory path.** Version 0.1.2 handles both aliases before positional-path parsing and
|
|
319
|
+
derives its printed version from the package manifest.
|
|
320
|
+
- **We reported a timing side-channel in our own test fixtures.** Pointed at its own
|
|
321
|
+
repository, Cejel's secret-handling dimension flagged a "non-constant-time secret
|
|
322
|
+
comparison" — in string literals inside a test file, the deliberately-insecure example code
|
|
323
|
+
that exists to prove the detector fires. It read a *file*, not a comparison, and reported a
|
|
324
|
+
vulnerability in the test written to catch that vulnerability. Two sub-rules of the same
|
|
325
|
+
dimension held two different private notions of what "production code" meant, and the one
|
|
326
|
+
that had none was the louder. Version 0.1.3 gives every rule one shared, derived answer to
|
|
327
|
+
that question, and reports the real line of a real match or nothing at all.
|
|
328
|
+
- **We fixed the COBOL false-verdict, shipped it, and it was still broken.** An earlier release
|
|
329
|
+
corrected a repository written in a language we cannot read being scored anyway. The fixture
|
|
330
|
+
that proved the fix contained COBOL and nothing else. The first real COBOL repository we
|
|
331
|
+
pointed it at — AWS's mainframe credit-card demo — carried nine incidental shell scripts
|
|
332
|
+
among 329 files, and those nine were enough to short-circuit the abstention path entirely:
|
|
333
|
+
a 99%-COBOL codebase was scored on its deploy scripts and drew a confident `0.0`,
|
|
334
|
+
"Unverified". Every real legacy repository has a deploy script, so the fix that passed every
|
|
335
|
+
test was unreachable for essentially all of them. Recognised source must now be *dominant*,
|
|
336
|
+
not merely present. **A fixture cleaner than reality proves nothing.**
|
|
337
|
+
|
|
338
|
+
Every one was a trust failure produced by *us* — false alarms about other people's code,
|
|
339
|
+
silent omissions, inconsistent presentation, or a home-only scoring path — and we would
|
|
340
|
+
rather you knew that than discovered it. If you believe the board scores your repository
|
|
341
|
+
wrongly, open an issue — a rubric that cannot be corrected in public has no business being
|
|
342
|
+
published in public.
|
|
275
343
|
|
|
276
344
|
**No rubric change re-scores you silently.** Every change to scoring behavior requires a
|
|
277
345
|
`WITAN_RUBRIC_VERSION` bump and a corpus-wide before/after delta published in
|