no-ambient-authority: calibrate POLA for small Python scripts
Python can't enforce a capability boundary, so attenuation that lives mostly in names is par for the course in a script; robustness against adversaries means leaving Python. Generated-by: Claude Opus 5.5
This commit is contained in:
1 parent
65761a1da5
commit
fd47da3a98
1 file changed
+6
@@ -59,6 +59,12 @@ before writing or refactoring a Python script; don't invent conventions.
|
|||||||
- Checker: run `~/projects/awesome-ocap/tools/disciplined_python_check.py path/to/script.py`
|
- Checker: run `~/projects/awesome-ocap/tools/disciplined_python_check.py path/to/script.py`
|
||||||
and treat each finding as a bug. It points at matching before/after
|
and treat each finding as a bug. It points at matching before/after
|
||||||
examples in `tests/fixtures/disciplined_python/{errors,fixed}/`.
|
examples in `tests/fixtures/disciplined_python/{errors,fixed}/`.
|
||||||
|
- Calibration: Python can't enforce a capability boundary (name mangling
|
||||||
|
and introspection get around any wrapper), so for a small script,
|
||||||
|
attenuation that lives mostly in names is fine. An example: a read-only
|
||||||
|
library view whose path object could still POST. GET-only is ideal;
|
||||||
|
note the gap honestly and move on. Robustness against adversaries
|
||||||
|
means leaving Python (e.g. for Hardened JavaScript).
|
||||||
|
|
||||||
## how this shows up in review
|
## how this shows up in review
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user