codefence 1.0.4__tar.gz → 1.0.11__tar.gz

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 (29) hide show
  1. {codefence-1.0.4 → codefence-1.0.11}/CHANGELOG.md +93 -0
  2. {codefence-1.0.4 → codefence-1.0.11}/PKG-INFO +75 -10
  3. {codefence-1.0.4 → codefence-1.0.11}/README.md +69 -4
  4. {codefence-1.0.4 → codefence-1.0.11}/TERMS_OF_USE.md +3 -3
  5. {codefence-1.0.4 → codefence-1.0.11}/codefence.egg-info/PKG-INFO +75 -10
  6. {codefence-1.0.4 → codefence-1.0.11}/codefence.egg-info/SOURCES.txt +1 -0
  7. {codefence-1.0.4 → codefence-1.0.11}/codefence.py +393 -204
  8. codefence-1.0.11/docs/DETECTION_METHODOLOGY.md +607 -0
  9. {codefence-1.0.4 → codefence-1.0.11}/pyproject.toml +12 -7
  10. {codefence-1.0.4 → codefence-1.0.11}/tests/test_integration.py +13 -1
  11. {codefence-1.0.4 → codefence-1.0.11}/LICENSE.txt +0 -0
  12. {codefence-1.0.4 → codefence-1.0.11}/LICENSE_FAQ.md +0 -0
  13. {codefence-1.0.4 → codefence-1.0.11}/NOTICE.md +0 -0
  14. {codefence-1.0.4 → codefence-1.0.11}/REFUND_POLICY.md +0 -0
  15. {codefence-1.0.4 → codefence-1.0.11}/SECURITY.md +0 -0
  16. {codefence-1.0.4 → codefence-1.0.11}/codefence.egg-info/dependency_links.txt +0 -0
  17. {codefence-1.0.4 → codefence-1.0.11}/codefence.egg-info/entry_points.txt +0 -0
  18. {codefence-1.0.4 → codefence-1.0.11}/codefence.egg-info/top_level.txt +0 -0
  19. {codefence-1.0.4 → codefence-1.0.11}/rules.json +0 -0
  20. {codefence-1.0.4 → codefence-1.0.11}/samples/bad_javascript.js +0 -0
  21. {codefence-1.0.4 → codefence-1.0.11}/samples/bad_python.py +0 -0
  22. {codefence-1.0.4 → codefence-1.0.11}/samples/clean_example.js +0 -0
  23. {codefence-1.0.4 → codefence-1.0.11}/samples/clean_example.py +0 -0
  24. {codefence-1.0.4 → codefence-1.0.11}/setup.cfg +0 -0
  25. {codefence-1.0.4 → codefence-1.0.11}/tests/test_baseline.py +0 -0
  26. {codefence-1.0.4 → codefence-1.0.11}/tests/test_history.py +0 -0
  27. {codefence-1.0.4 → codefence-1.0.11}/tests/test_lexer.py +0 -0
  28. {codefence-1.0.4 → codefence-1.0.11}/tests/test_policy.py +0 -0
  29. {codefence-1.0.4 → codefence-1.0.11}/tests/test_rules.py +0 -0
@@ -5,6 +5,99 @@ All notable changes to CodeFence.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
6
6
  Versioning follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [1.0.11] — 2026-09-18
