test: expand policy engine security boundary coverage - #5
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
tests/test_policy_boundaries_extra.py.Baseline
tests/test_routes_policy.pyduring the FastAPI/Starlette TestClient path.Verification
tests/test_policy_boundaries_extra.py.Coverage attribution limitation
Several policy-core modules are imported from pre-existing compiled Cython
.sofiles. Coverage.py therefore cannot attribute execution of those compiled modules to their adjacent.pysources. No Cython artifacts were rebuilt, replaced, deleted, regenerated, or modified.Known limitations
tests/test_routes_policy.py; route behavior was tested through direct handler invocation instead.Security findings retained for follow-up
This PR does not fix production security findings:
app/core/permissions.py:required_permission()/evaluate_permission()currently allow unknown actions by treating them as requiring no permission. Unknown actions should fail closed.app/core/engine.py: wildcard action/resource values can pass authorization. Undefined wildcard authorization should fail closed.Protection
This PR is test-only and is open for review. It must not be merged as part of this task.