Commit c541ec1
v0.3.5: harden against credential leaks in sdist
Security: PyPI 0.3.4 sdist included an untracked .claude/settings.json
file that contained API tokens accumulated in Claude Code's permission
allow-rules (responsibly disclosed by an external researcher). The wheel
was unaffected; only the sdist tarball was contaminated. Affected
credentials have been revoked and rotated.
Root cause: hatchling's default sdist builder included every file in the
working directory, including untracked tooling/secrets files that should
never be packaged.
This commit:
- Adds .claude/, CLAUDE.md, .env, and .env.* to .gitignore so they can't
enter the git tree by accident.
- Adds an explicit [tool.hatch.build.targets.sdist] block with an
allowlist (src/, tests/, README, LICENSE, pyproject.toml) and an
explicit deny-list, so untracked files in the working directory are
never included regardless of git status.
- Bumps version to 0.3.5. PyPI 0.3.4 will be yanked.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent c7c5f7e commit c541ec1
3 files changed
Lines changed: 28 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
1 | 7 | | |
2 | 8 | | |
3 | 9 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
74 | 94 | | |
75 | 95 | | |
76 | 96 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| |||
0 commit comments