9
+
10
+ ### Fixed
11
+
12
+ - `pyproject.toml` project URLs pointed at a placeholder `USERNAME` and a
13
+ non-existent `codefence.dev` domain. They now point to the canonical
14
+ repository at `github.com/codefence-dev/codefence`.
15
+ - `pyproject.toml` build requirement pinned `setuptools==76.1.0` exactly,
16
+ which could break builds in environments where that exact version is
17
+ unavailable. Relaxed to `setuptools>=76.1.0`.
18
+
19
+ ## [1.0.10] — 2026-09-18
20
+
21
+ ### Added
22
+ - `docs/DETECTION_METHODOLOGY.md` — 607-line document with per-rule
23
+ samples, known false-positive scenarios, known false-negative
24
+ scenarios, and explicit scope limits (no dataflow, no taint
25
+ tracking, no interprocedural analysis). Ships inside the wheel and
26
+ sdist.
27
+ - README: Free vs Pro section with activation instructions.
28
+ - README: reference to DETECTION_METHODOLOGY.md next to the scope
29
+ disclaimers.
30
+
31
+ ### Changed
32
+ - Tagline: `Check AI-written code before you commit it.` replaces
33
+ `A tiny offline policy gate for code.`
34
+ - Secondary line: `Offline. Zero dependencies. No account. No
35
+ telemetry.`
36
+ - Price: $12 → $19 (README, TERMS_OF_USE.md, license error message).
37
+ - CLI `--help` and welcome screen show the new tagline.
38
+ - PyPI summary now reflects the new tagline.
39
+
40
+ ### Notes
41
+ - No behavior changes to detection logic. No new rules. No rule
42
+ removed. This is a documentation, positioning, and pricing release.
43
+
44
+ [1.0.11]: https://github.com/codefence-dev/codefence/releases/tag/v1.0.11
45
+ [1.0.10]: https://github.com/codefence-dev/codefence/releases/tag/v1.0.10
46
+
47
+ ## [1.0.9] — 2026-09-18
48
+
49
+ ### Added
50
+ - Pro tier license system with offline HMAC-SHA256 verification
51
+ - License source priority: `CODEFENCE_LICENSE_KEY` env var, then
52
+ `~/.codefence/license.key`
53
+ - `tools/gen_license.py` seller-side key generation tool (not shipped)
54
+ - README: Free vs Pro feature table with activation instructions
55
+
56
+ ### Changed
57
+ - Pro features are now gated when no valid license is present:
58
+ - `--staged`, `--diff`, `--policy`, `--evidence`, `--history`
59
+ - `--format sarif`, `--format html`
60
+ - Subcommands: `init`, `init-hook`, `uninstall-hook`, `init-github`,
61
+ `baseline`, `policy`, `history`, `stats`, `explain`
62
+ - Payment methods: removed USDC, added SOL
63
+ - Free tier message shows clear upgrade path when Pro features are used
64
+
65
+ ### Fixed
66
+ - Integration tests use an autouse Pro license fixture
67
+
68
+ [1.0.9]: https://github.com/codefence-dev/codefence/releases/tag/v1.0.9
69
+
70
+ ## [1.0.8] — 2026-09-18
71
+
72
+ ### Added
73
+ - `report_cli_gate`: three-state compact output for `--staged` and git hooks
74
+ - `commit blocked` when blocking findings are present
75
+ - `commit allowed (warning)` when only warn-action findings are present
76
+ - `commit passed` when clean
77
+ - `--verbose` flag for direct scans to show code snippets and fix examples
78
+ - `--quiet` short output: one-line header + one-line summary
79
+ - Footer with tool version, offline note, and honest scope statement in HTML
80
+
81
+ ### Changed
82
+ - CLI: replaced banner box with a single-line header
83
+ - CLI: replaced bottom summary box with a one-line severity summary
84
+ - CLI: snippet and fix diff are now opt-in via `--verbose` (default compact)
85
+ - HTML: replaced 5-card dashboard with a horizontal severity summary line
86
+ - HTML: severity card left border reduced from 4px to 2px
87
+ - HTML: fix panels use neutral diff styling (`-` muted red, `+` muted green)
88
+ instead of a blue "after" block
89
+ - HTML: card radius from 12px to 8px, softer shadows
90
+ - HTML: typography and spacing tuned for readability
91
+
92
+ ### Fixed
93
+ - HTML: multi-line diff rendering in fix panels (newlines were being collapsed)
94
+ - Tests: SARIF test now reads tool version dynamically instead of hardcoding 1.0.0
95
+
96
+ ### Internal
97
+ - Renamed test-only references from legacy product name to CodeFence
98
+
99
+ [1.0.8]: https://github.com/codefence-dev/codefence/releases/tag/v1.0.8
100
+
8
101
  ## [1.0.0] — 2026-09-16
9
102
 
10
103
  ### Added
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.2
1
+ Metadata-Version: 2.4
2
2
  Name: codefence
3
- Version: 1.0.4
3
+ Version: 1.0.11
4
4
  Summary: A tiny offline policy gate for code. Check AI-generated code before it reaches Git.
5
5
  Author: CodeFence
6
6
  License: CODEFENCE
@@ -198,10 +198,9 @@ License: CODEFENCE
198
198
  END OF LICENSE
199
199
  --------------------------------------------------------------------
200
200
 
