granttrace 2.6.0__tar.gz → 2.7.1__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.6.0 → granttrace-2.7.1}/CHANGELOG.md +68 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/PKG-INFO +35 -15
- {granttrace-2.6.0 → granttrace-2.7.1}/README.md +34 -14
- {granttrace-2.6.0 → granttrace-2.7.1}/README.zh-CN.md +21 -8
- {granttrace-2.6.0 → granttrace-2.7.1}/SECURITY.md +13 -2
- {granttrace-2.6.0 → granttrace-2.7.1}/VERIFICATION.md +96 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/api_sentinel.py +54 -20
- {granttrace-2.6.0 → granttrace-2.7.1}/config.schema.json +66 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/core/__init__.py +1 -1
- {granttrace-2.6.0 → granttrace-2.7.1}/core/auditor.py +485 -36
- {granttrace-2.6.0 → granttrace-2.7.1}/core/config_validation/base.py +13 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/core/config_validation/bola.py +138 -1
- {granttrace-2.6.0 → granttrace-2.7.1}/core/config_validation/identities.py +172 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/core/evidence.py +2 -1
- {granttrace-2.6.0 → granttrace-2.7.1}/core/onboarding.py +43 -1
- {granttrace-2.6.0 → granttrace-2.7.1}/core/reporter.py +54 -2
- {granttrace-2.6.0 → granttrace-2.7.1}/core/request_builder.py +53 -6
- {granttrace-2.6.0 → granttrace-2.7.1}/core/results.py +3 -2
- {granttrace-2.6.0 → granttrace-2.7.1}/core/sarif.py +7 -1
- granttrace-2.7.1/core/scan_safety.py +249 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/core/transport.py +2 -2
- {granttrace-2.6.0 → granttrace-2.7.1}/docs/advanced.md +1 -0
- granttrace-2.7.1/docs/assets/report-preview.png +0 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/docs/comparison.md +4 -3
- {granttrace-2.6.0 → granttrace-2.7.1}/docs/configuration.md +100 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/docs/windows-portable.md +16 -10
- {granttrace-2.6.0 → granttrace-2.7.1}/examples/README.md +4 -3
- {granttrace-2.6.0 → granttrace-2.7.1}/examples/sample_report.html +100 -100
- {granttrace-2.6.0 → granttrace-2.7.1}/examples/sample_result.json +103 -103
- {granttrace-2.6.0 → granttrace-2.7.1}/granttrace.egg-info/PKG-INFO +35 -15
- {granttrace-2.6.0 → granttrace-2.7.1}/granttrace.egg-info/SOURCES.txt +5 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/pyproject.toml +1 -1
- {granttrace-2.6.0 → granttrace-2.7.1}/scripts/build_windows_portable.py +12 -5
- granttrace-2.7.1/scripts/source_version.py +86 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/scripts/verify_windows_portable.py +12 -3
- granttrace-2.7.1/tests/test_cli_identity_guard.py +280 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/tests/test_cli_security_hardening.py +1 -1
- {granttrace-2.6.0 → granttrace-2.7.1}/tests/test_onboarding_cli.py +14 -3
- {granttrace-2.6.0 → granttrace-2.7.1}/tests/test_output_snapshot.py +1 -0
- granttrace-2.7.1/tests/test_release_version.py +135 -0
- granttrace-2.7.1/tests/test_v27_features.py +1161 -0
- granttrace-2.7.1/tests/test_v27_hardening.py +680 -0
- granttrace-2.6.0/core/scan_safety.py +0 -127
- granttrace-2.6.0/docs/assets/report-preview.png +0 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/CODE_OF_CONDUCT.md +0 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/CONTRIBUTING.md +0 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/LICENSE +0 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/MANIFEST.in +0 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/config.example.json +0 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/core/authorization.py +0 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/core/bopla.py +0 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/core/config_scaffold.py +0 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/core/config_validation/__init__.py +0 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/core/config_validation/readbacks.py +0 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/core/config_validation/spec_checks.py +0 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/core/config_validator.py +0 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/core/demo.py +0 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/core/demo_assets/__init__.py +0 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/core/demo_assets/demo-config.json +0 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/core/demo_assets/mock-data.json +0 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/core/demo_assets/openapi.json +0 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/core/diff.py +0 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/core/generator.py +0 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/core/models.py +0 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/core/parameters.py +0 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/core/parser.py +0 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/core/remote_refs.py +0 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/core/reproduction.py +0 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/core/transactions.py +0 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/core/yaml_safety.py +0 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/docs/assets/report-finding.png +0 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/docs/authorization-audit-hardening.md +0 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/docs/authorization-coverage-audit.md +0 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/docs/bopla-readonly.md +0 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/docs/business-scenarios.md +0 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/docs/case-studies/crapi.md +0 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/docs/case-studies/vampi.md +0 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/docs/history/release-checklist-history.md +0 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/docs/history/release-verification-history.md +0 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/docs/parameter-serialization.md +0 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/docs/pr42-independent-review.md +0 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/docs/pr42-state-authority-review.md +0 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/docs/pr43-integration-plan.md +0 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/docs/pr43-integration-review.md +0 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/docs/release-checklist.md +0 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/docs/remote-references.md +0 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/examples/crapi/no-chatbot.compose.yml +0 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/examples/crapi/prepare_config.py +0 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/examples/vampi/prepare_config.py +0 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/examples/vampi/run_vampi.py +0 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/granttrace.egg-info/dependency_links.txt +0 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/granttrace.egg-info/entry_points.txt +0 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/granttrace.egg-info/requires.txt +0 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/granttrace.egg-info/top_level.txt +0 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/mock_server/__init__.py +0 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/mock_server/server.py +0 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/openapi.json +0 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/scripts/benchmark_read_safety.py +0 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/scripts/verify_authorization_coverage.py +0 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/scripts/verify_business_scenarios.py +0 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/scripts/verify_examples.py +0 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/scripts/verify_install.py +0 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/scripts/verify_pr42_adversarial.py +0 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/scripts/verify_pr43_integration.py +0 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/setup.cfg +0 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/test_suite.py +0 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/tests/test_auditor_integration.py +0 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/tests/test_auth_cookie_references.py +0 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/tests/test_auth_header_references.py +0 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/tests/test_authorization_evidence_hardening.py +0 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/tests/test_authorization_maintenance.py +0 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/tests/test_authorization_policy_preflight.py +0 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/tests/test_bola_rejection_evidence.py +0 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/tests/test_bopla_collection_grouping.py +0 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/tests/test_bopla_integration.py +0 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/tests/test_bopla_pending_exports.py +0 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/tests/test_bopla_policy.py +0 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/tests/test_bopla_policy_counterexamples.py +0 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/tests/test_bopla_reports.py +0 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/tests/test_bopla_transport_safety.py +0 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/tests/test_business_authorization.py +0 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/tests/test_cli_config_preflight.py +0 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/tests/test_cli_report_boundaries.py +0 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/tests/test_code_review_regressions.py +0 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/tests/test_committed_examples.py +0 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/tests/test_config_readback_preflight.py +0 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/tests/test_config_scaffold.py +0 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/tests/test_config_validation.py +0 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/tests/test_credential_echo_redaction.py +0 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/tests/test_curl_report.py +0 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/tests/test_demo.py +0 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/tests/test_diff.py +0 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/tests/test_diff_hardening.py +0 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/tests/test_english_reasons.py +0 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/tests/test_evidence.py +0 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/tests/test_expanded_detection.py +0 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/tests/test_expanded_report_boundaries.py +0 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/tests/test_first_run_guidance.py +0 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/tests/test_header_cookie_array_object.py +0 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/tests/test_header_cookie_boundaries.py +0 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/tests/test_header_cookie_parameters.py +0 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/tests/test_header_cookie_transport.py +0 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/tests/test_late_private_value_redaction.py +0 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/tests/test_mass_assignment_flow.py +0 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/tests/test_merge_patch_recovery.py +0 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/tests/test_module_boundaries.py +0 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/tests/test_not_found_denial.py +0 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/tests/test_onboarding.py +0 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/tests/test_parameter_compatibility.py +0 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/tests/test_parameter_serialization.py +0 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/tests/test_parser_generator_hardening.py +0 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/tests/test_parser_remote_refs.py +0 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/tests/test_parser_replacement_auth.py +0 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/tests/test_patch_readback_strictness.py +0 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/tests/test_pr42_adversarial.py +0 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/tests/test_pr42_state_authority.py +0 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/tests/test_pr43_authorization_evidence.py +0 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/tests/test_pr43_evidence_paths.py +0 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/tests/test_pr43_put_safety.py +0 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/tests/test_problem_details_denials.py +0 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/tests/test_query_auth_parameters.py +0 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/tests/test_rate_limit_retry.py +0 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/tests/test_read_only_path_guards.py +0 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/tests/test_read_only_safety.py +0 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/tests/test_read_safety_cache.py +0 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/tests/test_remote_ref_host_validation.py +0 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/tests/test_remote_refs.py +0 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/tests/test_remote_refs_hardening.py +0 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/tests/test_remote_refs_premerge_audit.py +0 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/tests/test_remote_refs_review_hardening.py +0 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/tests/test_report_usability.py +0 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/tests/test_reproduction.py +0 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/tests/test_sarif.py +0 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/tests/test_sarif_cli.py +0 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/tests/test_scan_accounting.py +0 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/tests/test_schema_regressions.py +0 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/tests/test_small_review_items.py +0 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/tests/test_spec_config_cross_checks.py +0 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/tests/test_transaction_transport_hardening.py +0 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/tests/test_transport.py +0 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/tests/test_unconfigured_query_parameters.py +0 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/tests/test_version_identity.py +0 -0
- {granttrace-2.6.0 → granttrace-2.7.1}/tests/test_yaml_alias_expansion.py +0 -0
|
@@ -1,5 +1,73 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 2.7.1 - 2026-11-11
|
|
4
|
+
|
|
5
|
+
A maintenance release. Detectors, evidence standards and report formats are
|
|
6
|
+
unchanged from 2.7.0.
|
|
7
|
+
|
|
8
|
+
### Changed
|
|
9
|
+
|
|
10
|
+
- A real scan of a target other than a loopback address (`localhost`,
|
|
11
|
+
`127.0.0.0/8`, `::1`) now needs identities from `--config`. Without them the
|
|
12
|
+
CLI exits with code 2 before sending any request and lists the
|
|
13
|
+
`--init-config`, `--validate-config` and `--dry-run` steps. It used to fall
|
|
14
|
+
back to the built-in mock identities, placeholder credentials and resource
|
|
15
|
+
IDs meant only for the bundled mock server, and scan the target with them.
|
|
16
|
+
Look-alike hosts such as `localhost.example.com`, `127.0.0.1.nip.io` or
|
|
17
|
+
integer IPv4 spellings count as remote. A loopback scan without identities
|
|
18
|
+
still runs, with a warning that the mock identities are in use; a dry run
|
|
19
|
+
without identities stays offline and points to `--init-config` instead of a
|
|
20
|
+
scan command. `granttrace demo`, `--init-config`, `--validate-config` and
|
|
21
|
+
scans with configured identities are unchanged (#92).
|
|
22
|
+
- The console shows the scan target before a scan (`Scan target: ...`),
|
|
23
|
+
sanitized like the report's target (#92).
|
|
24
|
+
- `--help` describes GrantTrace as read-only authorization auditing, states
|
|
25
|
+
the default target, and says that active PATCH/PUT checks run only in the
|
|
26
|
+
built-in demo and stop before any write against `--target` (#92).
|
|
27
|
+
|
|
28
|
+
### Documentation
|
|
29
|
+
|
|
30
|
+
- The README no longer says GrantTrace "never writes to your API": it sends
|
|
31
|
+
GET requests and query-style POSTs you declare read-only, never PATCH, PUT
|
|
32
|
+
or DELETE, and a declared read-only POST is not proven free of side effects.
|
|
33
|
+
The demo's findings are described as planted test flaws, and the sample
|
|
34
|
+
report link explains that GitHub shows HTML source. The report screenshot is
|
|
35
|
+
retaken from the 2.7.0 demo (#92).
|
|
36
|
+
- `SECURITY.md` and the command-line reference describe the new requirement
|
|
37
|
+
for a non-loopback target (#92).
|
|
38
|
+
|
|
39
|
+
## 2.7.0 - 2026-11-11
|
|
40
|
+
|
|
41
|
+
### Added
|
|
42
|
+
|
|
43
|
+
- BOLA on query-style POST operations. A POST is sent only when its `bola`
|
|
44
|
+
policy declares `read_only: true` and gives the request body; its path,
|
|
45
|
+
operationId or summary must name a read action (search, query, lookup...)
|
|
46
|
+
and none of its metadata or concrete path may name a mutation. `body` is
|
|
47
|
+
sent unchanged by every identity; `identity_bodies` gives the Owner body
|
|
48
|
+
(repeated by the Visitor's cross request and Anonymous) and an optional
|
|
49
|
+
`visitor_self` body. Anything else is skipped or inconclusive with zero
|
|
50
|
+
requests, and a rate-limited POST is never retried.
|
|
51
|
+
- Sensitive-field leads (`detect_sensitive_exposure`, OWASP API3): unmasked
|
|
52
|
+
sensitive-named Owner values that reach the Visitor at the same JSON path.
|
|
53
|
+
`CONFIRMED` only with an explicit `deny` policy, a confirmed object-level
|
|
54
|
+
decision on the same observations and a value that differs from the
|
|
55
|
+
Visitor's own record; otherwise `SUSPICIOUS`. Values are never reported,
|
|
56
|
+
and the analysis is bounded on untrusted responses.
|
|
57
|
+
- Role matrix (`identities.roles`): for operations with a `required_role`,
|
|
58
|
+
one request per configured role, decided with the BFLA evidence standard
|
|
59
|
+
(valid privileged baseline, clean Anonymous denial, configured protected
|
|
60
|
+
data in the role's valid response). Shown in the HTML report and the JSON
|
|
61
|
+
`rbac_matrix`; confirmed violations are exported to SARIF as `GT-BFLA-001`,
|
|
62
|
+
confirmed sensitive-field findings as `GT-BOPLA-001`.
|
|
63
|
+
|
|
64
|
+
### Changed
|
|
65
|
+
|
|
66
|
+
- The Windows portable build, its verifier, its workflow and the packaged
|
|
67
|
+
README and launcher read the version from `pyproject.toml` and
|
|
68
|
+
`core/__init__.py` (checked to agree) instead of repeating it. A test fails
|
|
69
|
+
on any drift.
|
|
70
|
+
|
|
3
71
|
## 2.6.0 - 2026-11-09
|
|
4
72
|
|
|
5
73
|
### Added
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: granttrace
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.7.1
|
|
4
4
|
Summary: Evidence-driven, read-only authorization testing for OpenAPI APIs: BOLA/IDOR, broken authentication, BFLA and property-level checks
|
|
5
5
|
Author: GrantTrace contributors
|
|
6
6
|
License-Expression: Apache-2.0
|
|
@@ -39,8 +39,9 @@ Dynamic: license-file
|
|
|
39
39
|
GrantTrace reads your OpenAPI specification, requests the same resources as an
|
|
40
40
|
**Owner**, a **Visitor** and an **Anonymous** identity, and compares what each
|
|
41
41
|
of them gets back. It reports BOLA / IDOR and related authorization flaws only
|
|
42
|
-
when the responses prove them
|
|
43
|
-
|
|
42
|
+
when the responses prove them and plans every request offline first. Against
|
|
43
|
+
your API it sends GET requests, plus query-style POSTs only where you declare
|
|
44
|
+
them read-only; it never sends PATCH, PUT or DELETE.
|
|
44
45
|
|
|
45
46
|
<img src="https://raw.githubusercontent.com/ysc070528/granttrace/main/docs/assets/report-preview.png" alt="GrantTrace HTML report: summary, coverage and per-endpoint results" width="900">
|
|
46
47
|
|
|
@@ -49,10 +50,12 @@ python -m pip install granttrace
|
|
|
49
50
|
granttrace demo # a disposable local API; no configuration or credentials needed
|
|
50
51
|
```
|
|
51
52
|
|
|
52
|
-
The demo starts a throwaway API on `127.0.0.1
|
|
53
|
-
assignment flaw it
|
|
54
|
-
JSON report.
|
|
55
|
-
|
|
53
|
+
The demo starts a throwaway API on `127.0.0.1` with fictional data, finds the
|
|
54
|
+
BOLA and the mass assignment flaw planted in it, restores its data, stops, and
|
|
55
|
+
writes an HTML and a JSON report. These are the demo's own test flaws, not
|
|
56
|
+
results from a real API. A [sample report](https://github.com/ysc070528/granttrace/blob/main/examples/sample_report.html)
|
|
57
|
+
from the demo is in the repository; GitHub shows its HTML source, so download
|
|
58
|
+
the raw file and open it in a browser.
|
|
56
59
|
|
|
57
60
|
## Why GrantTrace
|
|
58
61
|
|
|
@@ -64,6 +67,18 @@ is in the repository.
|
|
|
64
67
|
- **Safe by default.** Scans are read-only. GET operations whose paths,
|
|
65
68
|
identifiers or descriptions suggest side effects are skipped before any
|
|
66
69
|
request, and writes against external targets are refused.
|
|
70
|
+
- **Read-only POST, only when you vouch for it.** A query-style POST (search,
|
|
71
|
+
lookup, query...) is compared across identities only after you declare
|
|
72
|
+
`read_only: true` and give the request body. Its path, operationId or summary
|
|
73
|
+
must name a read action and must not name a mutation; otherwise nothing is
|
|
74
|
+
sent. These checks reduce risk but cannot prove a POST has no side effects.
|
|
75
|
+
- **Sensitive-field leads.** With `detect_sensitive_exposure`, unmasked
|
|
76
|
+
sensitive-looking Owner fields (phone, salary, credentials...) that reach the
|
|
77
|
+
Visitor are reported as leads. They are confirmed only on top of a confirmed
|
|
78
|
+
object-level finding and never from a field name alone.
|
|
79
|
+
- **Role matrix.** Optional `identities.roles` are probed on operations with a
|
|
80
|
+
`required_role`. A lower role is a violation only when it receives the
|
|
81
|
+
privileged baseline's configured protected data, not merely an HTTP 200.
|
|
67
82
|
- **Plan before you send.** `--init-config` drafts a configuration and a review
|
|
68
83
|
checklist from the specification, `--validate-config` checks it offline, and
|
|
69
84
|
`--dry-run` shows what would be requested while sending nothing.
|
|
@@ -82,8 +97,10 @@ is in the repository.
|
|
|
82
97
|
| BOLA / IDOR | CWE-639 | Read-only, as Owner, Visitor and Anonymous | Two test accounts and a resource each of them owns |
|
|
83
98
|
| Broken Authentication | CWE-306 | Read-only, on operations the specification protects | `private_data_paths`: Owner values Anonymous must not see |
|
|
84
99
|
| Broken Function Level Authorization | CWE-285 | Read-only | The required role and each identity's role |
|
|
100
|
+
| Role matrix (RBAC) | CWE-285 | Read-only, one request per configured role | `identities.roles`, `required_role` and `private_data_paths` |
|
|
101
|
+
| BOLA on query-style POST | CWE-639 | Declared `read_only: true` POST with a read action in its name | The request `body` (or `identity_bodies`) |
|
|
85
102
|
| Private data in collections | CWE-639 | Read-only, on list endpoints | `private_data_paths` |
|
|
86
|
-
| Property-level authorization (BOPLA) | CWE-200 | Read-only | Per-field rules in `bopla` |
|
|
103
|
+
| Property-level authorization (BOPLA) | CWE-200 | Read-only | Per-field rules in `bopla`; `detect_sensitive_exposure` adds heuristic leads |
|
|
87
104
|
| Mass Assignment | CWE-915 | **Built-in demo only** | – |
|
|
88
105
|
|
|
89
106
|
Mass assignment testing writes to a resource, so GrantTrace only does it when it
|
|
@@ -93,8 +110,8 @@ before any write; the built-in demo, which owns its data, shows the complete
|
|
|
93
110
|
flow with independent readback and verified rollback.
|
|
94
111
|
|
|
95
112
|
**Not supported yet:** GraphQL and gRPC; OAuth, OIDC or mTLS login flows
|
|
96
|
-
(configure tokens or headers yourself); API keys in the query string; POST
|
|
97
|
-
DELETE tests; writes against external APIs.
|
|
113
|
+
(configure tokens or headers yourself); API keys in the query string; POST
|
|
114
|
+
other than declared read-only queries; DELETE tests; writes against external APIs.
|
|
98
115
|
|
|
99
116
|
## Install
|
|
100
117
|
|
|
@@ -112,7 +129,10 @@ what each release contains.
|
|
|
112
129
|
## Audit your own API
|
|
113
130
|
|
|
114
131
|
Use a test environment you are authorized to test, two test accounts, and
|
|
115
|
-
resources each of them owns. Steps 1 to 4 only touch local files.
|
|
132
|
+
resources each of them owns. Steps 1 to 4 only touch local files. Step 5 needs
|
|
133
|
+
the configuration's identities: without them GrantTrace refuses to scan any
|
|
134
|
+
target other than a loopback address (`localhost`, `127.0.0.1`, `::1`) and
|
|
135
|
+
sends nothing.
|
|
116
136
|
|
|
117
137
|
```bash
|
|
118
138
|
# 1. Draft a configuration and a review checklist from the specification
|
|
@@ -154,10 +174,10 @@ evidence are in English.
|
|
|
154
174
|
|
|
155
175
|
## Safety
|
|
156
176
|
|
|
157
|
-
Only test systems you are explicitly authorized to test. GrantTrace
|
|
158
|
-
|
|
159
|
-
rules cannot prove that
|
|
160
|
-
before a scan. Report vulnerabilities in GrantTrace itself privately, as
|
|
177
|
+
Only test systems you are explicitly authorized to test. GrantTrace sends no
|
|
178
|
+
PATCH, PUT or DELETE to your API and refuses writes to external targets, but
|
|
179
|
+
static rules cannot prove that a GET, or a POST you declare read-only, has no
|
|
180
|
+
side effects, so review the dry-run plan before a scan. Report vulnerabilities in GrantTrace itself privately, as
|
|
161
181
|
described in [SECURITY.md](https://github.com/ysc070528/granttrace/blob/main/SECURITY.md).
|
|
162
182
|
|
|
163
183
|
## Documentation
|
|
@@ -12,8 +12,9 @@
|
|
|
12
12
|
GrantTrace reads your OpenAPI specification, requests the same resources as an
|
|
13
13
|
**Owner**, a **Visitor** and an **Anonymous** identity, and compares what each
|
|
14
14
|
of them gets back. It reports BOLA / IDOR and related authorization flaws only
|
|
15
|
-
when the responses prove them
|
|
16
|
-
|
|
15
|
+
when the responses prove them and plans every request offline first. Against
|
|
16
|
+
your API it sends GET requests, plus query-style POSTs only where you declare
|
|
17
|
+
them read-only; it never sends PATCH, PUT or DELETE.
|
|
17
18
|
|
|
18
19
|
<img src="https://raw.githubusercontent.com/ysc070528/granttrace/main/docs/assets/report-preview.png" alt="GrantTrace HTML report: summary, coverage and per-endpoint results" width="900">
|
|
19
20
|
|
|
@@ -22,10 +23,12 @@ python -m pip install granttrace
|
|
|
22
23
|
granttrace demo # a disposable local API; no configuration or credentials needed
|
|
23
24
|
```
|
|
24
25
|
|
|
25
|
-
The demo starts a throwaway API on `127.0.0.1
|
|
26
|
-
assignment flaw it
|
|
27
|
-
JSON report.
|
|
28
|
-
|
|
26
|
+
The demo starts a throwaway API on `127.0.0.1` with fictional data, finds the
|
|
27
|
+
BOLA and the mass assignment flaw planted in it, restores its data, stops, and
|
|
28
|
+
writes an HTML and a JSON report. These are the demo's own test flaws, not
|
|
29
|
+
results from a real API. A [sample report](https://github.com/ysc070528/granttrace/blob/main/examples/sample_report.html)
|
|
30
|
+
from the demo is in the repository; GitHub shows its HTML source, so download
|
|
31
|
+
the raw file and open it in a browser.
|
|
29
32
|
|
|
30
33
|
## Why GrantTrace
|
|
31
34
|
|
|
@@ -37,6 +40,18 @@ is in the repository.
|
|
|
37
40
|
- **Safe by default.** Scans are read-only. GET operations whose paths,
|
|
38
41
|
identifiers or descriptions suggest side effects are skipped before any
|
|
39
42
|
request, and writes against external targets are refused.
|
|
43
|
+
- **Read-only POST, only when you vouch for it.** A query-style POST (search,
|
|
44
|
+
lookup, query...) is compared across identities only after you declare
|
|
45
|
+
`read_only: true` and give the request body. Its path, operationId or summary
|
|
46
|
+
must name a read action and must not name a mutation; otherwise nothing is
|
|
47
|
+
sent. These checks reduce risk but cannot prove a POST has no side effects.
|
|
48
|
+
- **Sensitive-field leads.** With `detect_sensitive_exposure`, unmasked
|
|
49
|
+
sensitive-looking Owner fields (phone, salary, credentials...) that reach the
|
|
50
|
+
Visitor are reported as leads. They are confirmed only on top of a confirmed
|
|
51
|
+
object-level finding and never from a field name alone.
|
|
52
|
+
- **Role matrix.** Optional `identities.roles` are probed on operations with a
|
|
53
|
+
`required_role`. A lower role is a violation only when it receives the
|
|
54
|
+
privileged baseline's configured protected data, not merely an HTTP 200.
|
|
40
55
|
- **Plan before you send.** `--init-config` drafts a configuration and a review
|
|
41
56
|
checklist from the specification, `--validate-config` checks it offline, and
|
|
42
57
|
`--dry-run` shows what would be requested while sending nothing.
|
|
@@ -55,8 +70,10 @@ is in the repository.
|
|
|
55
70
|
| BOLA / IDOR | CWE-639 | Read-only, as Owner, Visitor and Anonymous | Two test accounts and a resource each of them owns |
|
|
56
71
|
| Broken Authentication | CWE-306 | Read-only, on operations the specification protects | `private_data_paths`: Owner values Anonymous must not see |
|
|
57
72
|
| Broken Function Level Authorization | CWE-285 | Read-only | The required role and each identity's role |
|
|
73
|
+
| Role matrix (RBAC) | CWE-285 | Read-only, one request per configured role | `identities.roles`, `required_role` and `private_data_paths` |
|
|
74
|
+
| BOLA on query-style POST | CWE-639 | Declared `read_only: true` POST with a read action in its name | The request `body` (or `identity_bodies`) |
|
|
58
75
|
| Private data in collections | CWE-639 | Read-only, on list endpoints | `private_data_paths` |
|
|
59
|
-
| Property-level authorization (BOPLA) | CWE-200 | Read-only | Per-field rules in `bopla` |
|
|
76
|
+
| Property-level authorization (BOPLA) | CWE-200 | Read-only | Per-field rules in `bopla`; `detect_sensitive_exposure` adds heuristic leads |
|
|
60
77
|
| Mass Assignment | CWE-915 | **Built-in demo only** | – |
|
|
61
78
|
|
|
62
79
|
Mass assignment testing writes to a resource, so GrantTrace only does it when it
|
|
@@ -66,8 +83,8 @@ before any write; the built-in demo, which owns its data, shows the complete
|
|
|
66
83
|
flow with independent readback and verified rollback.
|
|
67
84
|
|
|
68
85
|
**Not supported yet:** GraphQL and gRPC; OAuth, OIDC or mTLS login flows
|
|
69
|
-
(configure tokens or headers yourself); API keys in the query string; POST
|
|
70
|
-
DELETE tests; writes against external APIs.
|
|
86
|
+
(configure tokens or headers yourself); API keys in the query string; POST
|
|
87
|
+
other than declared read-only queries; DELETE tests; writes against external APIs.
|
|
71
88
|
|
|
72
89
|
## Install
|
|
73
90
|
|
|
@@ -85,7 +102,10 @@ what each release contains.
|
|
|
85
102
|
## Audit your own API
|
|
86
103
|
|
|
87
104
|
Use a test environment you are authorized to test, two test accounts, and
|
|
88
|
-
resources each of them owns. Steps 1 to 4 only touch local files.
|
|
105
|
+
resources each of them owns. Steps 1 to 4 only touch local files. Step 5 needs
|
|
106
|
+
the configuration's identities: without them GrantTrace refuses to scan any
|
|
107
|
+
target other than a loopback address (`localhost`, `127.0.0.1`, `::1`) and
|
|
108
|
+
sends nothing.
|
|
89
109
|
|
|
90
110
|
```bash
|
|
91
111
|
# 1. Draft a configuration and a review checklist from the specification
|
|
@@ -127,10 +147,10 @@ evidence are in English.
|
|
|
127
147
|
|
|
128
148
|
## Safety
|
|
129
149
|
|
|
130
|
-
Only test systems you are explicitly authorized to test. GrantTrace
|
|
131
|
-
|
|
132
|
-
rules cannot prove that
|
|
133
|
-
before a scan. Report vulnerabilities in GrantTrace itself privately, as
|
|
150
|
+
Only test systems you are explicitly authorized to test. GrantTrace sends no
|
|
151
|
+
PATCH, PUT or DELETE to your API and refuses writes to external targets, but
|
|
152
|
+
static rules cannot prove that a GET, or a POST you declare read-only, has no
|
|
153
|
+
side effects, so review the dry-run plan before a scan. Report vulnerabilities in GrantTrace itself privately, as
|
|
134
154
|
described in [SECURITY.md](https://github.com/ysc070528/granttrace/blob/main/SECURITY.md).
|
|
135
155
|
|
|
136
156
|
## Documentation
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
**证据驱动、默认只读的 OpenAPI 授权测试工具。**
|
|
11
11
|
|
|
12
12
|
GrantTrace 读取 OpenAPI 规范,分别以 **Owner**、**Visitor** 和 **Anonymous** 三种身份请求同一资源,
|
|
13
|
-
比较各自拿到的结果。只有响应本身能证明问题时才报告 BOLA / IDOR
|
|
14
|
-
|
|
13
|
+
比较各自拿到的结果。只有响应本身能证明问题时才报告 BOLA / IDOR 等授权缺陷;所有请求先离线生成计划。
|
|
14
|
+
对你的 API 只发送 GET 请求,以及你声明为只读的查询类 POST;从不发送 PATCH、PUT 或 DELETE。
|
|
15
15
|
|
|
16
16
|
<img src="https://raw.githubusercontent.com/ysc070528/granttrace/main/docs/assets/report-preview.png" alt="GrantTrace HTML 报告:汇总、覆盖率和逐个端点的结果" width="900">
|
|
17
17
|
|
|
@@ -20,8 +20,10 @@ python -m pip install granttrace
|
|
|
20
20
|
granttrace demo # 内置可丢弃的本机 API,无需配置或凭据
|
|
21
21
|
```
|
|
22
22
|
|
|
23
|
-
Demo 在 `127.0.0.1`
|
|
24
|
-
|
|
23
|
+
Demo 在 `127.0.0.1` 启动一个使用虚构数据的临时 API,找出其中预置的 BOLA 和 Mass Assignment 缺陷,
|
|
24
|
+
恢复数据后关闭,并生成 HTML 和 JSON 报告。这些是 Demo 自带的测试缺陷,不是真实 API 的检测结果。
|
|
25
|
+
仓库中有一份 Demo 生成的[示例报告](https://github.com/ysc070528/granttrace/blob/main/examples/sample_report.html);
|
|
26
|
+
GitHub 只显示其 HTML 源码,请下载原始文件后用浏览器打开。
|
|
25
27
|
|
|
26
28
|
## 为什么用 GrantTrace
|
|
27
29
|
|
|
@@ -30,6 +32,13 @@ Demo 在 `127.0.0.1` 启动一个临时 API,找出其中的 BOLA 和 Mass Assi
|
|
|
30
32
|
证据不足时判为 `SUSPICIOUS` 或 `INCONCLUSIVE`,不会算作漏洞。
|
|
31
33
|
- **默认安全。** 扫描只读。路径、operationId 或描述带有副作用语义的 GET 在请求前跳过,
|
|
32
34
|
对外部目标的写入一律拒绝。
|
|
35
|
+
- **只读 POST 需由你声明。** 查询类 POST(search、lookup、query 等)只有在你声明 `read_only: true`
|
|
36
|
+
并提供请求体后才会跨身份比较;其路径、operationId 或 summary 必须表明读取动作且不得表明修改,
|
|
37
|
+
否则不发送任何请求。这些检查只能降低风险,不能证明 POST 没有副作用。
|
|
38
|
+
- **敏感字段线索。** 开启 `detect_sensitive_exposure` 后,Visitor 收到的未脱敏、名称敏感的 Owner 字段
|
|
39
|
+
(电话、薪资、凭据等)作为线索报告;只有在对象级越权已确认时才会确认,绝不仅凭字段名确认。
|
|
40
|
+
- **角色矩阵。** 可选的 `identities.roles` 只在配置了 `required_role` 的操作上探测。低权限角色只有拿到
|
|
41
|
+
特权基线中配置的受保护数据才算违规,单纯的 HTTP 200 不算。
|
|
33
42
|
- **先计划,再发送。** `--init-config` 根据规范生成配置草稿和核对清单,`--validate-config`
|
|
34
43
|
离线校验,`--dry-run` 列出将要发送的请求,但不发送任何请求。
|
|
35
44
|
- **报告可直接用于修复。** 每条结果说明比较了什么;每个确认漏洞附修复方向、复验步骤、
|
|
@@ -42,10 +51,12 @@ Demo 在 `127.0.0.1` 启动一个临时 API,找出其中的 BOLA 和 Mass Assi
|
|
|
42
51
|
| 检查 | CWE | 运行方式 | 需要配置 |
|
|
43
52
|
|---|---|---|---|
|
|
44
53
|
| BOLA / IDOR | CWE-639 | 只读,以 Owner、Visitor、Anonymous 请求 | 两个测试账号及各自拥有的资源 |
|
|
54
|
+
| 查询类 POST 的 BOLA | CWE-639 | 声明 `read_only: true` 且名称表明读取动作的 POST | 请求体 `body`(或 `identity_bodies`) |
|
|
45
55
|
| Broken Authentication | CWE-306 | 只读,针对规范要求认证的操作 | `private_data_paths`:匿名不应看到的 Owner 数据 |
|
|
46
56
|
| Broken Function Level Authorization | CWE-285 | 只读 | 所需角色及各身份的角色 |
|
|
57
|
+
| 角色矩阵(RBAC) | CWE-285 | 只读,每个配置角色一次请求 | `identities.roles`、`required_role` 与 `private_data_paths` |
|
|
47
58
|
| 集合接口私有数据泄露 | CWE-639 | 只读,针对列表接口 | `private_data_paths` |
|
|
48
|
-
| 字段级授权(BOPLA) | CWE-200 | 只读 | `bopla`
|
|
59
|
+
| 字段级授权(BOPLA) | CWE-200 | 只读 | `bopla` 中按字段的规则;`detect_sensitive_exposure` 提供启发式线索 |
|
|
49
60
|
| Mass Assignment | CWE-915 | **仅内置 demo** | – |
|
|
50
61
|
|
|
51
62
|
Mass Assignment 测试需要写入资源,GrantTrace 只在能核验资源实际状态并恢复时才执行。
|
|
@@ -53,7 +64,7 @@ Mass Assignment 测试需要写入资源,GrantTrace 只在能核验资源实
|
|
|
53
64
|
自己持有数据的内置 demo 展示完整流程,包括独立读回和已核验的恢复。
|
|
54
65
|
|
|
55
66
|
**暂不支持:** GraphQL 和 gRPC;OAuth、OIDC、mTLS 登录流程(请自行配置 token 或 header);
|
|
56
|
-
查询字符串中的 API key;
|
|
67
|
+
查询字符串中的 API key;声明为只读的查询以外的 POST;DELETE 测试;对外部 API 的写入。
|
|
57
68
|
|
|
58
69
|
## 安装
|
|
59
70
|
|
|
@@ -68,6 +79,8 @@ Mass Assignment 测试需要写入资源,GrantTrace 只在能核验资源实
|
|
|
68
79
|
## 审计自己的 API
|
|
69
80
|
|
|
70
81
|
请使用获得授权的测试环境、两个测试账号,以及它们各自拥有的资源。第 1 到 4 步只处理本地文件。
|
|
82
|
+
第 5 步需要配置中的 identities:没有时,GrantTrace 拒绝扫描回环地址(`localhost`、`127.0.0.1`、`::1`)
|
|
83
|
+
以外的任何目标,且不发送任何请求。
|
|
71
84
|
|
|
72
85
|
```bash
|
|
73
86
|
# 1. 根据规范生成配置草稿和核对清单
|
|
@@ -104,8 +117,8 @@ HTML 报告的界面文字目前为中文,检查理由和证据为英文。
|
|
|
104
117
|
|
|
105
118
|
## 安全
|
|
106
119
|
|
|
107
|
-
只测试明确获得授权的系统。GrantTrace
|
|
108
|
-
|
|
120
|
+
只测试明确获得授权的系统。GrantTrace 不会向你的 API 发送 PATCH、PUT 或 DELETE,并拒绝对外部目标写入;
|
|
121
|
+
但静态规则无法证明 GET 或你声明为只读的 POST 没有副作用,扫描前请核对 dry-run 计划。
|
|
109
122
|
GrantTrace 自身的漏洞请按 [SECURITY.md](https://github.com/ysc070528/granttrace/blob/main/SECURITY.md) 私下报告。
|
|
110
123
|
|
|
111
124
|
## 文档
|
|
@@ -3,14 +3,25 @@
|
|
|
3
3
|
GrantTrace sends requests to the target named on the command line. Use it
|
|
4
4
|
only against systems for which you have explicit authorization.
|
|
5
5
|
|
|
6
|
+
A scan of a target other than a loopback address (`localhost`, `127.0.0.0/8`,
|
|
7
|
+
`::1`) needs identities from `--config`. Without them the CLI refuses before
|
|
8
|
+
sending any request, instead of falling back to the built-in mock identities,
|
|
9
|
+
which exist only for the bundled mock server.
|
|
10
|
+
|
|
6
11
|
The default mode does not execute mutation checks. Since 2.6.0, write checks
|
|
7
12
|
against a target named on the command line also stop before any write: GrantTrace
|
|
8
13
|
cannot independently verify an external API's authoritative resource state, so
|
|
9
14
|
even with `--allow-write-tests`, an explicit write allowlist, readback mappings
|
|
10
15
|
and `consistency: "strong"`, allowlisted PATCH and PUT checks are reported as
|
|
11
16
|
`INCONCLUSIVE` (`unverified_state_authority`) and send nothing. The built-in demo,
|
|
12
|
-
which owns its data, is the only place the full flow runs.
|
|
13
|
-
|
|
17
|
+
which owns its data, is the only place the full flow runs. DELETE is never sent.
|
|
18
|
+
A POST is sent only for the read-only BOLA comparison, and only when the
|
|
19
|
+
operation's policy declares `read_only: true` with an explicit request body, its
|
|
20
|
+
path, operationId or summary names a read action, and neither its metadata nor
|
|
21
|
+
its concrete path names a mutation. These checks refuse obviously
|
|
22
|
+
state-changing operations but cannot prove that a POST has no side effects:
|
|
23
|
+
declare `read_only` only for operations you have confirmed change nothing. A
|
|
24
|
+
POST is never retried.
|
|
14
25
|
|
|
15
26
|
Where the flow does run, every operation must be in the explicit write
|
|
16
27
|
allowlist, and active checks require a JSON request schema plus a configured GET
|
|
@@ -3,6 +3,102 @@
|
|
|
3
3
|
Detailed historical release verification records are archived in
|
|
4
4
|
[release verification history](docs/history/release-verification-history.md).
|
|
5
5
|
|
|
6
|
+
## v2.7.1 pre-release acceptance - 2026-11-11
|
|
7
|
+
|
|
8
|
+
Status: **accepted for release; v2.7.1 is not published.** Release candidate:
|
|
9
|
+
commit `37eef7b` (head of PR #93: main `61f7e05`, the merge of #92, plus the
|
|
10
|
+
version, the changelog date, the publishing workflow's manual choice, the
|
|
11
|
+
regenerated examples and release-specific documentation); the commit after it
|
|
12
|
+
adds only this record. PyPI's latest is 2.7.0; there is no `v2.7.1` tag or
|
|
13
|
+
Release.
|
|
14
|
+
|
|
15
|
+
Environment: Linux x86_64 container; CPython **3.13.18** for coverage, acceptance
|
|
16
|
+
scripts and the build, plus CPython **3.9.25**, **3.12.3** and **3.14.6**; PyYAML
|
|
17
|
+
**6.0.3**, pytest **9.2.0** (**8.4.2** on 3.9), coverage **7.17.2** (**7.10.7** on
|
|
18
|
+
3.9), Ruff **0.17.4**, Mypy **2.4.1**, build **1.6.1**, Twine **7.0.0**, setuptools
|
|
19
|
+
**84.2.1**, wheel **0.48.0**, pip-audit **2.10.1**. The Windows package was built
|
|
20
|
+
and checked by the GitHub-hosted `windows-2025` runner; no Windows host was used
|
|
21
|
+
locally.
|
|
22
|
+
|
|
23
|
+
| Check | Result |
|
|
24
|
+
|---|---|
|
|
25
|
+
| CI on main after #92 (`61f7e05`) | GrantTrace CI [run 42977306638](https://github.com/ysc070528/granttrace/actions/runs/42977306638), Windows x64 portable [run 42977306654](https://github.com/ysc070528/granttrace/actions/runs/42977306654) and CodeQL [run 42977306497](https://github.com/ysc070528/granttrace/actions/runs/42977306497): all passed |
|
|
26
|
+
| CI on the candidate (`37eef7b`) | 9 of 9 passed: Ruff, Mypy, tests on 3.9 / 3.12 / 3.14 and runtime dependency audit ([run 42978755482](https://github.com/ysc070528/granttrace/actions/runs/42978755482)), Windows x64 portable ([run 42978755524](https://github.com/ysc070528/granttrace/actions/runs/42978755524)), Analyze Python ([run 42978755518](https://github.com/ysc070528/granttrace/actions/runs/42978755518)) and CodeQL |
|
|
27
|
+
| Full regression suite | 1335 passed and 2478 subtests passed on CPython 3.12.3, 3.13.18 and 3.14.6; 1335 passed on 3.9.25; full unittest (1335 tests) passed on all four |
|
|
28
|
+
| Branch-aware coverage | 90.03% combined on 3.13.18 (statements 7324 / 7964, branches 3492 / 4050 = 86.22%); 89.94% on 3.9.25, 90.03% on 3.12.3 and 90.04% on 3.14.6; required minimum 80% |
|
|
29
|
+
| Mypy / Ruff | No Mypy issues in 32 source files; Ruff passed |
|
|
30
|
+
| Acceptance scripts | On each of the four interpreters: PR42 adversarial (28 tests); PR43 integration (89 tests, source `37eef7b`, clean tree); authorization coverage, authoritative and generic HTTP; business scenarios 6 / 6 (0 false positives, false negatives or inconclusive results); JSON / YAML examples (read-only exit 0, active exit 2 with external PATCH stopped before any write, 60% conclusive coverage, the mock database restored) |
|
|
31
|
+
| Runtime dependency audit | `pip-audit --strict` on the candidate: PyYAML 6.0.3, no known vulnerabilities |
|
|
32
|
+
| Generated examples | Regenerated with `scripts/verify_examples.py --update-examples`; they declare 2.7.1. Against the 2.7.0 files only the version, generation time, loopback port, result order and the User-Agent's version differ: 5 operations, 2 confirmed, 1 public and 2 secure results, 100% conclusive coverage, 21 requests |
|
|
33
|
+
| Wheel / sdist | Isolated `python -m build` from `git archive` of `37eef7b`; `twine check --strict` passed for both. Wheel: 43 files, no tests, caches or local configurations. Sdist: 196 entries (2.7.0: 195); against the 2.7.0 sdist built the same way, the only new file is `tests/test_cli_identity_guard.py` and none is missing. Metadata: `Version: 2.7.1`, the unchanged `Summary`, `Requires-Python: >=3.9`, `Requires-Dist: PyYAML>=6.0`, `License-Expression: Apache-2.0` |
|
|
34
|
+
| Clean installations | The wheel in new virtual environments on CPython 3.9.25, 3.13.18 and 3.14.6, and the sdist on 3.13.18, each outside the checkout: `granttrace --version` prints `GrantTrace 2.7.1` and `core` loads from `site-packages`; `granttrace demo` exits 0 with BOLA and mass assignment confirmed, rollback verified, the database restored and the server stopped; a scan of `https://api.example.test` without `--config` exits 2 with the refusal and writes no report. `scripts/verify_install.py --wheel` passed on the built wheel with 3.9.25 and 3.13.18: versions consistent, 0 PATCH in read-only and external active scans (the external active scan is blocked without state authority), 0 requests for the offline plan. Run from inside a virtual environment of uv's standalone CPython 3.9, the script's own venv creation fails before GrantTrace runs (the nested venv finds no standard library); it passed on 3.12.3, 3.13.18 and 3.14.6 that way |
|
|
35
|
+
| Version consistency | `pyproject.toml`, `core.__version__`, CLI, HTML and JSON reports and the HTTP User-Agent say 2.7.1. The Windows build and verification scripts, the Windows workflow's ZIP and artifact names (`GrantTrace-v2.7.1-Windows-x64`) and the packaged README and launcher derive it through `scripts/source_version.py`; the publishing workflow's manual choices include v2.7.1 |
|
|
36
|
+
| Windows x64 portable | Built from `37eef7b` (clean tree) in run 42978755524 on Windows Server 2025 with Python 3.14.5 and PyInstaller 6.22.3: `GrantTrace-v2.7.1-Windows-x64.zip`, 10,750,494 bytes, SHA256 `e69a28f35b2524ca8d53fa5dd8be43c34108bd2ce44667ced78711ed7691180b`. `scripts/verify_windows_portable.py` passed: extraction to paths with spaces and Chinese characters outside the checkout, no Python on the child PATH, `--version` and `--help`, active and read-only demos, an offline YAML plan with 0 requests, `Start-Demo.bat`, the loopback port closed and no package process left. The ZIP was not downloaded and rehashed here, and no one double-clicked it on a clean Windows machine |
|
|
37
|
+
| 2.7.1 changes | The refusal of a non-loopback scan without identities, the loopback parsing, the mock-identity warning and the dry-run guidance are covered by `tests/test_cli_identity_guard.py` (13 tests, 76 subtests), including a real scan of the loopback mock and the demo through `main()`. Detectors, evidence standards and report formats are unchanged: the JSON and HTML output snapshots are identical to 2.7.0, and the console snapshot gains only the `Scan target` line. VAmPI and crAPI were not re-run for this candidate |
|
|
38
|
+
| Secrets | A pattern scan of all 195 tracked files found no keys, tokens or JWTs; the only match is a dummy private-key marker in a redaction test. GitHub secret scanning is not enabled for the repository |
|
|
39
|
+
| Documentation | 27 Markdown files, 136 relative and same-repository links and anchors: 0 problems. `SECURITY.md`, the READMEs and the command-line reference describe the new requirement (#92); release-specific pages updated in #93 |
|
|
40
|
+
|
|
41
|
+
Local candidate hashes, built from `37eef7b` in the container:
|
|
42
|
+
|
|
43
|
+
```text
|
|
44
|
+
ca904dc0745f3d5c87d3293f8179564a3be545d56d3867812022e78d84a8a198 granttrace-2.7.1-py3-none-any.whl
|
|
45
|
+
78b09e95f05c823baa692c01e307c9145fc1e8cf20081ca3cd496659b2189155 granttrace-2.7.1.tar.gz
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
The publishing workflow builds the uploaded distributions from the tag. The
|
|
49
|
+
Release's Windows ZIP and `SHA256SUMS.txt` come from the Windows workflow run on
|
|
50
|
+
the release commit itself; their hashes differ from the builds above because the
|
|
51
|
+
build records its source commit.
|
|
52
|
+
|
|
53
|
+
Still to do: CI on the release commit, then the tag, the GitHub Release with the
|
|
54
|
+
Windows assets, PyPI publishing and the post-release checks in the
|
|
55
|
+
[release checklist](docs/release-checklist.md), including a clean Windows machine.
|
|
56
|
+
|
|
57
|
+
## v2.7.0 pre-release acceptance - 2026-11-11
|
|
58
|
+
|
|
59
|
+
Status: **accepted for release; v2.7.0 is not published.** Release candidate:
|
|
60
|
+
commit `750a801` (head of PR #90: main `9fc560c`, the merge of #84, plus the
|
|
61
|
+
release date, the publishing workflow's manual choice and release-specific
|
|
62
|
+
documentation); the commit after it adds only this record. PyPI's latest is
|
|
63
|
+
2.6.0; there is no `v2.7.0` tag or Release.
|
|
64
|
+
|
|
65
|
+
Environment: Linux x86_64 container; CPython **3.13.18** for coverage, linting,
|
|
66
|
+
acceptance scripts and the build, plus CPython **3.9.25** and **3.14.6**; PyYAML
|
|
67
|
+
**6.0.3**, pytest **9.2.0** (**8.4.2** on 3.9), coverage **7.17.2**, Ruff
|
|
68
|
+
**0.17.4**, Mypy **2.4.1**, build **1.6.1**, Twine **7.0.0**, setuptools
|
|
69
|
+
**84.2.1**, wheel **0.48.0**. The Windows package was built and checked by the
|
|
70
|
+
GitHub-hosted `windows-2025` runner; no Windows host was used locally.
|
|
71
|
+
|
|
72
|
+
| Check | Result |
|
|
73
|
+
|---|---|
|
|
74
|
+
| CI on main after #84 (`9fc560c`) | GrantTrace CI [run 42918318210](https://github.com/ysc070528/granttrace/actions/runs/42918318210) (Ruff, Mypy, tests on 3.9 / 3.12 / 3.14, runtime dependency audit), Windows x64 portable [run 42918318200](https://github.com/ysc070528/granttrace/actions/runs/42918318200) and CodeQL [run 42918318197](https://github.com/ysc070528/granttrace/actions/runs/42918318197): all passed |
|
|
75
|
+
| Full regression suite | 1322 passed and 2402 subtests passed on CPython 3.13.18 and 3.14.6; 1322 passed on 3.9.25; full unittest passed |
|
|
76
|
+
| Branch-aware coverage | 89.95% combined (statements 7281 / 7922, branches 3474 / 4034 = 86.12%); required minimum 80% |
|
|
77
|
+
| Acceptance scripts | PR42 adversarial; PR43 integration (89 tests, source `750a801`, clean tree); authorization coverage, authoritative and generic HTTP; business scenarios 6 / 6; JSON / YAML examples; installation |
|
|
78
|
+
| Wheel / sdist | Isolated `python -m build` from `git archive`; `twine check --strict` passed for both. Wheel: 43 files; sdist: 195 files; no caches, local configurations or build output. Metadata: `Version: 2.7.0`, the unchanged `Summary`, `Requires-Python: >=3.9`, `Requires-Dist: PyYAML>=6.0` |
|
|
79
|
+
| Clean installations | The wheel in new virtual environments on CPython 3.9.25, 3.13.18 and 3.14.6, and the sdist on 3.13.18, each outside the checkout: `granttrace --version` prints `GrantTrace 2.7.0` and `core` loads from `site-packages`; `granttrace demo` exits 0 with BOLA and mass assignment confirmed, rollback verified, the database restored and the server stopped. `scripts/verify_install.py --wheel` passed on the built wheel: versions consistent, 0 PATCH in read-only and external active scans (the external active scan is blocked without state authority), 0 requests for the offline plan |
|
|
80
|
+
| Version consistency | `pyproject.toml`, `core.__version__`, CLI, HTML and JSON reports and the HTTP User-Agent say 2.7.0. The Windows build and verification scripts, the Windows workflow's ZIP and artifact names and the packaged README and launcher derive it through `scripts/source_version.py`; the publishing workflow's manual choices include v2.7.0 |
|
|
81
|
+
| Windows x64 portable | Built from `9fc560c` (clean tree) in run 42918318200 on Windows Server 2025 with Python 3.14.5 and PyInstaller 6.22.3: `GrantTrace-v2.7.0-Windows-x64.zip`, 10,747,513 bytes, SHA256 `a05d6288b85577e6e4bee1a12c9910c8922e564cfa0cf475f96e180832bc1a90`. `scripts/verify_windows_portable.py` passed: extraction to paths with spaces and Chinese characters outside the checkout, no Python on the child PATH, `--version` and `--help`, active and read-only demos, an offline YAML plan with 0 requests, `Start-Demo.bat`, the loopback port closed and no package process left. The artifact host was not reachable from this environment, so the ZIP was not downloaded and rehashed here, and no one double-clicked it on a clean Windows machine |
|
|
82
|
+
| 2.7.0 detectors | Read-only POST, role matrix and sensitive-field checks are covered by `tests/test_v27_hardening.py`, including real HTTP to a loopback server. VAmPI and crAPI were not re-run for this candidate; the read-only GET/HEAD decisions are unchanged (a 200,000-endpoint differential against 2.6.0 found no difference) |
|
|
83
|
+
| Secrets | A pattern scan of all 194 tracked files found no keys, tokens or JWTs; the only match is a dummy private-key marker in a redaction test. GitHub secret scanning is not enabled for the repository |
|
|
84
|
+
| Documentation | Relative links, anchors and links to this repository: 0 problems. `SECURITY.md` describes when a read-only POST is sent; release-specific pages updated in #90 |
|
|
85
|
+
|
|
86
|
+
Local candidate hashes, built from `750a801` in the container:
|
|
87
|
+
|
|
88
|
+
```text
|
|
89
|
+
8efe69a82a953310156424bfb2451f6bee842d2e4655445f25daacddba9fe303 granttrace-2.7.0-py3-none-any.whl
|
|
90
|
+
2c72b227652da135275c17036f58232e051efa53f325aa24ca7ea60c7f183b92 granttrace-2.7.0.tar.gz
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
The publishing workflow builds the uploaded distributions from the tag. The
|
|
94
|
+
Release's Windows ZIP and `SHA256SUMS.txt` come from the Windows workflow run on
|
|
95
|
+
the release commit itself; their hashes differ from the build above because the
|
|
96
|
+
build records its source commit.
|
|
97
|
+
|
|
98
|
+
Still to do: CI on the release commit, then the tag, the GitHub Release with the
|
|
99
|
+
Windows assets, PyPI publishing and the post-release checks in the
|
|
100
|
+
[release checklist](docs/release-checklist.md), including a clean Windows machine.
|
|
101
|
+
|
|
6
102
|
## v2.6.0 pre-release acceptance - 2026-11-08
|
|
7
103
|
|
|
8
104
|
Status: **accepted for release; v2.6.0 is not published.** Release candidate:
|