Repository navigation
fix: reject BPF qualifiers go-pcap ignores and tighten capture files - #5
Merged
Merged
Conversation
portrange compiled to an unconditional keep, so 'tcp port 1 or portrange 1-65535' captured the whole pod namespace; reject portrange, less, greater, broadcast and multicast and refuse any program with no reachable drop. Create pcap files 0600 with O_NOFOLLOW, apply the identity check to legacy downloads that send identity headers, and cap control request bodies at 64 KiB. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Claude <noreply@anthropic.com>
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
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.
Security review of the capture sidecar (2026-11-24). Fixes, by severity:
portrangeto an unconditional keep, sotcp port 25565 or portrange 1-65535passed validation and captured the whole pod network namespace (confirmed locally: both paths of the compiled program reachret #262144).less/greaterwere silently compiled as a port test andip broadcastas plainipportrange,less,greater,broadcast,multicast; newcanDropreachability check refuses any program with no reachable dropos.Create(0644 under the default umask) and followed a planted symlink; the node worker runs as rootO_NOFOLLOW, mode 0600 (the worker still widens to 0640 after finalizing)GET /captures/{id}/fileskipped the identity check that delete and stop applyMaxBytesReader64 KiBFollow-up for the Gameplane operator (not in this repo): the node-capture artifacts container could mount the captures volume read-only.
Checked and sound: no shell/exec of filters, capture ID regex and
OpenRootcontainment, mTLS withRequireAndVerifyClientCert, onlycap_net_rawon the sidecar binary, duration/size limits, no outbound calls.New tests only (4); no existing test changed (checked by a separate test-diff review).
specs.mdupdated.Generated by Claude Code