201
- Project-URL: Homepage, https://codefence.dev
202
- Project-URL: Source, https://github.com/USERNAME/codefence
203
- Project-URL: Issues, https://github.com/USERNAME/codefence/issues
204
- Project-URL: Changelog, https://github.com/USERNAME/codefence/blob/main/CHANGELOG.md
201
+ Project-URL: Source, https://github.com/codefence-dev/codefence
202
+ Project-URL: Issues, https://github.com/codefence-dev/codefence/issues
203
+ Project-URL: Changelog, https://github.com/codefence-dev/codefence/blob/main/CHANGELOG.md
205
204
  Keywords: security,static-analysis,pre-commit,git-hook,ai-generated-code,sast,sarif,offline,policy
206
205
  Classifier: Development Status :: 5 - Production/Stable
207
206
  Classifier: Environment :: Console
@@ -220,12 +219,15 @@ Description-Content-Type: text/markdown
220
219
  License-File: LICENSE.txt
221
220
  License-File: LICENSE_FAQ.md
222
221
  License-File: NOTICE.md
222
+ Dynamic: license-file
223
223
 
224
224
  # CodeFence
225
225
 
226
- **A tiny offline policy gate for code.**
226
+ **Check AI-written code before you commit it.**
227
227
 
228
- Check AI-generated code before it reaches Git.
228
+ Offline. Zero dependencies. No account. No telemetry.
229
+
230
+ <img src="docs/screenshots/hero_blocked.jpg" alt="CodeFence v1.0.10 blocking a git commit: 4 findings including hardcoded API keys, SQL injection, and command injection" width="500">
229
231
 
230
232
  ---
231
233
 
@@ -241,6 +243,8 @@ runs a curated set of rules and reports findings with:
241
243
  - short remediation
242
244
  - typical before/after fix example
243
245
 
246
+ <img src="docs/screenshots/cli_scan.jpg" alt="CodeFence CLI scan output: 6 critical, 1 high, 2 medium findings across R001-R012 with file:line:column locations and remediation hints" width="500">
247
+
244
248
  It is designed around the risks commonly encountered in AI-assisted
245
249
  development, but scans ordinary source code regardless of how it
246
250
  was written.
@@ -269,6 +273,10 @@ was written.
269
273
  - Not interprocedural. No dataflow, no taint analysis.
270
274
  - Not a guarantee. A clean scan does not mean the code is secure.
271
275
 
276
+ For per-rule samples, known false-positive scenarios, false-negative
277
+ scenarios, and the full detection methodology, see
278
+ [`docs/DETECTION_METHODOLOGY.md`](docs/DETECTION_METHODOLOGY.md).
279
+
272
280
  ## Install
273
281
 
274
282
  pip install codefence
@@ -307,6 +315,9 @@ Every commit is then gated automatically.
307
315
  **Explanation:**
308
316
 
309
317
  codefence explain R002
318
+
319
+ <img src="docs/screenshots/cli_verbose.jpg" alt="CodeFence --verbose output: each finding includes the matched code snippet and a typical before/after fix example" width="500">
320
+
310
321
  ## The 30 rules
311
322
 
312
323
  Rules are shipped in rules.json (human-readable JSON). You can
@@ -421,9 +432,61 @@ Every shipped file is hashed in CHECKSUMS.txt. To verify:
421
432
  Compare the output with the corresponding lines in CHECKSUMS.txt.
422
433
  If the hashes do not match, do not use the file.
423
434
 
