test: tests and general improvements - #54
Conversation
praxis-bot
left a comment
There was a problem hiding this comment.
PR Review
Tests and general improvements across the policy engine: CEL float-narrowing bugfix, OPA subtree collision check, JWT Bearer case-insensitive stripping, parallel branch panic fail-closed, field-op array fan-out, route cache tag keying, executor deny synthesis, label merge refactor, delegation hop field checks, delegated_tokens serialization fix, duplicate key rejection, authentication step validation, and multi-elicit rejection.
Overall this is a high-quality set of security-hardening and correctness improvements with thorough test coverage for each change. The fail-closed posture is consistent throughout.
| Severity | Count |
|---|---|
| Critical | 0 |
| Large | 0 |
| Medium | 1 |
No non-inlineable findings.
2be78ba to
e3c0077
Compare
…ail closed Close a set of fail-open and information-leak gaps in the policy language core, each verified against the code and pinned with a regression test. Signed-off-by: Shane Utt <shaneutt@linux.com>
…rse attenuation Signed-off-by: Shane Utt <shaneutt@linux.com>
… merges Signed-off-by: Shane Utt <shaneutt@linux.com>
…tion, Valkey alarm Signed-off-by: Shane Utt <shaneutt@linux.com>
Signed-off-by: Shane Utt <shaneutt@linux.com>
Signed-off-by: Shane Utt <shaneutt@linux.com>
The prefix-aware collision check (packages_share_subtree) had tests for the equal and child-of-global cases but not the boundary it explicitly guards where a global data.authz must NOT reject an inline data.authznext just because one string-prefixes the other. Signed-off-by: Shane Utt <shaneutt@linux.com>
Signed-off-by: Shane Utt <shaneutt@linux.com>
Signed-off-by: Shane Utt <shaneutt@linux.com>
Signed-off-by: Shane Utt <shaneutt@linux.com>
Signed-off-by: Shane Utt <shaneutt@linux.com>
Signed-off-by: Shane Utt <shaneutt@linux.com>
…ering Signed-off-by: Shane Utt <shaneutt@linux.com>
…iolation Signed-off-by: Shane Utt <shaneutt@linux.com>
…/custom Signed-off-by: Shane Utt <shaneutt@linux.com>
…itor Also switched the separator comments and moved test utilities to the bottom of the tests to match conventions. Signed-off-by: Shane Utt <shaneutt@linux.com>
Signed-off-by: Shane Utt <shaneutt@linux.com>
Signed-off-by: Shane Utt <shaneutt@linux.com>
e3c0077 to
a190220
Compare
|
Thanks for putting this together — I went through the whole branch and there's a lot of genuinely good work in here. Before the critical notes, the things I think are clearly right and should land as-is:
I also verified the branch locally: I do have some concerns, mostly around two of the fixes trading a fail-open for a fail-under-load, and around how the change set is packaged. Happy to be wrong on any of these. Two things I'd like to resolve before merge1. The array fan-out can become ~100k sequential plugin round-trips per request
The fix is right in intent — So something as ordinary as: result:
rows.ssn: "plugin(dlp-scanner)"against a tool returning 100k rows now performs 100,000 sequential plugin invocations inside a single request, bounded only by The underlying tension is that fan-out cost is Suggestion: make the cap pipeline-aware. A pure-transform pipeline ( 2. The packaging makes this hard to review and hard to release25 files, +2068/−288, with four omnibus commits each bundling several independent security-semantic changes. The title and body describe roughly the test additions; the rest is ~10 independent behaviour changes, at least six of which are breaking for existing config — and By my count the config-breaking set is:
(7) is the one I'd most want called out. An operator upgrading gets different authorization decisions from a policy they never touched, with nothing telling them to re-test. This repo already has the Suggestion: split along the existing commit boundaries (apl-core parser/evaluator; core executor/cache/merges; builtins; tests) and add the Higher-priority notesThe
|
|
Thanks for the PR, @shaneutt ! I did a quick scan last week, and overall it looks good to me. There is one issue that we need to address before merging, just to avoid some bigger reconciliation later. I'd like to merge #55 first, then merge/rebase it here, and fix the APL/Config examples. For example, I assigned @terylt to review #55 but if you like to give it a second pair of eyes, that would be great. :) |
|
Due to constraints on my time I'm going to close this for now. Please feel free to take anything from it you like later. |
I will create another branch cherry picking from this one. It's probably going to be easier than rebasing it. Thanks! |
Drop em dashes and trim the wordier doc blocks across the ported commits. Comment-only, except for one real fix: `get_dotted` is public and its doc linked `expand_field_paths`, which is `pub(crate)`, so rustdoc under `-D warnings` failed. That link is now plain code formatting. Signed-off-by: Frederico Araujo <frederico.araujo@ibm.com>
Comment-only: no code or doctest lines change. Signed-off-by: Frederico Araujo <frederico.araujo@ibm.com>
This provides several new tests for coverage, and makes some general improvements.