permitprobe 0.1.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.
- permitprobe-0.1.1/AGENTS.md +15 -0
- permitprobe-0.1.1/CONTRIBUTING.md +47 -0
- permitprobe-0.1.1/LICENSE +202 -0
- permitprobe-0.1.1/MANIFEST.in +5 -0
- permitprobe-0.1.1/NOTICE +23 -0
- permitprobe-0.1.1/PKG-INFO +258 -0
- permitprobe-0.1.1/README.md +234 -0
- permitprobe-0.1.1/SECURITY.md +26 -0
- permitprobe-0.1.1/examples/permitprobe.json +86 -0
- permitprobe-0.1.1/examples/review.txt +1 -0
- permitprobe-0.1.1/permitprobe.schema.json +322 -0
- permitprobe-0.1.1/pyproject.toml +40 -0
- permitprobe-0.1.1/requirements.lock +54 -0
- permitprobe-0.1.1/scripts/install_gitleaks.py +51 -0
- permitprobe-0.1.1/scripts/verify_release.py +80 -0
- permitprobe-0.1.1/setup.cfg +4 -0
- permitprobe-0.1.1/src/permitprobe/__init__.py +3 -0
- permitprobe-0.1.1/src/permitprobe/__main__.py +3 -0
- permitprobe-0.1.1/src/permitprobe/api.py +266 -0
- permitprobe-0.1.1/src/permitprobe/cli.py +147 -0
- permitprobe-0.1.1/src/permitprobe/demo.py +161 -0
- permitprobe-0.1.1/src/permitprobe/handoff.py +267 -0
- permitprobe-0.1.1/src/permitprobe/policy.py +211 -0
- permitprobe-0.1.1/src/permitprobe/report.py +47 -0
- permitprobe-0.1.1/src/permitprobe.egg-info/PKG-INFO +258 -0
- permitprobe-0.1.1/src/permitprobe.egg-info/SOURCES.txt +30 -0
- permitprobe-0.1.1/src/permitprobe.egg-info/dependency_links.txt +1 -0
- permitprobe-0.1.1/src/permitprobe.egg-info/entry_points.txt +2 -0
- permitprobe-0.1.1/src/permitprobe.egg-info/requires.txt +8 -0
- permitprobe-0.1.1/src/permitprobe.egg-info/top_level.txt +1 -0
- permitprobe-0.1.1/tests/test_boundaries.py +508 -0
- permitprobe-0.1.1/tests/test_release.py +83 -0
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# PermitProbe
|
|
2
|
+
|
|
3
|
+
Independent security regression CLI. Python 3.11+, POSIX handoff reader.
|
|
4
|
+
|
|
5
|
+
- Keep policy parsing strict and report exit codes 0/pass, 1/violation, 2/inconclusive.
|
|
6
|
+
- Unknown outcomes and failed positive controls must never produce a clean run.
|
|
7
|
+
- Reports contain labels and findings, not credentials, response bodies or scanned text.
|
|
8
|
+
- The library reuses Overstep and Gitleaks; do not silently widen their execution scope.
|
|
9
|
+
- All fixtures are synthetic. Tests use loopback; never point tests at production.
|
|
10
|
+
- Run `python -m pytest -q` and `ruff check src tests scripts` for behavior changes.
|
|
11
|
+
Gitleaks 8.30.1 must be installed; missing-engine tests may not be silently skipped.
|
|
12
|
+
- Keep explicit boundary checks and the checked-byte bundle guarantee covered by tests.
|
|
13
|
+
- Keep examples, README and the generated policy schema synchronized.
|
|
14
|
+
- Do not commit environments, generated reports, archives, private data or scanner binaries.
|
|
15
|
+
- Keep optional future integrations clearly distinguished from implemented capabilities.
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# Contributing
|
|
2
|
+
|
|
3
|
+
Start with the installation and test commands in README.md. Keep examples synthetic.
|
|
4
|
+
Use an issue to describe a reproducible boundary failure, expected policy, and current
|
|
5
|
+
coverage gap. Security-sensitive reports belong in the private reporting channel.
|
|
6
|
+
|
|
7
|
+
A useful change includes a failing fixture, the smallest correction, and a passing
|
|
8
|
+
regression. Keep API authorization, response schemas, and handoff checks independently
|
|
9
|
+
usable. Document untested surfaces and errors explicitly; never trade them for a green exit.
|
|
10
|
+
|
|
11
|
+
The public contract is the policy schema, CLI, report schema, exit-code semantics, and
|
|
12
|
+
checked-bundle manifest. Change them deliberately and update examples and tests together.
|
|
13
|
+
Public documentation is in English. Contributions are provided under Apache-2.0.
|
|
14
|
+
|
|
15
|
+
## Publishing a verified GitHub release to PyPI
|
|
16
|
+
|
|
17
|
+
The distribution, import package, and command are all named `permitprobe`. The former
|
|
18
|
+
name `boundaryguard` is already used by an unrelated PyPI project. Keep historical
|
|
19
|
+
GitHub tags and assets unchanged; the rename is released as v0.1.1.
|
|
20
|
+
|
|
21
|
+
One-time account setup belongs to the maintainer: create a PyPI account, verify its
|
|
22
|
+
email and configure two-factor authentication, then add a pending GitHub publisher at
|
|
23
|
+
<https://pypi.org/manage/account/publishing/> using:
|
|
24
|
+
|
|
25
|
+
| Field | Value |
|
|
26
|
+
| --- | --- |
|
|
27
|
+
| PyPI project name | `permitprobe` |
|
|
28
|
+
| GitHub owner | `Chorolee` |
|
|
29
|
+
| GitHub repository | `permitprobe` |
|
|
30
|
+
| Workflow filename | `publish-pypi.yml` |
|
|
31
|
+
| GitHub environment | `pypi` |
|
|
32
|
+
|
|
33
|
+
No long-lived PyPI token is stored in this repository. See the official
|
|
34
|
+
[pending publisher guide](https://docs.pypi.org/trusted-publishers/creating-a-project-through-oidc/).
|
|
35
|
+
A pending publisher does not reserve a name or publish a package.
|
|
36
|
+
|
|
37
|
+
Before publication, run **Publish verified release to PyPI** on `main` with the
|
|
38
|
+
release tag and `publish=false`. This downloads the existing GitHub wheel and source
|
|
39
|
+
distribution, verifies their GitHub SHA256 digests, checks package name/version,
|
|
40
|
+
and runs strict metadata validation. It does not rebuild or upload the package.
|
|
41
|
+
After account setup and a successful validation, run the same workflow with
|
|
42
|
+
`publish=true`. Only the upload job receives the short-lived OIDC publishing permission.
|
|
43
|
+
|
|
44
|
+
Confirm the public PyPI version and file hashes after upload before adding registry
|
|
45
|
+
installation instructions to the README. Publication establishes availability;
|
|
46
|
+
downloads or dependent projects must be reported from real, independently verifiable
|
|
47
|
+
usage. Do not equate an automated installation with a distinct external user.
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright [yyyy] [name of copyright owner]
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|
permitprobe-0.1.1/NOTICE
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
PermitProbe
|
|
2
|
+
Copyright 2026 PermitProbe contributors
|
|
3
|
+
|
|
4
|
+
PermitProbe is independently implemented and uses third-party software:
|
|
5
|
+
|
|
6
|
+
- Overstep 1.5.0, https://github.com/kabiri-labs/overstep (Apache-2.0)
|
|
7
|
+
Copyright and notices remain with its authors. Installed as a dependency.
|
|
8
|
+
- Gitleaks 8.30.1, https://github.com/gitleaks/gitleaks (MIT)
|
|
9
|
+
Invoked as a separately installed executable; not bundled in this repository.
|
|
10
|
+
- jsonschema, https://github.com/python-jsonschema/jsonschema (MIT)
|
|
11
|
+
Installed as a dependency.
|
|
12
|
+
|
|
13
|
+
Each dependency retains its own license and notices. The repository contains
|
|
14
|
+
synthetic demonstrations, not production data, credentials, or private source.
|
|
15
|
+
|
|
16
|
+
Related work considered for later adapters:
|
|
17
|
+
Supabase Test Helpers (MIT) and rlsautotest (Apache-2.0).
|
|
18
|
+
Neither is included in, or required by, the current implementation.
|
|
19
|
+
|
|
20
|
+
Conceptual design reference:
|
|
21
|
+
ARTEX, https://github.com/Autumn-27/ARTEX (reviewed source: AGPL-3.0).
|
|
22
|
+
No ARTEX code, prompts, screenshots, or assets are included. See README.md for
|
|
23
|
+
the reviewed revision and the proposed independently implemented adaptations.
|
|
@@ -0,0 +1,258 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: permitprobe
|
|
3
|
+
Version: 0.1.1
|
|
4
|
+
Summary: Repeatable API, response-data, and AI handoff boundary checks
|
|
5
|
+
Maintainer: Chorolee
|
|
6
|
+
License-Expression: Apache-2.0
|
|
7
|
+
Project-URL: Repository, https://github.com/Chorolee/permitprobe
|
|
8
|
+
Project-URL: Issues, https://github.com/Chorolee/permitprobe/issues
|
|
9
|
+
Project-URL: Releases, https://github.com/Chorolee/permitprobe/releases
|
|
10
|
+
Project-URL: Security, https://github.com/Chorolee/permitprobe/security/policy
|
|
11
|
+
Keywords: security,authorization,api-security,security-testing
|
|
12
|
+
Requires-Python: >=3.11
|
|
13
|
+
Description-Content-Type: text/markdown
|
|
14
|
+
License-File: LICENSE
|
|
15
|
+
License-File: NOTICE
|
|
16
|
+
Requires-Dist: overstep==1.5.0
|
|
17
|
+
Requires-Dist: jsonschema<5,>=4.23
|
|
18
|
+
Provides-Extra: dev
|
|
19
|
+
Requires-Dist: pytest<10,>=8; extra == "dev"
|
|
20
|
+
Requires-Dist: ruff<1,>=0.12; extra == "dev"
|
|
21
|
+
Requires-Dist: build<2,>=1.2; extra == "dev"
|
|
22
|
+
Requires-Dist: twine<7,>=6; extra == "dev"
|
|
23
|
+
Dynamic: license-file
|
|
24
|
+
|
|
25
|
+
# PermitProbe
|
|
26
|
+
|
|
27
|
+
[](https://github.com/Chorolee/permitprobe/actions/workflows/ci.yml) [](LICENSE) [](https://github.com/Chorolee/permitprobe/releases)
|
|
28
|
+
|
|
29
|
+
Open-source defensive security CLI for testing API authorization, response-data boundaries, and AI handoff exposure.
|
|
30
|
+
|
|
31
|
+
Maintainer: @Chorolee<br>
|
|
32
|
+
Security Maintainer: @Chorolee<br>
|
|
33
|
+
Security maintenance: vulnerability triage, security releases, and coordinated disclosure.
|
|
34
|
+
|
|
35
|
+
License: Apache-2.0 · Current release: [v0.1.1](https://github.com/Chorolee/permitprobe/releases/tag/v0.1.1)
|
|
36
|
+
|
|
37
|
+
PermitProbe helps service operators validate:
|
|
38
|
+
|
|
39
|
+
- cross-user authorization boundaries
|
|
40
|
+
- unexpected API response fields
|
|
41
|
+
- secrets included in AI handoff files
|
|
42
|
+
|
|
43
|
+
It is designed exclusively for systems the operator owns or is authorized to test.
|
|
44
|
+
|
|
45
|
+
PermitProbe was developed from recurring defensive security checks used while operating data-backed production services.
|
|
46
|
+
|
|
47
|
+
PermitProbe is an early open-source CLI for small teams running data-backed services.
|
|
48
|
+
It turns an explicit policy into repeatable checks and a local, machine-readable report.
|
|
49
|
+
It reuses [Overstep](https://github.com/kabiri-labs/overstep) for authorization planning and
|
|
50
|
+
classification, [JSON Schema](https://github.com/python-jsonschema/jsonschema) for response
|
|
51
|
+
contracts, and [Gitleaks](https://github.com/gitleaks/gitleaks) for secret detection.
|
|
52
|
+
|
|
53
|
+
Version **0.1.1** supports GET-only JSON REST APIs and explicit UTF-8 text-file handoffs on
|
|
54
|
+
Linux/macOS. A passing result applies only to the declared cases and scanned bytes.
|
|
55
|
+
|
|
56
|
+
## Try the working demo
|
|
57
|
+
|
|
58
|
+
PyPI publication is being configured. Until an upload is verified, install from
|
|
59
|
+
this repository or its GitHub Release files. Maintainers can follow the
|
|
60
|
+
[Trusted Publishing setup](CONTRIBUTING.md#publishing-a-verified-github-release-to-pypi).
|
|
61
|
+
|
|
62
|
+
The project was renamed from BoundaryGuard in v0.1.1 because the PyPI package
|
|
63
|
+
`boundaryguard` belongs to an unrelated project. The historical v0.1.0 release
|
|
64
|
+
remains unchanged.
|
|
65
|
+
|
|
66
|
+
Python 3.11+ is required. From this repository:
|
|
67
|
+
|
|
68
|
+
```sh
|
|
69
|
+
python3 -m venv .venv
|
|
70
|
+
. .venv/bin/activate
|
|
71
|
+
python -m pip install -c requirements.lock -e '.[dev]'
|
|
72
|
+
python scripts/install_gitleaks.py
|
|
73
|
+
|
|
74
|
+
permitprobe demo --scenario safe --gitleaks .tools/gitleaks
|
|
75
|
+
permitprobe demo --scenario leaky --gitleaks .tools/gitleaks
|
|
76
|
+
permitprobe demo --scenario expired --gitleaks .tools/gitleaks
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
The demos start an ephemeral server on literal loopback and use synthetic credentials
|
|
80
|
+
and documents. They do not contact an application or a database.
|
|
81
|
+
|
|
82
|
+
| Scenario | Expected exit | What it demonstrates |
|
|
83
|
+
| --- | --- | --- |
|
|
84
|
+
| `safe` | `0` | Both users can read their own document; cross-owner reads are denied; fields and handoff match policy |
|
|
85
|
+
| `leaky` | `1` | Cross-owner access, an extra private response field, and a synthetic token in a handoff are detected |
|
|
86
|
+
| `schema-leak` | `1` | Authorization can be correct while the response exposes an extra field |
|
|
87
|
+
| `expired` | `2` | One user's working credential cannot hide another user's failed positive control |
|
|
88
|
+
| `server-error` | `2` | A server error on a negative test is not evidence that authorization worked |
|
|
89
|
+
|
|
90
|
+
Exit `1` and `2` in the last examples are intentional. No response bodies, token values,
|
|
91
|
+
file contents, or raw scanner diagnostics are included in PermitProbe reports.
|
|
92
|
+
|
|
93
|
+
## Check your own staging API
|
|
94
|
+
|
|
95
|
+
```sh
|
|
96
|
+
permitprobe init my-security-checks
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
Edit `my-security-checks/permitprobe.json`:
|
|
100
|
+
|
|
101
|
+
- Set the HTTPS origin of a target you operate. HTTP is accepted only for literal loopback.
|
|
102
|
+
- Name one anonymous identity and at least two authenticated identities with distinct objects.
|
|
103
|
+
- Point `token_env` at environment variables containing the corresponding bearer tokens.
|
|
104
|
+
PermitProbe does not read dotenv files, create users, or obtain credentials.
|
|
105
|
+
- Declare each resource's allowed roles and `own`/`any` scope.
|
|
106
|
+
- For object resources, name the URL parameter, identity attribute, and JSON pointer that
|
|
107
|
+
proves a successful response actually returned the intended object.
|
|
108
|
+
- Set `response_schema` and `denial_schema` for successful and refused responses.
|
|
109
|
+
Close objects with `additionalProperties: false`, including nested objects, when all
|
|
110
|
+
undeclared fields must be forbidden. The starter also constrains denial error values.
|
|
111
|
+
- Select only the text files intended for an AI handoff. Paths are relative to `handoff.root`,
|
|
112
|
+
itself relative to the policy file. They are never inferred from the whole repository.
|
|
113
|
+
|
|
114
|
+
After supplying the token variables through your normal local credential mechanism:
|
|
115
|
+
|
|
116
|
+
```sh
|
|
117
|
+
permitprobe check my-security-checks/permitprobe.json \
|
|
118
|
+
--gitleaks .tools/gitleaks --report result.json
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
The starter origin is a non-working `example.invalid` placeholder. A missing token,
|
|
122
|
+
unreachable target, unsupported response, failed control, or missing scanner exits `2`.
|
|
123
|
+
Reports and exports are created exclusively; existing files are not overwritten.
|
|
124
|
+
|
|
125
|
+
Use `permitprobe schema` to print the policy's JSON Schema. Unknown policy keys,
|
|
126
|
+
duplicate JSON keys, reused object IDs, and reused token references are rejected.
|
|
127
|
+
`examples/permitprobe.json` is a complete configuration with synthetic placeholders.
|
|
128
|
+
|
|
129
|
+
## Check and package an AI handoff
|
|
130
|
+
|
|
131
|
+
```sh
|
|
132
|
+
permitprobe bundle my-security-checks/permitprobe.json \
|
|
133
|
+
--gitleaks .tools/gitleaks --output reviewed-handoff.zip
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
`bundle` checks the **handoff surface only** and makes no API requests. Its report states
|
|
137
|
+
that API/data surfaces were not checked. It captures each named file, checks the captured
|
|
138
|
+
bytes with Gitleaks, and only emits a ZIP when all handoff checks pass. The ZIP contains a
|
|
139
|
+
SHA256 manifest and those exact bytes, even if source files change afterward. Nothing is
|
|
140
|
+
uploaded or sent to an agent. Send the checked archive, not a re-read of the original tree.
|
|
141
|
+
|
|
142
|
+
The built-in boundary refuses dotenv files, private-key files, credential directories,
|
|
143
|
+
Git/private-memory directories, symlinks, hard links, non-regular files, binary content,
|
|
144
|
+
path traversal, and configured size overruns. User deny patterns win over allow patterns;
|
|
145
|
+
neither can override the built-in exclusions. Glob patterns match the whole POSIX path,
|
|
146
|
+
and `*` can cross directory separators. Include specific files rather than a broad `*`.
|
|
147
|
+
|
|
148
|
+
Scanner configuration and inline `gitleaks:allow` comments in a payload cannot suppress
|
|
149
|
+
the scan. Gitleaks runs with a small explicit environment, without inherited credentials
|
|
150
|
+
or configuration overrides. It receives neutral filenames and private temporary files.
|
|
151
|
+
These controls are a preflight check, not a sandbox for a malicious scanner executable.
|
|
152
|
+
|
|
153
|
+
## What is reused, and what PermitProbe adds
|
|
154
|
+
|
|
155
|
+
| Component | Responsibility |
|
|
156
|
+
| --- | --- |
|
|
157
|
+
| Overstep **1.5.0** | Generate identity/resource cases and classify unexpected access, including cross-owner access |
|
|
158
|
+
| JSON Schema / `jsonschema` | Validate nested JSON response contracts |
|
|
159
|
+
| Gitleaks **8.30.1** | Detect known secret patterns in captured handoff text |
|
|
160
|
+
| PermitProbe | Strict configuration, bounded GET transport, per-identity positive controls, object identity checks, success **and denial** response contracts, explicit file boundaries, checked-byte bundles, and one privacy-conscious report |
|
|
161
|
+
|
|
162
|
+
The Gitleaks installer pins the release and archive hashes. `requirements.lock` records
|
|
163
|
+
the tested Python dependency versions. Engine updates must pass the regression fixtures.
|
|
164
|
+
No code from a source-available-only security product is embedded here.
|
|
165
|
+
|
|
166
|
+
An auth-only matrix can be exported for direct use with Overstep:
|
|
167
|
+
|
|
168
|
+
```sh
|
|
169
|
+
permitprobe export-overstep my-security-checks/permitprobe.json --output matrix.json
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
The output is JSON, also valid YAML for Overstep, and retains `${TOKEN_ENV}` references.
|
|
173
|
+
It does **not** include PermitProbe's JSON Schema checks, strict control rules, or
|
|
174
|
+
handoff checks. Direct Overstep execution has its own behavior and scope.
|
|
175
|
+
|
|
176
|
+
## Exit codes and evidence
|
|
177
|
+
|
|
178
|
+
| Exit | Meaning |
|
|
179
|
+
| --- | --- |
|
|
180
|
+
| `0` | Every configured check completed and passed |
|
|
181
|
+
| `1` | At least one policy violation; no incomplete checks |
|
|
182
|
+
| `2` | Configuration error or incomplete evidence; failures may also be present |
|
|
183
|
+
|
|
184
|
+
`--format json` prints the versioned report. `--report path.json` additionally creates
|
|
185
|
+
a local report file. Unconfigured surfaces are named explicitly. An empty run cannot pass.
|
|
186
|
+
Responses are consumed only in memory and capped in size/time. Proxy environment variables,
|
|
187
|
+
redirects, automatic login, fixture mutations, and shared cross-identity cookie jars are not used.
|
|
188
|
+
|
|
189
|
+
## Scope and limitations
|
|
190
|
+
|
|
191
|
+
- Only declared GET cases are tested. This is not a full application security audit.
|
|
192
|
+
- A forbidden `2xx` response is an access-policy violation; content markers can strengthen
|
|
193
|
+
evidence, but a status code alone does not prove a particular secret was disclosed.
|
|
194
|
+
- The owner must supply the intended policy, real test identities, and existing test objects.
|
|
195
|
+
A wrong policy or overly permissive JSON Schema can produce misleading conclusions.
|
|
196
|
+
- JSON Schemas are inline Draft 2020-12; reference resolution and format enforcement are
|
|
197
|
+
not supported. Denial responses must also be valid JSON matching their declared schema.
|
|
198
|
+
- These are API observations, **not** a proof of database grants, RLS, storage, GraphQL,
|
|
199
|
+
caching, or write-path correctness. The tool never connects to a database in v0.1.
|
|
200
|
+
- Handoff scanning covers selected UTF-8 text only. It is not complete PII classification,
|
|
201
|
+
archive scanning, prompt-injection prevention, continuous DLP, or runtime egress enforcement.
|
|
202
|
+
- Policy files, schemas, the installed dependencies, and the chosen scanner executable are
|
|
203
|
+
trusted. Reports retain configured labels and filenames; do not put secrets in those names.
|
|
204
|
+
- GET handlers must actually be safe to call. Choose a staging target with synthetic fixtures.
|
|
205
|
+
|
|
206
|
+
## Development
|
|
207
|
+
|
|
208
|
+
```sh
|
|
209
|
+
python -m pytest -q
|
|
210
|
+
ruff check src tests scripts
|
|
211
|
+
python -m build
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
Tests use real loopback HTTP and the installed Gitleaks binary. Missing Gitleaks fails the
|
|
215
|
+
suite rather than silently skipping secret-detection tests. Set `PERMITPROBE_GITLEAKS`
|
|
216
|
+
to an absolute binary path when it is not at `.tools/gitleaks`.
|
|
217
|
+
|
|
218
|
+
## What expanding verification means
|
|
219
|
+
|
|
220
|
+
This means adding **security checks that users can apply to their services**, separately
|
|
221
|
+
from adding unit tests for PermitProbe itself. The present regression suite tests the
|
|
222
|
+
tool against synthetic safe, vulnerable, and inconclusive cases; it does not audit a
|
|
223
|
+
deployed application automatically.
|
|
224
|
+
|
|
225
|
+
| Planned capability | Concrete question it would test |
|
|
226
|
+
| --- | --- |
|
|
227
|
+
| Database adapter (Supabase/pgTAP) | Can one authenticated user directly read another user's private row, even if the HTTP API denies it? |
|
|
228
|
+
| Linked API/storage cases | Does a document denied by its API remain readable through a direct object URL or another declared route? |
|
|
229
|
+
| Write authorization cases | Can a user modify or delete another user's seeded test record? Run against disposable test data with explicit write-test scope. |
|
|
230
|
+
| MCP adapter | Can an agent identity invoke a tool or name a resource outside its declared permissions? |
|
|
231
|
+
| Finding history and retests | Is a previously reproduced defect still present after a change, with valid credentials and a working positive control? |
|
|
232
|
+
|
|
233
|
+
These are **not implemented in v0.1**. Each addition needs a known-vulnerable fixture,
|
|
234
|
+
a fixed counterpart, and an incomplete-evidence case that must not pass.
|
|
235
|
+
|
|
236
|
+
## Design reference: ARTEX
|
|
237
|
+
|
|
238
|
+
[ARTEX](https://github.com/Autumn-27/ARTEX) is an AI-driven penetration-testing system.
|
|
239
|
+
Reference review: [revision b55ceb1](https://github.com/Autumn-27/ARTEX/tree/b55ceb1fdd84a813d77de09a06af83d323a81f85).
|
|
240
|
+
Its documented asset/exploration graphs distinguish targets from investigation progress;
|
|
241
|
+
its finding retests retain prior evidence and separate reproduced, fixed, and inconclusive
|
|
242
|
+
outcomes. See its [architecture](https://github.com/Autumn-27/ARTEX/blob/b55ceb1fdd84a813d77de09a06af83d323a81f85/README.md),
|
|
243
|
+
[retest model](https://github.com/Autumn-27/ARTEX/blob/b55ceb1fdd84a813d77de09a06af83d323a81f85/db/finding_retests.go),
|
|
244
|
+
and [evidence store](https://github.com/Autumn-27/ARTEX/blob/b55ceb1fdd84a813d77de09a06af83d323a81f85/evidence/store.go).
|
|
245
|
+
|
|
246
|
+
The proposed PermitProbe adaptation is a scoped workflow: inventory declared surfaces,
|
|
247
|
+
identify a candidate, reproduce it with an executable check, retain safe evidence metadata,
|
|
248
|
+
then rerun the same case after a fix. A future AI-assisted discovery layer would produce
|
|
249
|
+
candidates; configured executable checks would decide the result. Any coverage view must
|
|
250
|
+
keep untested surfaces visible. Response bodies and credentials would remain excluded from
|
|
251
|
+
ordinary reports under this project's existing data-handling contract.
|
|
252
|
+
|
|
253
|
+
ARTEX's reviewed source is [AGPL-3.0](https://github.com/Autumn-27/ARTEX/blob/b55ceb1fdd84a813d77de09a06af83d323a81f85/LICENSE).
|
|
254
|
+
It is a **conceptual reference**, not an installed dependency or an imported implementation.
|
|
255
|
+
No ARTEX code, prompts, screenshots, or other assets are copied into PermitProbe.
|
|
256
|
+
This reference review does not claim to have run or audited ARTEX.
|
|
257
|
+
|
|
258
|
+
Apache-2.0. See [NOTICE](NOTICE), [CONTRIBUTING.md](CONTRIBUTING.md), and [SECURITY.md](SECURITY.md).
|