435
+ ## Free vs Pro
436
+
437
+ **Free gives you the full scanner. Pro gives you the workflow.**
438
+
439
+ You are not paying for more detection. The Free tier includes all 30
440
+ rules. You are paying for the automation layer that turns findings
441
+ into a gate.
442
+
443
+ | Feature | Free | Pro ($19) |
444
+ |---|---|---|
445
+ | All 30 rules (Python + JavaScript) | Yes | Yes |
446
+ | CLI output (colored, compact, verbose) | Yes | Yes |
447
+ | JSON output | Yes | Yes |
448
+ | Configuration, include/exclude, severity filters | Yes | Yes |
449
+ | Offline, zero dependencies, zero network | Yes | Yes |
450
+ | `--format sarif` | - | Yes |
451
+ | `--format html` | - | Yes |
452
+ | Git pre-commit hook (`init-hook`) | - | Yes |
453
+ | `--staged` / `--diff` | - | Yes |
454
+ | `baseline` | - | Yes |
455
+ | `--policy` + `policy validate` | - | Yes |
456
+ | `--evidence` (deterministic hashes) | - | Yes |
457
+ | `--history` + `history` / `stats` | - | Yes |
458
+ | `explain RXXX` | - | Yes |
459
+ | `init-github` (GitHub Actions workflow) | - | Yes |
460
+ | `init` (one-command setup) | - | Yes |
461
+
462
+ <img src="docs/screenshots/report_light.jpg" alt="CodeFence HTML report (light theme): summary bar, per-finding cards with severity, snippet, copyable fix, and dark mode toggle" width="400">
463
+
464
+ Free = detect. Pro = enforce.
465
+
466
+ ### Activating Pro
467
+
468
+ After purchase you receive a license key of the form
469
+ `identifier:signature`. Store it in one of two places.
470
+
471
+ **Option 1 — File:**
472
+
473
+ mkdir -p ~/.codefence
474
+ echo 'YOUR-LICENSE-KEY' > ~/.codefence/license.key
475
+
476
+ **Option 2 — Environment variable (recommended for CI):**
477
+
478
+ export CODEFENCE_LICENSE_KEY='YOUR-LICENSE-KEY'
479
+
480
+ Verify activation:
481
+
482
+ cfence init-hook # works only with a valid Pro license
483
+
484
+ The license is verified locally with HMAC-SHA256. No network call, no
485
+ telemetry, no activation server.
486
+
424
487
  ## Payment and pricing
425
488
 
426
- **$12 USD, one-time.**
489
+ **$19 USD, one-time.**
427
490
 
428
491
  Includes the current major version (v1.x) and its maintenance
429
492
  releases. No subscription. No support. No account.
@@ -431,8 +494,8 @@ releases. No subscription. No support. No account.
431
494
  Payments are available in cryptocurrency only:
432
495
 
433
496
  - USDT (TRC20 or BEP20)
434
- - USDC
435
497
  - BTC
498
+ - SOL
436
499
  - TRX
437
500
  - XRP
438
501
 
@@ -497,6 +560,8 @@ A: Pattern-based scanners always produce some. Rules with lower
497
560
  confidence are flagged as such. You can disable any rule in
498
561
  rules.json or via policy overrides.
499
562
 
563
+ <img src="docs/screenshots/cli_clean.jpg" alt="CodeFence clean scan: no findings, a green checkmark, and a single line confirming the file passed" width="400">
564
+
500
565
  **Q: Can I modify the source?**
501
566
  A: Yes, privately. See LICENSE_FAQ.md.
502
567
 
@@ -1,8 +1,10 @@
1
1
  # CodeFence
2
2
 
3
- **A tiny offline policy gate for code.**
3
+ **Check AI-written code before you commit it.**
4
4
 
5
- Check AI-generated code before it reaches Git.
5
+ Offline. Zero dependencies. No account. No telemetry.
6
+
7
+ <img src="docs/screenshots/hero_blocked.jpg" alt="CodeFence v1.0.10 blocking a git commit: 4 findings including hardcoded API keys, SQL injection, and command injection" width="500">
6
8
 
7
9
  ---
8
10
 
@@ -18,6 +20,8 @@ runs a curated set of rules and reports findings with:
18
20
  - short remediation
19
21
  - typical before/after fix example
20
22
 
23
+ <img src="docs/screenshots/cli_scan.jpg" alt="CodeFence CLI scan output: 6 critical, 1 high, 2 medium findings across R001-R012 with file:line:column locations and remediation hints" width="500">
24
+
21
25
  It is designed around the risks commonly encountered in AI-assisted
22
26
  development, but scans ordinary source code regardless of how it
23
27
  was written.
@@ -46,6 +50,10 @@ was written.
46
50
  - Not interprocedural. No dataflow, no taint analysis.
47
51
  - Not a guarantee. A clean scan does not mean the code is secure.
48
52
 
53
+ For per-rule samples, known false-positive scenarios, false-negative
54
+ scenarios, and the full detection methodology, see
55
+ [`docs/DETECTION_METHODOLOGY.md`](docs/DETECTION_METHODOLOGY.md).
56
+
49
57
  ## Install
50
58
 
51
59
  pip install codefence
@@ -84,6 +92,9 @@ Every commit is then gated automatically.
84
92
  **Explanation:**
85
93
 
86
94
  codefence explain R002
