granttrace 2.5.1__tar.gz → 2.5.3__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.
- {granttrace-2.5.1 → granttrace-2.5.3}/CHANGELOG.md +48 -0
- {granttrace-2.5.1 → granttrace-2.5.3}/CONTRIBUTING.md +18 -0
- {granttrace-2.5.1 → granttrace-2.5.3}/PKG-INFO +45 -11
- {granttrace-2.5.1 → granttrace-2.5.3}/README.md +44 -10
- granttrace-2.5.3/VERIFICATION.md +172 -0
- {granttrace-2.5.1 → granttrace-2.5.3}/core/__init__.py +1 -1
- {granttrace-2.5.1 → granttrace-2.5.3}/core/auditor.py +268 -33
- {granttrace-2.5.1 → granttrace-2.5.3}/core/config_validator.py +3 -1
- {granttrace-2.5.1 → granttrace-2.5.3}/core/diff.py +172 -21
- {granttrace-2.5.1 → granttrace-2.5.3}/core/parser.py +1 -0
- {granttrace-2.5.1 → granttrace-2.5.3}/core/reporter.py +92 -3
- granttrace-2.5.3/core/scan_safety.py +127 -0
- {granttrace-2.5.1 → granttrace-2.5.3}/docs/advanced.md +2 -0
- granttrace-2.5.3/docs/authorization-audit-hardening.md +332 -0
- granttrace-2.5.1/docs/release-checklist.md → granttrace-2.5.3/docs/history/release-checklist-history.md +52 -5
- granttrace-2.5.1/VERIFICATION.md → granttrace-2.5.3/docs/history/release-verification-history.md +119 -0
- granttrace-2.5.3/docs/release-checklist.md +42 -0
- granttrace-2.5.3/docs/windows-portable.md +70 -0
- {granttrace-2.5.1 → granttrace-2.5.3}/examples/README.md +1 -1
- {granttrace-2.5.1 → granttrace-2.5.3}/examples/sample_report.html +170 -108
- {granttrace-2.5.1 → granttrace-2.5.3}/examples/sample_result.json +174 -111
- {granttrace-2.5.1 → granttrace-2.5.3}/granttrace.egg-info/PKG-INFO +45 -11
- {granttrace-2.5.1 → granttrace-2.5.3}/granttrace.egg-info/SOURCES.txt +14 -0
- {granttrace-2.5.1 → granttrace-2.5.3}/pyproject.toml +1 -1
- granttrace-2.5.3/scripts/benchmark_read_safety.py +226 -0
- granttrace-2.5.3/scripts/build_windows_portable.py +134 -0
- granttrace-2.5.3/scripts/verify_windows_portable.py +290 -0
- granttrace-2.5.3/tests/test_authorization_evidence_hardening.py +269 -0
- granttrace-2.5.3/tests/test_authorization_policy_preflight.py +106 -0
- {granttrace-2.5.1 → granttrace-2.5.3}/tests/test_rc2_security_hardening.py +1 -1
- granttrace-2.5.3/tests/test_read_only_path_guards.py +354 -0
- granttrace-2.5.3/tests/test_read_only_safety.py +332 -0
- granttrace-2.5.3/tests/test_read_safety_cache.py +200 -0
- granttrace-2.5.3/tests/test_scan_accounting.py +186 -0
- {granttrace-2.5.1 → granttrace-2.5.3}/LICENSE +0 -0
- {granttrace-2.5.1 → granttrace-2.5.3}/MANIFEST.in +0 -0
- {granttrace-2.5.1 → granttrace-2.5.3}/SECURITY.md +0 -0
- {granttrace-2.5.1 → granttrace-2.5.3}/api_sentinel.py +0 -0
- {granttrace-2.5.1 → granttrace-2.5.3}/config.example.json +0 -0
- {granttrace-2.5.1 → granttrace-2.5.3}/config.schema.json +0 -0
- {granttrace-2.5.1 → granttrace-2.5.3}/core/config_scaffold.py +0 -0
- {granttrace-2.5.1 → granttrace-2.5.3}/core/demo.py +0 -0
- {granttrace-2.5.1 → granttrace-2.5.3}/core/demo_assets/__init__.py +0 -0
- {granttrace-2.5.1 → granttrace-2.5.3}/core/demo_assets/demo-config.json +0 -0
- {granttrace-2.5.1 → granttrace-2.5.3}/core/demo_assets/mock-data.json +0 -0
- {granttrace-2.5.1 → granttrace-2.5.3}/core/demo_assets/openapi.json +0 -0
- {granttrace-2.5.1 → granttrace-2.5.3}/core/evidence.py +0 -0
- {granttrace-2.5.1 → granttrace-2.5.3}/core/generator.py +0 -0
- {granttrace-2.5.1 → granttrace-2.5.3}/core/models.py +0 -0
- {granttrace-2.5.1 → granttrace-2.5.3}/core/onboarding.py +0 -0
- {granttrace-2.5.1 → granttrace-2.5.3}/core/parameters.py +0 -0
- {granttrace-2.5.1 → granttrace-2.5.3}/core/reproduction.py +0 -0
- {granttrace-2.5.1 → granttrace-2.5.3}/core/sarif.py +0 -0
- {granttrace-2.5.1 → granttrace-2.5.3}/core/transactions.py +0 -0
- {granttrace-2.5.1 → granttrace-2.5.3}/docs/assets/report-preview.png +0 -0
- {granttrace-2.5.1 → granttrace-2.5.3}/docs/business-scenarios.md +0 -0
- {granttrace-2.5.1 → granttrace-2.5.3}/docs/configuration.md +0 -0
- {granttrace-2.5.1 → granttrace-2.5.3}/docs/parameter-serialization.md +0 -0
- {granttrace-2.5.1 → granttrace-2.5.3}/granttrace.egg-info/dependency_links.txt +0 -0
- {granttrace-2.5.1 → granttrace-2.5.3}/granttrace.egg-info/entry_points.txt +0 -0
- {granttrace-2.5.1 → granttrace-2.5.3}/granttrace.egg-info/requires.txt +0 -0
- {granttrace-2.5.1 → granttrace-2.5.3}/granttrace.egg-info/top_level.txt +0 -0
- {granttrace-2.5.1 → granttrace-2.5.3}/mock_server/__init__.py +0 -0
- {granttrace-2.5.1 → granttrace-2.5.3}/mock_server/server.py +0 -0
- {granttrace-2.5.1 → granttrace-2.5.3}/openapi.json +0 -0
- {granttrace-2.5.1 → granttrace-2.5.3}/scripts/verify_business_scenarios.py +0 -0
- {granttrace-2.5.1 → granttrace-2.5.3}/scripts/verify_examples.py +0 -0
- {granttrace-2.5.1 → granttrace-2.5.3}/scripts/verify_install.py +0 -0
- {granttrace-2.5.1 → granttrace-2.5.3}/setup.cfg +0 -0
- {granttrace-2.5.1 → granttrace-2.5.3}/test_suite.py +0 -0
- {granttrace-2.5.1 → granttrace-2.5.3}/tests/test_auditor_integration.py +0 -0
- {granttrace-2.5.1 → granttrace-2.5.3}/tests/test_business_authorization.py +0 -0
- {granttrace-2.5.1 → granttrace-2.5.3}/tests/test_cli_report_boundaries.py +0 -0
- {granttrace-2.5.1 → granttrace-2.5.3}/tests/test_config_scaffold.py +0 -0
- {granttrace-2.5.1 → granttrace-2.5.3}/tests/test_config_validation.py +0 -0
- {granttrace-2.5.1 → granttrace-2.5.3}/tests/test_curl_report.py +0 -0
- {granttrace-2.5.1 → granttrace-2.5.3}/tests/test_demo.py +0 -0
- {granttrace-2.5.1 → granttrace-2.5.3}/tests/test_diff.py +0 -0
- {granttrace-2.5.1 → granttrace-2.5.3}/tests/test_diff_hardening.py +0 -0
- {granttrace-2.5.1 → granttrace-2.5.3}/tests/test_evidence.py +0 -0
- {granttrace-2.5.1 → granttrace-2.5.3}/tests/test_first_run_guidance.py +0 -0
- {granttrace-2.5.1 → granttrace-2.5.3}/tests/test_merge_patch_recovery.py +0 -0
- {granttrace-2.5.1 → granttrace-2.5.3}/tests/test_onboarding.py +0 -0
- {granttrace-2.5.1 → granttrace-2.5.3}/tests/test_onboarding_cli.py +0 -0
- {granttrace-2.5.1 → granttrace-2.5.3}/tests/test_parameter_compatibility.py +0 -0
- {granttrace-2.5.1 → granttrace-2.5.3}/tests/test_parameter_serialization.py +0 -0
- {granttrace-2.5.1 → granttrace-2.5.3}/tests/test_parser_generator_hardening.py +0 -0
- {granttrace-2.5.1 → granttrace-2.5.3}/tests/test_rc3_hardening.py +0 -0
- {granttrace-2.5.1 → granttrace-2.5.3}/tests/test_release_bola.py +0 -0
- {granttrace-2.5.1 → granttrace-2.5.3}/tests/test_release_config.py +0 -0
- {granttrace-2.5.1 → granttrace-2.5.3}/tests/test_release_evidence.py +0 -0
- {granttrace-2.5.1 → granttrace-2.5.3}/tests/test_release_identity.py +0 -0
- {granttrace-2.5.1 → granttrace-2.5.3}/tests/test_release_transactions.py +0 -0
- {granttrace-2.5.1 → granttrace-2.5.3}/tests/test_report_usability.py +0 -0
- {granttrace-2.5.1 → granttrace-2.5.3}/tests/test_reproduction.py +0 -0
- {granttrace-2.5.1 → granttrace-2.5.3}/tests/test_sarif.py +0 -0
- {granttrace-2.5.1 → granttrace-2.5.3}/tests/test_sarif_cli.py +0 -0
- {granttrace-2.5.1 → granttrace-2.5.3}/tests/test_schema_regressions.py +0 -0
- {granttrace-2.5.1 → granttrace-2.5.3}/tests/test_spec_config_cross_checks.py +0 -0
- {granttrace-2.5.1 → granttrace-2.5.3}/tests/test_v22_auditor_hardening.py +0 -0
|
@@ -1,5 +1,53 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 2.5.3 - Unreleased
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
|
|
7
|
+
- [PR #33](https://github.com/ysc070528/granttrace/pull/33): recognize complete
|
|
8
|
+
authentication and permission denial messages, including JWT denials, without
|
|
9
|
+
treating rejected responses containing business data as clean denials. Explain
|
|
10
|
+
Owner, Visitor self-resource and Anonymous evidence and missing prerequisites;
|
|
11
|
+
retain conservative BOLA / IDOR confirmation requirements.
|
|
12
|
+
- Validate selected BOLA policies before HTTP requests and accept the existing
|
|
13
|
+
`items[].id` trusted-evidence selector syntax in configuration validation.
|
|
14
|
+
- Count actual transport attempts and distinct method/path operations for
|
|
15
|
+
attempted and conclusive coverage. Exclude zero-request preflight outcomes
|
|
16
|
+
and recovery rows from endpoint coverage; explain skip and evidence categories
|
|
17
|
+
in reports. `SUSPICIOUS` and `INCONCLUSIVE` remain non-conclusive.
|
|
18
|
+
- Apply read-only side-effect checks using operation identifiers, paths,
|
|
19
|
+
summaries and descriptions during BOLA preflight, dry-run planning and final
|
|
20
|
+
HTTP execution. Reject unsafe independent readbacks before any PATCH.
|
|
21
|
+
- [PR #34](https://github.com/ysc070528/granttrace/pull/34): validate each concrete
|
|
22
|
+
GET / HEAD path, including the target base path, before route-cache lookup and
|
|
23
|
+
transport. Reject ambiguous encodings, invalid UTF-8, dot/matrix-dot segments,
|
|
24
|
+
repeated slashes, boundary encoded slashes, backslashes and control characters.
|
|
25
|
+
Apply the same guard to BOLA, offline plans and PATCH readbacks without rewriting
|
|
26
|
+
URLs; ordinary supported encoded identifiers remain supported.
|
|
27
|
+
|
|
28
|
+
### Changed
|
|
29
|
+
|
|
30
|
+
- Reuse cached immutable read-safety metadata and route patterns from PR #33
|
|
31
|
+
while continuing to validate every concrete URL before requests.
|
|
32
|
+
- Synchronize package, runtime, Windows distribution and release-workflow
|
|
33
|
+
versions to `2.5.3`; refresh release documentation and generated loopback
|
|
34
|
+
examples. This release preparation introduces no new detector or API behavior.
|
|
35
|
+
|
|
36
|
+
Static read-safety checks do not prove that every GET is harmless. Verification
|
|
37
|
+
scope and pending publication steps are recorded in [VERIFICATION.md](VERIFICATION.md).
|
|
38
|
+
|
|
39
|
+
## 2.5.2 - 2026-10-05
|
|
40
|
+
|
|
41
|
+
### Maintenance
|
|
42
|
+
|
|
43
|
+
- Documentation / distribution metadata maintenance release: package the current
|
|
44
|
+
README for the PyPI project page, retaining the corrected Windows download,
|
|
45
|
+
unsigned-program notice, macOS / Linux installation and workflow explanation.
|
|
46
|
+
- Align package/runtime versions and Windows portable filenames, launcher,
|
|
47
|
+
bundled instructions and release workflow metadata at `2.5.2`.
|
|
48
|
+
- No changes to BOLA / IDOR / Mass Assignment detection, the security model,
|
|
49
|
+
default read-only behavior, CLI semantics or core implementation.
|
|
50
|
+
|
|
3
51
|
## 2.5.1 - 2026-10-05
|
|
4
52
|
|
|
5
53
|
### Fixed
|
|
@@ -45,3 +45,21 @@ or sensitive identity information. Redact examples and reports before sharing.
|
|
|
45
45
|
Report vulnerabilities through GitHub's
|
|
46
46
|
[Private Vulnerability Reporting](https://github.com/ysc070528/granttrace/security/advisories/new),
|
|
47
47
|
following [SECURITY.md](SECURITY.md), rather than a public issue.
|
|
48
|
+
|
|
49
|
+
## Branch naming
|
|
50
|
+
|
|
51
|
+
Use a prefix that describes the purpose of the change, followed by a short,
|
|
52
|
+
descriptive topic:
|
|
53
|
+
|
|
54
|
+
- `feat/<topic>` for features.
|
|
55
|
+
- `fix/<topic>` for bug fixes.
|
|
56
|
+
- `docs/<topic>` for documentation changes.
|
|
57
|
+
- `refactor/<topic>` for refactoring.
|
|
58
|
+
- `test/<topic>` for test changes.
|
|
59
|
+
- `chore/<topic>` for maintenance.
|
|
60
|
+
- `release/vX.Y.Z` for release preparation.
|
|
61
|
+
|
|
62
|
+
Examples: `fix/openapi-array-validation`, `docs/windows-installation`, and
|
|
63
|
+
`chore/release-metadata`.
|
|
64
|
+
|
|
65
|
+
Avoid tool-specific prefixes in new branches.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: granttrace
|
|
3
|
-
Version: 2.5.
|
|
3
|
+
Version: 2.5.3
|
|
4
4
|
Summary: Safety-first OpenAPI authorization auditing tool for BOLA, IDOR and Mass Assignment testing
|
|
5
5
|
Author: GrantTrace contributors
|
|
6
6
|
License-Expression: Apache-2.0
|
|
@@ -32,27 +32,34 @@ Dynamic: license-file
|
|
|
32
32
|

|
|
33
33
|

|
|
34
34
|
|
|
35
|
-
|
|
35
|
+
**源码 / 包元数据版本:2.5.3(发布准备,未发布)** · [GitHub Releases](https://github.com/ysc070528/granttrace/releases/latest) · [PyPI](https://pypi.org/project/granttrace/)
|
|
36
36
|
|
|
37
|
-
|
|
37
|
+
Windows 便携版已正式提供;已发布版本与下载资产以官方 GitHub Release / PyPI 页面实际列出的版本为准。下方下载入口和 `pip install` 获取已发布版本;v2.5.3 须完成发布后才可通过这些入口安装。
|
|
38
38
|
|
|
39
39
|
An OpenAPI authorization auditor that compares identities, verifies persisted changes, and reports restoration evidence.
|
|
40
40
|
|
|
41
41
|
安全优先、证据驱动的 OpenAPI 权限审计工具。检查 BOLA / IDOR 与 Mass Assignment,输出身份对比、持久化变更及恢复核验的 HTML / JSON 报告。默认只读;主动写测试须显式开启并配置允许清单与独立读回。
|
|
42
42
|
|
|
43
|
-
|
|
43
|
+
默认扫描会在请求前跳过具有明显状态变更语义的 GET,包括独立读回;静态规则无法保证发现所有副作用,仍需人工核对规范和计划。拒绝响应、授权证据及覆盖率的具体边界见 [授权审计加固说明](docs/authorization-audit-hardening.md)。
|
|
44
44
|
|
|
45
|
-
|
|
45
|
+
仅对明确获得授权的系统进行测试;主动写测试仅应在可丢弃、隔离的测试资源上启用。
|
|
46
46
|
|
|
47
|
-
|
|
48
|
-
- **Verify real side effects**:通过独立读回验证状态是否真正持久化,不只看 HTTP 状态码。
|
|
49
|
-
- **Restore safely**:主动 PATCH 测试使用显式 allowlist、原始状态快照、恢复与恢复验证。
|
|
47
|
+
## Windows 用户:解压后双击体验
|
|
50
48
|
|
|
51
|
-
|
|
49
|
+
**推荐 Windows 10 / 11(64 位),便携包无需安装 Python。** 从官方 [GitHub Release](https://github.com/ysc070528/granttrace/releases/latest) 选择对应版本下载:
|
|
52
50
|
|
|
53
|
-
|
|
51
|
+
1. 下载 Release 中实际提供的 Windows x64 ZIP,将整个 ZIP 解压到一个普通文件夹。v2.5.3 发布后的文件名为 **`GrantTrace-v2.5.3-Windows-x64.zip`**。
|
|
52
|
+
2. 打开解压后的文件夹,双击 **`Start-Demo.bat`**;保留旁边的程序和依赖文件。
|
|
53
|
+
3. 查看自动打开的 HTML 报告;若未打开,按启动器打印的 HTML 路径手动打开。HTML / JSON 保存在解压目录的 `granttrace-demo/session-*/run-*/`。Demo 只使用内置、可丢弃的 `127.0.0.1` 靶场,结束时关闭靶场并核验数据恢复。
|
|
54
|
+
|
|
55
|
+
不要直接在 ZIP 内运行启动器。便携包版本以包内 `README.txt` 和 `.\granttrace.exe --version` 为准;程序、启动器和报告在解压目录内使用,不需要修改系统 PATH。维护者的构建与验收步骤见 [Windows 便携包说明](docs/windows-portable.md)。
|
|
54
56
|
|
|
55
|
-
|
|
57
|
+
Windows 便携程序尚未进行代码签名,部分系统可能显示 Microsoft Defender SmartScreen 或“发布者未知”提示。请只从官方 GitHub Release 下载,并使用同一 Release 的 **`SHA256SUMS.txt`** 核对完整性。
|
|
58
|
+
|
|
59
|
+
## macOS / Linux 用户:使用 Python 安装
|
|
60
|
+
|
|
61
|
+
需要 **Python 3.9+**;当前不提供 macOS / Linux standalone binary,Windows ZIP 仅适用于 Windows。
|
|
62
|
+
已有 Python 的 Windows 用户也可沿用此方式:
|
|
56
63
|
|
|
57
64
|
```bash
|
|
58
65
|
python -m pip install --upgrade granttrace
|
|
@@ -60,6 +67,33 @@ granttrace --version
|
|
|
60
67
|
granttrace demo
|
|
61
68
|
```
|
|
62
69
|
|
|
70
|
+
[Python 五分钟体验](#五分钟体验) · [完整示例报告](https://github.com/ysc070528/granttrace/blob/main/examples/sample_report.html) · [配置指南](https://github.com/ysc070528/granttrace/blob/main/docs/configuration.md) · [命令行与迁移](https://github.com/ysc070528/granttrace/blob/main/docs/advanced.md) · [验收记录](https://github.com/ysc070528/granttrace/blob/main/VERIFICATION.md) · [发布自检](https://github.com/ysc070528/granttrace/blob/main/docs/release-checklist.md)
|
|
71
|
+
|
|
72
|
+
## 为什么是 GrantTrace / Why GrantTrace
|
|
73
|
+
|
|
74
|
+
- **Compare identities**:比较 Owner / Visitor / Anonymous 等身份访问同一资源的结果。
|
|
75
|
+
- **Verify real side effects**:通过独立读回验证状态是否真正持久化,不只看 HTTP 状态码。
|
|
76
|
+
- **Restore safely**:主动 PATCH 测试使用显式 allowlist、原始状态快照、恢复与恢复验证。
|
|
77
|
+
|
|
78
|
+
## 10 秒看懂 GrantTrace
|
|
79
|
+
|
|
80
|
+
```mermaid
|
|
81
|
+
flowchart TD
|
|
82
|
+
A["OpenAPI Spec + Owner / Visitor / Anonymous"] --> B["GrantTrace"]
|
|
83
|
+
B --> C["只读身份差异比较(默认)"]
|
|
84
|
+
C --> R["HTML / JSON(可选 SARIF)"]
|
|
85
|
+
B -->|显式开启并满足写入安全条件| W["PATCH 测试"]
|
|
86
|
+
W --> D["独立 GET 读回"]
|
|
87
|
+
D --> E["恢复并验证"]
|
|
88
|
+
E --> R
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
<img src="https://raw.githubusercontent.com/ysc070528/granttrace/main/docs/assets/report-preview.png" alt="GrantTrace 报告:身份访问摘要、修复建议和端点筛选" width="900">
|
|
92
|
+
|
|
93
|
+
## 五分钟体验
|
|
94
|
+
|
|
95
|
+
使用上方 Windows 启动器或 Python 安装命令,即可体验内置 `granttrace demo`。
|
|
96
|
+
|
|
63
97
|
安装后可在任意目录运行,无需 clone、准备配置、另开终端或访问外部 API。Demo 自动启动动态端口的 `127.0.0.1` 靶场,比较身份访问、演示 BOLA / IDOR 与 Mass Assignment,并通过独立读回与恢复核验展示 PATCH 测试证据。**主动写操作仅发生在内置、可丢弃的本机靶场**;demo 不接受外部 target 或用户凭据,结束时关闭靶场。
|
|
64
98
|
|
|
65
99
|
HTML / JSON 报告保留在当前目录的 `granttrace-demo/` 唯一子目录,终端会输出绝对路径,不覆盖已有报告。可选用 `granttrace demo --output-dir PATH` 指定报告父目录,或 `granttrace demo --read-only` 仅体验只读身份访问,发送 **0 PATCH**。
|
|
@@ -5,27 +5,34 @@
|
|
|
5
5
|

|
|
6
6
|

|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
**源码 / 包元数据版本:2.5.3(发布准备,未发布)** · [GitHub Releases](https://github.com/ysc070528/granttrace/releases/latest) · [PyPI](https://pypi.org/project/granttrace/)
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
Windows 便携版已正式提供;已发布版本与下载资产以官方 GitHub Release / PyPI 页面实际列出的版本为准。下方下载入口和 `pip install` 获取已发布版本;v2.5.3 须完成发布后才可通过这些入口安装。
|
|
11
11
|
|
|
12
12
|
An OpenAPI authorization auditor that compares identities, verifies persisted changes, and reports restoration evidence.
|
|
13
13
|
|
|
14
14
|
安全优先、证据驱动的 OpenAPI 权限审计工具。检查 BOLA / IDOR 与 Mass Assignment,输出身份对比、持久化变更及恢复核验的 HTML / JSON 报告。默认只读;主动写测试须显式开启并配置允许清单与独立读回。
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
默认扫描会在请求前跳过具有明显状态变更语义的 GET,包括独立读回;静态规则无法保证发现所有副作用,仍需人工核对规范和计划。拒绝响应、授权证据及覆盖率的具体边界见 [授权审计加固说明](docs/authorization-audit-hardening.md)。
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
仅对明确获得授权的系统进行测试;主动写测试仅应在可丢弃、隔离的测试资源上启用。
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
- **Verify real side effects**:通过独立读回验证状态是否真正持久化,不只看 HTTP 状态码。
|
|
22
|
-
- **Restore safely**:主动 PATCH 测试使用显式 allowlist、原始状态快照、恢复与恢复验证。
|
|
20
|
+
## Windows 用户:解压后双击体验
|
|
23
21
|
|
|
24
|
-
|
|
22
|
+
**推荐 Windows 10 / 11(64 位),便携包无需安装 Python。** 从官方 [GitHub Release](https://github.com/ysc070528/granttrace/releases/latest) 选择对应版本下载:
|
|
25
23
|
|
|
26
|
-
|
|
24
|
+
1. 下载 Release 中实际提供的 Windows x64 ZIP,将整个 ZIP 解压到一个普通文件夹。v2.5.3 发布后的文件名为 **`GrantTrace-v2.5.3-Windows-x64.zip`**。
|
|
25
|
+
2. 打开解压后的文件夹,双击 **`Start-Demo.bat`**;保留旁边的程序和依赖文件。
|
|
26
|
+
3. 查看自动打开的 HTML 报告;若未打开,按启动器打印的 HTML 路径手动打开。HTML / JSON 保存在解压目录的 `granttrace-demo/session-*/run-*/`。Demo 只使用内置、可丢弃的 `127.0.0.1` 靶场,结束时关闭靶场并核验数据恢复。
|
|
27
|
+
|
|
28
|
+
不要直接在 ZIP 内运行启动器。便携包版本以包内 `README.txt` 和 `.\granttrace.exe --version` 为准;程序、启动器和报告在解压目录内使用,不需要修改系统 PATH。维护者的构建与验收步骤见 [Windows 便携包说明](docs/windows-portable.md)。
|
|
27
29
|
|
|
28
|
-
|
|
30
|
+
Windows 便携程序尚未进行代码签名,部分系统可能显示 Microsoft Defender SmartScreen 或“发布者未知”提示。请只从官方 GitHub Release 下载,并使用同一 Release 的 **`SHA256SUMS.txt`** 核对完整性。
|
|
31
|
+
|
|
32
|
+
## macOS / Linux 用户:使用 Python 安装
|
|
33
|
+
|
|
34
|
+
需要 **Python 3.9+**;当前不提供 macOS / Linux standalone binary,Windows ZIP 仅适用于 Windows。
|
|
35
|
+
已有 Python 的 Windows 用户也可沿用此方式:
|
|
29
36
|
|
|
30
37
|
```bash
|
|
31
38
|
python -m pip install --upgrade granttrace
|
|
@@ -33,6 +40,33 @@ granttrace --version
|
|
|
33
40
|
granttrace demo
|
|
34
41
|
```
|
|
35
42
|
|
|
43
|
+
[Python 五分钟体验](#五分钟体验) · [完整示例报告](https://github.com/ysc070528/granttrace/blob/main/examples/sample_report.html) · [配置指南](https://github.com/ysc070528/granttrace/blob/main/docs/configuration.md) · [命令行与迁移](https://github.com/ysc070528/granttrace/blob/main/docs/advanced.md) · [验收记录](https://github.com/ysc070528/granttrace/blob/main/VERIFICATION.md) · [发布自检](https://github.com/ysc070528/granttrace/blob/main/docs/release-checklist.md)
|
|
44
|
+
|
|
45
|
+
## 为什么是 GrantTrace / Why GrantTrace
|
|
46
|
+
|
|
47
|
+
- **Compare identities**:比较 Owner / Visitor / Anonymous 等身份访问同一资源的结果。
|
|
48
|
+
- **Verify real side effects**:通过独立读回验证状态是否真正持久化,不只看 HTTP 状态码。
|
|
49
|
+
- **Restore safely**:主动 PATCH 测试使用显式 allowlist、原始状态快照、恢复与恢复验证。
|
|
50
|
+
|
|
51
|
+
## 10 秒看懂 GrantTrace
|
|
52
|
+
|
|
53
|
+
```mermaid
|
|
54
|
+
flowchart TD
|
|
55
|
+
A["OpenAPI Spec + Owner / Visitor / Anonymous"] --> B["GrantTrace"]
|
|
56
|
+
B --> C["只读身份差异比较(默认)"]
|
|
57
|
+
C --> R["HTML / JSON(可选 SARIF)"]
|
|
58
|
+
B -->|显式开启并满足写入安全条件| W["PATCH 测试"]
|
|
59
|
+
W --> D["独立 GET 读回"]
|
|
60
|
+
D --> E["恢复并验证"]
|
|
61
|
+
E --> R
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
<img src="https://raw.githubusercontent.com/ysc070528/granttrace/main/docs/assets/report-preview.png" alt="GrantTrace 报告:身份访问摘要、修复建议和端点筛选" width="900">
|
|
65
|
+
|
|
66
|
+
## 五分钟体验
|
|
67
|
+
|
|
68
|
+
使用上方 Windows 启动器或 Python 安装命令,即可体验内置 `granttrace demo`。
|
|
69
|
+
|
|
36
70
|
安装后可在任意目录运行,无需 clone、准备配置、另开终端或访问外部 API。Demo 自动启动动态端口的 `127.0.0.1` 靶场,比较身份访问、演示 BOLA / IDOR 与 Mass Assignment,并通过独立读回与恢复核验展示 PATCH 测试证据。**主动写操作仅发生在内置、可丢弃的本机靶场**;demo 不接受外部 target 或用户凭据,结束时关闭靶场。
|
|
37
71
|
|
|
38
72
|
HTML / JSON 报告保留在当前目录的 `granttrace-demo/` 唯一子目录,终端会输出绝对路径,不覆盖已有报告。可选用 `granttrace demo --output-dir PATH` 指定报告父目录,或 `granttrace demo --read-only` 仅体验只读身份访问,发送 **0 PATCH**。
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
# GrantTrace Verification
|
|
2
|
+
|
|
3
|
+
Detailed historical release verification records are archived in
|
|
4
|
+
[release verification history](docs/history/release-verification-history.md).
|
|
5
|
+
|
|
6
|
+
## v2.5.3 release preparation - 2026-10-13
|
|
7
|
+
|
|
8
|
+
Status: **local validation passed; v2.5.3 is not published**. The reviewed main
|
|
9
|
+
baseline is [8021ef208a9f5883894e8fb63e397c4eb9040070](https://github.com/ysc070528/granttrace/commit/8021ef208a9f5883894e8fb63e397c4eb9040070),
|
|
10
|
+
which includes merged [PR #33](https://github.com/ysc070528/granttrace/pull/33)
|
|
11
|
+
and [PR #34](https://github.com/ysc070528/granttrace/pull/34). Version and release
|
|
12
|
+
documentation changes are uncommitted. This preparation changes no detector,
|
|
13
|
+
core logic or API behavior.
|
|
14
|
+
|
|
15
|
+
Local environment: Windows 11 x64 `10.0.26200`, standard CPython **3.14.5**,
|
|
16
|
+
PyYAML **6.0.3**, pytest **9.1.1**, coverage **7.16.2**, Ruff **0.16.10**,
|
|
17
|
+
Mypy **2.4.0**, build **1.6.1**, Twine **7.0.0**, setuptools **84.0.0**,
|
|
18
|
+
wheel **0.48.0**. Portable builds use CPython **3.14.5** and PyInstaller
|
|
19
|
+
**6.22.3**, with the pins in `packaging/windows/requirements-build.txt`.
|
|
20
|
+
|
|
21
|
+
| Check | This preparation |
|
|
22
|
+
|---|---|
|
|
23
|
+
| Full regression suite | 634 passed, 1176 subtests passed on CPython 3.14.5; 142.51 seconds |
|
|
24
|
+
| Branch-aware coverage | 86.49% on CPython 3.14.5; required minimum 80% |
|
|
25
|
+
| Mypy / Ruff | Passed; no Mypy issues in 19 source files |
|
|
26
|
+
| Business scenarios | 6/6 passed; zero fixture false positives, false negatives or inconclusive results |
|
|
27
|
+
| JSON / YAML examples | Read-only JSON and active JSON/YAML passed; full mock database restored; conclusive coverage 60% / 100% |
|
|
28
|
+
| Generated examples | Regenerated against the bundled loopback mock with version 2.5.3 |
|
|
29
|
+
| Wheel / sdist | Build and `twine check --strict` passed; package metadata and contents checked |
|
|
30
|
+
| Fresh wheel installation | Passed in a new external venv using the local wheelhouse; package/runtime/CLI/HTML/JSON/User-Agent versions agree at 2.5.3 |
|
|
31
|
+
| Windows x64 portable | Built and extracted-ZIP smoke passed under space and Chinese paths; ZIP, checksum and build/smoke JSON hashes agree |
|
|
32
|
+
| README public links | All actual public links returned HTTP 200; main raw PNG validated; latest Release currently resolves to v2.5.2 |
|
|
33
|
+
| Final release-commit CI / CodeQL / Windows | Needs completion after commit / push / review |
|
|
34
|
+
| PyPI 2.5.3 installation | Needs completion after publication; PyPI currently exposes 2.5.2 and returns 404 for 2.5.3 |
|
|
35
|
+
| Manual Windows double-click / clean machine / browser inspection | Needs completion; automated smoke does not cover these checks |
|
|
36
|
+
|
|
37
|
+
Evidence for this run is saved locally under `dist/v2.5.3-release-prep/`,
|
|
38
|
+
`dist/v2.5.3-distributions/` and `dist/v2.5.3-windows/`. These ignored local
|
|
39
|
+
outputs are release candidates from the modified worktree, not final public
|
|
40
|
+
Release assets. Build JSON records `source_tree_dirty: true` for this preparation.
|
|
41
|
+
|
|
42
|
+
Fresh wheel installation verified packaged demo resources, active recovery,
|
|
43
|
+
full database restoration, local server shutdown, read-only zero PATCH and
|
|
44
|
+
JSON/YAML offline plans with zero requests. Windows validation used a reduced
|
|
45
|
+
PATH without Python, cleared Python environment variables and suppressed browser
|
|
46
|
+
opening; the launcher pause was acknowledged via stdin. These are automated
|
|
47
|
+
checks on the documented host, not clean-machine or manual desktop validation.
|
|
48
|
+
|
|
49
|
+
Local test commands used for this preparation:
|
|
50
|
+
|
|
51
|
+
```powershell
|
|
52
|
+
.\.venv\Scripts\python.exe -m coverage run --data-file=dist/v2.5.3-release-prep/.coverage -m pytest --junitxml=dist/v2.5.3-release-prep/regression.xml
|
|
53
|
+
.\.venv\Scripts\python.exe -m coverage report --data-file=dist/v2.5.3-release-prep/.coverage
|
|
54
|
+
.\.venv\Scripts\python.exe -m ruff check .
|
|
55
|
+
.\.venv\Scripts\python.exe -m mypy
|
|
56
|
+
.\.venv\Scripts\python.exe scripts/verify_business_scenarios.py
|
|
57
|
+
.\.venv\Scripts\python.exe scripts/verify_examples.py --update-examples
|
|
58
|
+
.\.venv\Scripts\python.exe -m build --no-isolation --outdir dist/v2.5.3-distributions
|
|
59
|
+
.\.venv\Scripts\python.exe -m twine check --strict dist/v2.5.3-distributions/granttrace-2.5.3-py3-none-any.whl dist/v2.5.3-distributions/granttrace-2.5.3.tar.gz
|
|
60
|
+
.\.venv\Scripts\python.exe scripts/verify_install.py --wheel dist/v2.5.3-distributions/granttrace-2.5.3-py3-none-any.whl --wheelhouse dist/windows-wheelhouse --output dist/v2.5.3-release-prep/install-verification.json
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
Windows build/smoke commands are in [Windows portable](docs/windows-portable.md).
|
|
64
|
+
This preparation used `--output-dir dist/v2.5.3-windows` for the builder, with
|
|
65
|
+
the verifier's `--zip` and `--output` pointing to that same directory.
|
|
66
|
+
|
|
67
|
+
The merged baseline has successful [CI](https://github.com/ysc070528/granttrace/actions/runs/37877528925),
|
|
68
|
+
[CodeQL](https://github.com/ysc070528/granttrace/actions/runs/37877528892)
|
|
69
|
+
and [Windows portable](https://github.com/ysc070528/granttrace/actions/runs/37877528884).
|
|
70
|
+
Its Python 3.9 / 3.12 / 3.14 jobs passed; the Python 3.12 log records **634 tests**
|
|
71
|
+
and **86.49%** branch-aware coverage. These results apply to `8021ef2`, whose
|
|
72
|
+
package version was 2.5.2, and do not verify the upcoming release commit.
|
|
73
|
+
|
|
74
|
+
The four Actions workflows were reviewed. CI retains the supported Python
|
|
75
|
+
matrix, the 80% coverage gate, Mypy, Ruff, runtime dependency auditing, business
|
|
76
|
+
fixtures, JSON/YAML scans and external fresh installation. Windows artifact
|
|
77
|
+
paths and the publishing workflow's version selection are synchronized to
|
|
78
|
+
v2.5.3. The publishing workflow was not dispatched. It publishes only from an
|
|
79
|
+
official stable Release and checks tag, source and distribution metadata, but
|
|
80
|
+
does not itself require successful CI: maintainers must check the final SHA
|
|
81
|
+
before creating a tag.
|
|
82
|
+
|
|
83
|
+
### SHA256 verification
|
|
84
|
+
|
|
85
|
+
Local distribution hashes are recorded in
|
|
86
|
+
`dist/v2.5.3-distributions/SHA256SUMS.txt`. The Windows builder separately writes
|
|
87
|
+
`dist/v2.5.3-windows/SHA256SUMS.txt`; its ZIP hash must match the build and smoke
|
|
88
|
+
JSON evidence. Verify the exact files intended for upload:
|
|
89
|
+
|
|
90
|
+
```powershell
|
|
91
|
+
Get-FileHash -Algorithm SHA256 dist/v2.5.3-distributions/granttrace-2.5.3-py3-none-any.whl
|
|
92
|
+
Get-FileHash -Algorithm SHA256 dist/v2.5.3-distributions/granttrace-2.5.3.tar.gz
|
|
93
|
+
Get-FileHash -Algorithm SHA256 dist/v2.5.3-windows/GrantTrace-v2.5.3-Windows-x64.zip
|
|
94
|
+
Get-Content dist/v2.5.3-distributions/SHA256SUMS.txt
|
|
95
|
+
Get-Content dist/v2.5.3-windows/SHA256SUMS.txt
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
After final CI builds and upload, download each public asset again and compare
|
|
99
|
+
its calculated SHA256 with that Release's checksum file and GitHub asset digest
|
|
100
|
+
when supplied. Verify PyPI wheel/sdist hashes against PyPI JSON metadata and
|
|
101
|
+
perform a fresh `pip install granttrace==2.5.3` outside the source checkout.
|
|
102
|
+
Those public-asset and PyPI installation checks remain pending until publication;
|
|
103
|
+
local candidate hashes cannot certify subsequently rebuilt assets.
|
|
104
|
+
|
|
105
|
+
## Last published release snapshot
|
|
106
|
+
|
|
107
|
+
Published snapshot: [v2.5.2](https://github.com/ysc070528/granttrace/releases/tag/v2.5.2)
|
|
108
|
+
([PyPI](https://pypi.org/project/granttrace/2.5.2/)).
|
|
109
|
+
Release source: [cab16fd](https://github.com/ysc070528/granttrace/commit/cab16fdce4a7771c8036ca4f0614e6384f7bec3d).
|
|
110
|
+
Evidence checked on 2026-10-05.
|
|
111
|
+
|
|
112
|
+
| Check | Result |
|
|
113
|
+
|---|---|
|
|
114
|
+
| Python | 3.9 / 3.12 / 3.14 passed |
|
|
115
|
+
| Full regression suite | 560 tests passed |
|
|
116
|
+
| Branch-aware coverage | 85.27% on Python 3.12; required minimum 80% |
|
|
117
|
+
| Mypy / Ruff | Passed |
|
|
118
|
+
| Business scenarios | 6/6 passed |
|
|
119
|
+
| JSON / YAML examples and fresh installation | Passed |
|
|
120
|
+
| Runtime dependency audit / CodeQL | Passed |
|
|
121
|
+
| Windows x64 portable | Built and smoke-tested |
|
|
122
|
+
| Wheel / sdist | Build and `twine check --strict` passed |
|
|
123
|
+
|
|
124
|
+
The built-in active Demo confirmed one BOLA / IDOR fixture and one Mass Assignment
|
|
125
|
+
fixture. Recovery was verified, the mock database was restored, and the local
|
|
126
|
+
server stopped. The read-only Demo sent no PATCH requests.
|
|
127
|
+
|
|
128
|
+
Evidence: [CI](https://github.com/ysc070528/granttrace/actions/runs/37286320226),
|
|
129
|
+
[CodeQL](https://github.com/ysc070528/granttrace/actions/runs/37286320202),
|
|
130
|
+
[Windows portable](https://github.com/ysc070528/granttrace/actions/runs/37286320166),
|
|
131
|
+
and [distribution build / publishing](https://github.com/ysc070528/granttrace/actions/runs/37287898227).
|
|
132
|
+
CI results are associated with the commit recorded by each workflow run.
|
|
133
|
+
|
|
134
|
+
## Safety verification
|
|
135
|
+
|
|
136
|
+
- The default audit mode is read-only.
|
|
137
|
+
- Active PATCH tests require explicit opt-in and an operation allowlist.
|
|
138
|
+
- Active tests save the original state and use independent GET readback.
|
|
139
|
+
- Restoration is attempted when needed and the observed restored state is verified.
|
|
140
|
+
- Unverified recovery or asynchronous outcomes halt subsequent writes.
|
|
141
|
+
|
|
142
|
+
See [SECURITY.md](SECURITY.md) for authorization, network boundaries and report handling.
|
|
143
|
+
|
|
144
|
+
## Known limitations
|
|
145
|
+
|
|
146
|
+
- The Windows portable executable is unsigned and may trigger SmartScreen.
|
|
147
|
+
- Automated launcher validation covers process execution and exit status; manual
|
|
148
|
+
UI behavior and every clean-machine Windows configuration are outside its scope.
|
|
149
|
+
- macOS / Linux standalone binaries are not currently distributed.
|
|
150
|
+
- Restoration does not provide transactional rollback or cover concurrent changes
|
|
151
|
+
and state outside the configured readback.
|
|
152
|
+
- Results apply to the documented fixtures and environments; they do not guarantee
|
|
153
|
+
behavior or authorization correctness for arbitrary third-party APIs.
|
|
154
|
+
|
|
155
|
+
## Reproducible checks
|
|
156
|
+
|
|
157
|
+
From a checkout with the development dependencies installed:
|
|
158
|
+
|
|
159
|
+
```bash
|
|
160
|
+
python -m unittest discover -s tests
|
|
161
|
+
python -m mypy
|
|
162
|
+
python -m ruff check .
|
|
163
|
+
python scripts/verify_business_scenarios.py
|
|
164
|
+
python scripts/verify_examples.py
|
|
165
|
+
python scripts/verify_install.py
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
For branch-aware coverage, use `python -m coverage run -m unittest discover -s tests`
|
|
169
|
+
followed by `python -m coverage report`. The configured minimum is 80%.
|
|
170
|
+
Windows build and smoke commands are documented in
|
|
171
|
+
[Windows portable](docs/windows-portable.md); release steps are in the
|
|
172
|
+
[release checklist](docs/release-checklist.md).
|