path-wildcards: anchored trailing-* + per-endpoint port + R0040 args#807
path-wildcards: anchored trailing-* + per-endpoint port + R0040 args#807entlein wants to merge 3 commits into
Conversation
Signed-off-by: entlein <einentlein@gmail.com>
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Signed-off-by: entlein <einentlein@gmail.com>
|
@CodeRabbit review this please together with kubescape/storage#323 |
🧩 Analysis chain🏁 Script executed: Length of output: 143814 🏁 Script executed: Length of output: 28898 🏁 Script executed: Length of output: 18 🏁 Script executed: Length of output: 1010 🏁 Script executed: Length of output: 241 🏁 Script executed: Length of output: 422
🔴 Critical — Build break
|
| Issue | Location | Severity |
|---|---|---|
CompareExecArgs missing from kubescape/storage |
exec.go + storage PR #323 |
🔴 Build break |
Stale comment k8sstormcenter/storage#23 |
exec_test.go |
🔵 |
was_path_opened_with_flags loses all test coverage |
open_test.go |
🟡 |
| PR description misleads on pattern delegation | open.go |
🟡 |
Back-compat silent tier in wasExecutedWithArgs |
exec.go |
🔵 |
removeEndpoint in-place mutation undocumented |
analyze_endpoints.go |
🔵 |
The storage PR #323 changes are solid — the per-port endpoint isolation, CompareDynamic rewrite with proper trailing-* anchoring, consolidateOpens, bufPool, and the extensive test suite all look correct. The node-agent changes are also logically sound, contingent on resolving the missing CompareExecArgs definition.
✅ Actions performed
Review triggered.
Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.
…prefix + exec-args Two doc-only fixes for CodeRabbit cross-PR advisory: #7 (NA kubescape#807): ap.was_path_opened_with_suffix / _prefix — explicitly document the false-negative gap when the projection is in pass-through mode (cp.Opens.All=true). Wildcard Patterns are skipped from the suffix/prefix scan because their token-bearing text doesn't safely answer suffix questions. Rule authors who need wildcard-aware coverage should either declare an Opens-projection slice (so SuffixHits/PrefixHits become authoritative for the literals they care about) or use ap.was_path_opened (which runs CompareDynamic over Patterns). #8 (NA kubescape#807): wasExecutedWithArgs — document the three states of ExecsByPath: 1. Path absent from Execs.Values → exec not allowed, fall through. 2. Path in Values, ABSENT from ExecsByPath → legacy back-compat "no argv constraint", match. 3. Path in Values, PRESENT with empty arg list [] → explicit "ran with no args" constraint, NOT a wildcard. The distinction is load-bearing for profile authors: an entry of {Path: ..., Args: []} is a constraint, not a free pass. No behavioural change. Tests pass unchanged.
Signed-off-by: entlein <einentlein@gmail.com>
|
@coderabbitai review Collective re-review request after applying your atomic-split advisory + rabbit-feedback fixes across the full SBOB upstream PR set. Each PR is now scoped to a single tier per your dependency map: Tier 0 (opens):
Tier 2 (execs):
Tier 3 (network):
Tier 4 (tamper/sign):
Umbrellas:
Please confirm atomicity per your earlier advisory and flag any remaining cross-PR coupling we missed. |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chainI'll fetch all PRs in the set to verify atomicity and cross-PR coupling. 🏁 Script executed: Length of output: 2908 🏁 Script executed: Length of output: 101307 🏁 Script executed: Length of output: 93396
✅ Confirmed Atomic (no cross-PR coupling issues found)
🔴 Remaining Cross-PR Coupling (must resolve before merging)1 — storage#324 ↔ storage#325: protobuf test cannot pass without the sibling
Fix options:
2 — node-agent#808 ↔ node-agent#812:
|
| Item | Location |
|---|---|
| storage#323 title still says "R0040 args" | That scope moved to node-agent#807; update the title |
| node-agent#808 still bundles 4 concerns | stampOverlayIdentity, tamper detection, IPAddresses extraction, isNetworkIPWildcard/DNS classifiers — acceptable if you want a single Tier 4 PR, but worth noting for future bisect |
Revised Merge Ordering (after fixes)
graph TD
S322["storage#322\nCompareExecArgs"] --> NA807["node-agent#807\nR0040 args"]
S323["storage#323\npath-wildcards core"] --> NA811["node-agent#811\nwas_path_opened*"]
S323 --> S325["storage#325\nCollapseConfig CRD"]
S324["storage#324 + IPAddresses pb\nnetworkmatch"] --> NA806["node-agent#806\nnetwork CEL"]
S324 --> NA808["node-agent#808\nprojection overlay + tamper"]
S325 --> NA808
NA812["node-agent#812\nExecsByPath surface"] --> NA807
NA812 --> NA808
NA805["node-agent#805\nresolveExecPath"] --> NA807
NA808 --> NA806
NA808 --> S326["storage#326 umbrella"]
NA810["node-agent#810 umbrella"] --> S326
Overview
ap.was_path_opened_with_suffix/prefix: in pass-through mode, onlyscan
Values(concrete paths). WildcardPatternsare delegatedto
CompareDynamicrather than rawstrings.HasPrefix/HasSuffix—a wildcard pattern can't safely answer a suffix/prefix question
without dynamic matching.
ap.was_executed_with_args: returns truewhen the profile contains an entry whose
Pathmatches AND whoseArgsvector matches (literal-equality,⋯one-positionwildcard, or
*zero-or-more trailing tokens).