95
+
96
+ <img src="docs/screenshots/cli_verbose.jpg" alt="CodeFence --verbose output: each finding includes the matched code snippet and a typical before/after fix example" width="500">
97
+
87
98
  ## The 30 rules
88
99
 
89
100
  Rules are shipped in rules.json (human-readable JSON). You can
@@ -198,9 +209,61 @@ Every shipped file is hashed in CHECKSUMS.txt. To verify:
198
209
  Compare the output with the corresponding lines in CHECKSUMS.txt.
199
210
  If the hashes do not match, do not use the file.
200
211
 
212
+ ## Free vs Pro
213
+
214
+ **Free gives you the full scanner. Pro gives you the workflow.**
215
+
216
+ You are not paying for more detection. The Free tier includes all 30
217
+ rules. You are paying for the automation layer that turns findings
218
+ into a gate.
219
+
220
+ | Feature | Free | Pro ($19) |
221
+ |---|---|---|
222
+ | All 30 rules (Python + JavaScript) | Yes | Yes |
223
+ | CLI output (colored, compact, verbose) | Yes | Yes |
224
+ | JSON output | Yes | Yes |
225
+ | Configuration, include/exclude, severity filters | Yes | Yes |
226
+ | Offline, zero dependencies, zero network | Yes | Yes |
227
+ | `--format sarif` | - | Yes |
228
+ | `--format html` | - | Yes |
229
+ | Git pre-commit hook (`init-hook`) | - | Yes |
230
+ | `--staged` / `--diff` | - | Yes |
231
+ | `baseline` | - | Yes |
232
+ | `--policy` + `policy validate` | - | Yes |
233
+ | `--evidence` (deterministic hashes) | - | Yes |
234
+ | `--history` + `history` / `stats` | - | Yes |
235
+ | `explain RXXX` | - | Yes |
236
+ | `init-github` (GitHub Actions workflow) | - | Yes |
237
+ | `init` (one-command setup) | - | Yes |
238
+
239
+ <img src="docs/screenshots/report_light.jpg" alt="CodeFence HTML report (light theme): summary bar, per-finding cards with severity, snippet, copyable fix, and dark mode toggle" width="400">
240
+
241
+ Free = detect. Pro = enforce.
242
+
243
+ ### Activating Pro
244
+
245
+ After purchase you receive a license key of the form
246
+ `identifier:signature`. Store it in one of two places.
247
+
248
+ **Option 1 — File:**
249
+
250
+ mkdir -p ~/.codefence
251
+ echo 'YOUR-LICENSE-KEY' > ~/.codefence/license.key
252
+
253
+ **Option 2 — Environment variable (recommended for CI):**
254
+
255
+ export CODEFENCE_LICENSE_KEY='YOUR-LICENSE-KEY'
256
+
257
+ Verify activation:
258
+
259
+ cfence init-hook # works only with a valid Pro license
260
+
261
+ The license is verified locally with HMAC-SHA256. No network call, no
262
+ telemetry, no activation server.
263
+
201
264
  ## Payment and pricing
202
265
 
203
- **$12 USD, one-time.**
266
+ **$19 USD, one-time.**
204
267
 
205
268
  Includes the current major version (v1.x) and its maintenance
206
269
  releases. No subscription. No support. No account.
@@ -208,8 +271,8 @@ releases. No subscription. No support. No account.
208
271
  Payments are available in cryptocurrency only:
209
272
 
210
273
  - USDT (TRC20 or BEP20)
211
- - USDC
212
274
  - BTC
275
+ - SOL
213
276
  - TRX
214
277
  - XRP
215
278
 
@@ -274,6 +337,8 @@ A: Pattern-based scanners always produce some. Rules with lower
274
337
  confidence are flagged as such. You can disable any rule in
275
338
  rules.json or via policy overrides.
276
339
 
340
+ <img src="docs/screenshots/cli_clean.jpg" alt="CodeFence clean scan: no findings, a green checkmark, and a single line confirming the file passed" width="400">
341
+
277
342
  **Q: Can I modify the source?**
278
343
  A: Yes, privately. See LICENSE_FAQ.md.
279
344
 
@@ -40,15 +40,15 @@ The Software is licensed, not sold. Your rights are defined in
40
40
 
41
41
  ## 3. Payment
42
42
 
