claude-code-sessions-sanitizer 0.3.0__py3-none-any.whl

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.
@@ -0,0 +1,15 @@
1
+ """ccs_sanitize — scrub Claude Code session JSONL for safe publication.
2
+
3
+ Design: see `.claude/specs/prd-sanitizer.md` in the repository.
4
+
5
+ Bumping `__version__` is required for any change that alters the produced
6
+ output bytes (new rule semantics, new secret patterns, changed serialization),
7
+ because the value is recorded in every `.scrubbed` sidecar (PRD section 10) and
8
+ downstream consumers gate on it. See CHANGELOG.md for the bump policy and
9
+ README.md ("Stability and the determinism contract") for the public
10
+ statement of what each bump level promises.
11
+ """
12
+
13
+ __version__ = "0.3.0"
14
+
15
+ __all__ = ["__version__"]
File without changes
@@ -0,0 +1,66 @@
1
+ # Sanitizer config template. This file ships in two roles:
2
+ # - `.ccs-sanitize.example.yaml` -- committed, schema-only reference.
3
+ # - `.ccs-sanitize.yaml` -- gitignored, live config; edit in
4
+ # your own PII values here.
5
+ # `ccs-sanitize --init` writes both files from this same template; if
6
+ # you set up by hand, copy this file to `.ccs-sanitize.yaml` and edit
7
+ # the placeholders below. The live `.ccs-sanitize.yaml` is gitignored
8
+ # because its match values are, by definition, the literal strings you
9
+ # do not want committed to a public repo (real home dir, real email,
10
+ # real name, etc.). See .gitignore for the convention rationale.
11
+ #
12
+ # The sidecar records only the BASENAME of the config under
13
+ # `config_source:` (PRD section 10), so committed `.scrubbed` sidecars
14
+ # stay safe regardless of what is in your local config. The leak surface
15
+ # is the config file itself; gitignoring it closes the surface.
16
+ #
17
+ # Built-in secret patterns (PRD section 9, Tier 1 + Tier 2) are
18
+ # non-weakenable and always apply on top of these rules.
19
+ # Adding rules: the I-3 replacement-leak guard runs at load time, so a
20
+ # misconfigured replacement (one matching another rule or a built-in
21
+ # secret pattern) fails load with exit 3.
22
+ version: 1
23
+
24
+ paths:
25
+ # Home directory. /home/user is the canonical placeholder shipped by the
26
+ # CLI example so downstream consumers (sibling projects, fixture readers)
27
+ # treat it as the universal "developer's home directory."
28
+ - match: "/home/REAL_USERNAME"
29
+ replace: "/home/user"
30
+
31
+ identifiers:
32
+ # Author email. Use the RFC-2606 reserved example.com TLD so a fixture
33
+ # cannot collide with a real address.
34
+ - match: "real.author@example.com"
35
+ replace: "user@example.com"
36
+
37
+ # Bare Unix username. Catches the project-dir encoding Claude Code uses
38
+ # (`-home-USERNAME-Documents-...` where slashes become dashes) plus
39
+ # `ls -l` owner/group columns and any chat content naming the user.
40
+ - match: "REAL_USERNAME"
41
+ replace: "user"
42
+
43
+ # GitHub handle. Catches github.com URLs in commit messages, tool
44
+ # output, and chat. Order this rule BEFORE the personal-name rule:
45
+ # a hyphenated handle like `first-mi-last` may overlap the surname.
46
+ - match: "real-github-handle"
47
+ replace: "real-user"
48
+
49
+ # Author personal name. Appears in git commit `Author:` lines, PRD
50
+ # `**Owner:**` fields, pyproject.toml `authors`, and agent prompts.
51
+ # The placeholder must differ from the match string -- a same-string
52
+ # mapping (e.g. "Real Name" -> "Real Name") fails the I-3 idempotency
53
+ # guard at load time (PRD section 10, config.py _check_replacement_leak).
54
+ - match: "Real Name"
55
+ replace: "Example Author"
56
+
57
+ # options defaults are usually correct:
58
+ # scrub_git_branch: true -- replace `gitBranch` field values with
59
+ # `feature/example` placeholder
60
+ # remap_uuids: false -- leave session/agent/parent UUIDs as-is so
61
+ # the parent-subagent graph stays readable
62
+ # in committed fixtures
63
+ #
64
+ # extra_secret_patterns: [] -- adds project-specific secret detectors on
65
+ # top of the built-in Tier 1 + Tier 2
66
+ # patterns; never removes them.