Skip to content

Commit c541ec1

Browse files
tdobrowolski1claude
andcommitted
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

File tree

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
# Local tooling / secrets — never commit
2+
.claude/
3+
CLAUDE.md
4+
.env
5+
.env.*
6+
17
# Byte-compiled / optimized / DLL files
28
__pycache__/
39
*.py[codz]

pyproject.toml

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
44

55
[project]
66
name = "flashalpha"
7-
version = "0.3.4"
7+
version = "0.3.5"
88
description = "Python SDK for the FlashAlpha options analytics API — live options screener, gamma exposure (GEX), VRP, delta, vanna, charm, greeks, 0DTE analytics, volatility surfaces, and more."
99
readme = "README.md"
1010
license = "MIT"
@@ -71,6 +71,26 @@ dev = ["pytest>=7.0", "pytest-cov", "responses>=0.23"]
7171
[tool.hatch.build.targets.wheel]
7272
packages = ["src/flashalpha"]
7373

74+
[tool.hatch.build.targets.sdist]
75+
# Explicit allowlist — only ship source, README, LICENSE, pyproject. Anything
76+
# else in the working dir (e.g. .claude/, CLAUDE.md, .env*, dist/) is excluded.
77+
include = [
78+
"/src/flashalpha",
79+
"/tests",
80+
"/README.md",
81+
"/LICENSE",
82+
"/pyproject.toml",
83+
]
84+
exclude = [
85+
".claude",
86+
"CLAUDE.md",
87+
".env",
88+
".env.*",
89+
".vscode",
90+
".idea",
91+
"*.local",
92+
]
93+
7494
[tool.pytest.ini_options]
7595
testpaths = ["tests"]
7696
markers = ["integration: hits the live FlashAlpha API (deselect with -m 'not integration')"]

src/flashalpha/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
ZeroDteVolContext,
2828
)
2929

30-
__version__ = "0.3.4"
30+
__version__ = "0.3.5"
3131
__all__ = [
3232
"FlashAlpha",
3333
"FlashAlphaError",

0 commit comments

Comments
 (0)