43
- The Software is sold for a one-time fee of **USD 12** (or the
43
+ The Software is sold for a one-time fee of **USD 19** (or the
44
44
  equivalent in a supported cryptocurrency) via the official sales
45
45
  channels listed in `README.md`.
46
46
 
47
47
  Supported payment methods (subject to change):
48
48
 
49
49
  - USDT (TRC20 or BEP20)
50
- - USDC
51
50
  - BTC
51
+ - SOL
52
52
  - TRX
53
53
  - XRP
54
54
 
@@ -112,7 +112,7 @@ To the maximum extent permitted by applicable law:
112
112
 
113
113
  - the Software is provided AS-IS, without warranty,
114
114
  - the total aggregate liability of the vendor is capped at the
115
- amount you actually paid (USD 12),
115
+ amount you actually paid (USD 19),
116
116
  - the vendor is not liable for indirect, incidental, or
117
117
  consequential damages.
118
118
 
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.2
1
+ Metadata-Version: 2.4
2
2
  Name: codefence
3
- Version: 1.0.4
3
+ Version: 1.0.11
4
4
  Summary: A tiny offline policy gate for code. Check AI-generated code before it reaches Git.
5
5
  Author: CodeFence
6
6
  License: CODEFENCE
@@ -198,10 +198,9 @@ License: CODEFENCE
198
198
  END OF LICENSE
199
199
  --------------------------------------------------------------------
200
200
 
201
- Project-URL: Homepage, https://codefence.dev
202
- Project-URL: Source, https://github.com/USERNAME/codefence
203
- Project-URL: Issues, https://github.com/USERNAME/codefence/issues
204
- Project-URL: Changelog, https://github.com/USERNAME/codefence/blob/main/CHANGELOG.md
201
+ Project-URL: Source, https://github.com/codefence-dev/codefence
202
+ Project-URL: Issues, https://github.com/codefence-dev/codefence/issues
203
+ Project-URL: Changelog, https://github.com/codefence-dev/codefence/blob/main/CHANGELOG.md
205
204
  Keywords: security,static-analysis,pre-commit,git-hook,ai-generated-code,sast,sarif,offline,policy
206
205
  Classifier: Development Status :: 5 - Production/Stable
207
206
  Classifier: Environment :: Console
@@ -220,12 +219,15 @@ Description-Content-Type: text/markdown
220
219
  License-File: LICENSE.txt
221
220
  License-File: LICENSE_FAQ.md
222
221
  License-File: NOTICE.md
222
+ Dynamic: license-file
223
223
 
224
224
  # CodeFence
225
225
 
226
- **A tiny offline policy gate for code.**
226
+ **Check AI-written code before you commit it.**
227
227
 
228
- Check AI-generated code before it reaches Git.
228
+ Offline. Zero dependencies. No account. No telemetry.
229
+
230
+ <img src="docs/screenshots/hero_blocked.jpg" alt="CodeFence v1.0.10 blocking a git commit: 4 findings including hardcoded API keys, SQL injection, and command injection" width="500">
229
231
 
230
232
  ---
231
233
 
@@ -241,6 +243,8 @@ runs a curated set of rules and reports findings with:
241
243
  - short remediation
242
244
  - typical before/after fix example
243
245
 
246
+ <img src="docs/screenshots/cli_scan.jpg" alt="CodeFence CLI scan output: 6 critical, 1 high, 2 medium findings across R001-R012 with file:line:column locations and remediation hints" width="500">
247
+
244
248
  It is designed around the risks commonly encountered in AI-assisted
245
249
  development, but scans ordinary source code regardless of how it
246
250
  was written.
@@ -269,6 +273,10 @@ was written.
269
273
  - Not interprocedural. No dataflow, no taint analysis.
270
274
  - Not a guarantee. A clean scan does not mean the code is secure.
271
275
 
276
+ For per-rule samples, known false-positive scenarios, false-negative
277
+ scenarios, and the full detection methodology, see
278
+ [`docs/DETECTION_METHODOLOGY.md`](docs/DETECTION_METHODOLOGY.md).
279
+
272
280
  ## Install
273
281
 
274
282
  pip install codefence
@@ -307,6 +315,9 @@ Every commit is then gated automatically.
307
315
  **Explanation:**
308
316
 
309
317
  codefence explain R002
318
+
319
+ <img src="docs/screenshots/cli_verbose.jpg" alt="CodeFence --verbose output: each finding includes the matched code snippet and a typical before/after fix example" width="500">
320
+
310
321
  ## The 30 rules
311
322
 
312
323
  Rules are shipped in rules.json (human-readable JSON). You can
@@ -421,9 +432,61 @@ Every shipped file is hashed in CHECKSUMS.txt. To verify:
421
432
  Compare the output with the corresponding lines in CHECKSUMS.txt.
422
433
  If the hashes do not match, do not use the file.
423
434
 
435
+ ## Free vs Pro
436
+
437
+ **Free gives you the full scanner. Pro gives you the workflow.**
438
+
439
+ You are not paying for more detection. The Free tier includes all 30
440
+ rules. You are paying for the automation layer that turns findings
441
+ into a gate.
442
+
443
+ | Feature | Free | Pro ($19) |
444
+ |---|---|---|
445
+ | All 30 rules (Python + JavaScript) | Yes | Yes |
446
+ | CLI output (colored, compact, verbose) | Yes | Yes |
447
+ | JSON output | Yes | Yes |
448
+ | Configuration, include/exclude, severity filters | Yes | Yes |
449
+ | Offline, zero dependencies, zero network | Yes | Yes |
450
+ | `--format sarif` | - | Yes |
451
+ | `--format html` | - | Yes |
452
+ | Git pre-commit hook (`init-hook`) | - | Yes |
453
+ | `--staged` / `--diff` | - | Yes |
454
+ | `baseline` | - | Yes |
455
+ | `--policy` + `policy validate` | - | Yes |
456
+ | `--evidence` (deterministic hashes) | - | Yes |
457
+ | `--history` + `history` / `stats` | - | Yes |
458
+ | `explain RXXX` | - | Yes |
459
+ | `init-github` (GitHub Actions workflow) | - | Yes |
460
+ | `init` (one-command setup) | - | Yes |
461
+
462
+ <img src="docs/screenshots/report_light.jpg" alt="CodeFence HTML report (light theme): summary bar, per-finding cards with severity, snippet, copyable fix, and dark mode toggle" width="400">
463
+
464
+ Free = detect. Pro = enforce.
465
+
466
+ ### Activating Pro
467
+
468
+ After purchase you receive a license key of the form
469
+ `identifier:signature`. Store it in one of two places.
470
+
471
+ **Option 1 — File:**
472
+
473
+ mkdir -p ~/.codefence
474
+ echo 'YOUR-LICENSE-KEY' > ~/.codefence/license.key
475
+
476
+ **Option 2 — Environment variable (recommended for CI):**
477
+
478
+ export CODEFENCE_LICENSE_KEY='YOUR-LICENSE-KEY'
479
+
480
+ Verify activation:
481
+
482
+ cfence init-hook # works only with a valid Pro license
483
+
484
+ The license is verified locally with HMAC-SHA256. No network call, no
485
+ telemetry, no activation server.
486
+
424
487
  ## Payment and pricing
425
488
 
426
- **$12 USD, one-time.**
489
+ **$19 USD, one-time.**
427
490
 
428
491
  Includes the current major version (v1.x) and its maintenance
429
492
  releases. No subscription. No support. No account.
@@ -431,8 +494,8 @@ releases. No subscription. No support. No account.
431
494
  Payments are available in cryptocurrency only:
432
495
 
433
496
  - USDT (TRC20 or BEP20)
434
- - USDC
435
497
  - BTC
498
+ - SOL
436
499
  - TRX
437
500
  - XRP
438
501
 
@@ -497,6 +560,8 @@ A: Pattern-based scanners always produce some. Rules with lower
497
560
  confidence are flagged as such. You can disable any rule in
498
561
  rules.json or via policy overrides.
499
562
 
563
+ <img src="docs/screenshots/cli_clean.jpg" alt="CodeFence clean scan: no findings, a green checkmark, and a single line confirming the file passed" width="400">
564
+
500
565
  **Q: Can I modify the source?**
501
566
  A: Yes, privately. See LICENSE_FAQ.md.
502
567
 
@@ -14,6 +14,7 @@ codefence.egg-info/SOURCES.txt
14
14
  codefence.egg-info/dependency_links.txt
15
15
  codefence.egg-info/entry_points.txt
16
16
  codefence.egg-info/top_level.txt
17
+ docs/DETECTION_METHODOLOGY.md
17
18
  samples/bad_javascript.js
18
19
  samples/bad_python.py
19
20
  samples/clean_example.js