docs: fix README/launch-post to match actual CLI flag and score semantics#13
Open
dmchaledev wants to merge 1 commit into
Open
docs: fix README/launch-post to match actual CLI flag and score semantics#13dmchaledev wants to merge 1 commit into
dmchaledev wants to merge 1 commit into
Conversation
Two user-facing documentation bugs where the docs contradicted the code:
- The SARIF example used `--output=sarif`, but the CLI only accepts
`--format=`. The documented command errors with `Unknown flag
"--output=sarif"` and exits 2. Fixed to `--format=sarif` in both
README.md and dev-to/launch-post.md.
- The README's programmatic example described `report.score` as
"0–100 risk score (lower = riskier)", which is inverted. The code is
unambiguous: scorer.ts ("Higher score = more risk"), types.ts ("0
(safest) – 100 (most risk)"), and scanner.ts (`passed = score < 50`).
A CI gate built from the old comment would invert pass/fail logic.
Verified: vulnerable example -> score 100/failed, secure -> 0/passed.
Docs-only; no production code changed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two user-facing documentation bugs where the docs contradict the code. Both are small, self-contained, and docs-only.
1. Documented SARIF command errors out (
--output=vs--format=)README.mdanddev-to/launch-post.mdboth advertise:But the CLI only accepts
--format=(seesrc/cli.ts). The documented command fails outright:Fixed to
--format=sarif, which produces valid SARIF as intended. (This was flagged as out-of-scope in #12; addressing it here.)2. README inverts the meaning of
report.scoreThe programmatic example described the score as:
This is backwards. The code is unambiguous that higher = riskier:
src/scorer.ts: "Higher score = more risk" — score sums severity weights.src/types.ts: "Risk score 0 (safest) – 100 (most risk)".src/scanner.ts:passed = score < 50 && !hasCritical.A CI gate written from the old comment would invert its pass/fail logic — a meaningful footgun for a security tool. Corrected to
higher = riskier; 0 is safest.Verification
Confirms higher score = riskier and that
--format=sarifis the correct flag.No production code changed.
https://claude.ai/code/session_01WUxsN7GXqccfdLHTb4k86R
Generated by Claude Code