Skip to content

Commit 5686b14

Browse files
committed
Fix four review findings: EA ordering, SA-01 label, line-number ref, security package
pyproject.toml: - Remove "security" and "security.*" from setuptools include list; the threat model is a source-checkout-only compliance tool and must not be bundled as a top-level namespace package in the distributed wheel. security/threat_model.py: - Declare gh_repository (EA-03) before gh_actions_runner (EA-04) to match numeric order in the RST asset register. - Rename gh_actions_runner label from "EA-04: GitHub Actions Runner" to "EA-04: GitHub Actions Infrastructure" to match doc/explanation/security.rst. - Rename dfetch_cli label from "SA-01: dfetch CLI" to "SA-01: dfetch Process" to match the Supporting Assets table in security.rst. doc/explanation/security.rst: - Remove hard-coded line number from path-traversal control entry; reference the function symbol check_no_path_traversal() and file only so the doc stays correct after refactors. https://claude.ai/code/session_01Rc28JtpAPWhJtA3YvS5kcr
1 parent 80b9f9b commit 5686b14

3 files changed

Lines changed: 11 additions & 11 deletions

File tree

doc/explanation/security.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,7 @@ The following controls are already in place and are reflected in the
439439
``pathlib.Path.resolve``), then rejects any path whose resolved prefix
440440
does not start with the resolved root. Applied to every file copy and
441441
post-extraction symlink.
442-
``dfetch/util/util.py`` — ``check_no_path_traversal`` at line 277
442+
``check_no_path_traversal()`` in ``dfetch/util/util.py``
443443
* - Decompression-bomb protection
444444
- SA-05, PA-02
445445
- Archives are rejected if uncompressed size exceeds 500 MB or the member

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ security = ["pytm==1.3.1"]
113113
dfetch = "dfetch.__main__:main"
114114

115115
[tool.setuptools.packages.find]
116-
include = ["dfetch", "dfetch.*", "security", "security.*"]
116+
include = ["dfetch", "dfetch.*"]
117117

118118
[tool.setuptools.package-data]
119119
dfetch = ["resources/*.yaml"]

security/threat_model.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -91,14 +91,6 @@
9191
"hashes — the integrity.hash field is optional."
9292
)
9393

94-
gh_actions_runner = ExternalEntity("EA-04: GitHub Actions Runner")
95-
gh_actions_runner.inBoundary = boundary_github
96-
gh_actions_runner.description = (
97-
"Microsoft-operated ephemeral runner executing CI/CD workflows. "
98-
"Egress policy is 'audit' (not 'block') — exfiltration of secrets is possible "
99-
"if any workflow step is compromised."
100-
)
101-
10294
gh_repository = ExternalEntity("EA-03: GitHub Repository")
10395
gh_repository.inBoundary = boundary_github
10496
gh_repository.description = (
@@ -107,6 +99,14 @@
10799
"can modify repository state and trigger releases."
108100
)
109101

102+
gh_actions_runner = ExternalEntity("EA-04: GitHub Actions Infrastructure")
103+
gh_actions_runner.inBoundary = boundary_github
104+
gh_actions_runner.description = (
105+
"Microsoft-operated ephemeral runner executing CI/CD workflows. "
106+
"Egress policy is 'audit' (not 'block') — exfiltration of secrets is possible "
107+
"if any workflow step is compromised."
108+
)
109+
110110
pypi = ExternalEntity("EA-05: PyPI / TestPyPI")
111111
pypi.inBoundary = boundary_pypi
112112
pypi.description = (
@@ -124,7 +124,7 @@
124124

125125
# ── Processes ────────────────────────────────────────────────────────────────
126126

127-
dfetch_cli = Process("SA-01: dfetch CLI")
127+
dfetch_cli = Process("SA-01: dfetch Process")
128128
dfetch_cli.inBoundary = boundary_dev_env
129129
dfetch_cli.description = (
130130
"Python CLI entry point dispatching to: update, check, diff, add, remove, "

0 commit comments

Comments
 (0)