Skip to content

feat(sensor): add standalone secfoo sensor daemon, disk spooler, and service installers (#67) - #287

Open
SriRamkunamsetty wants to merge 1 commit into
secfoo-com:mainfrom
SriRamkunamsetty:feat/standalone-sensor-67
Open

SriRamkunamsetty wants to merge 1 commit into
secfoo-com:mainfrom
SriRamkunamsetty:feat/standalone-sensor-67

Conversation

@SriRamkunamsetty

Copy link
Copy Markdown
Contributor

Closes #67
Follows up #235

What does this change, and why?
Rebased onto main (afe600d) and addressed the review feedback:

  • Fixed _http_post and flush_once in src/secfoo/sensor/daemon.py so permanent 4xx rejections (400/413/422) log the status code (without the URL), ack + increment dropped_batches, and move on instead of blocking the spooler; 401, 403, 408, 429, 5xx, and network errors remain retryable.
  • Added test_permanent_4xx_drops_rejected_spool_batch_so_later_batches_deliver (400 -> 200, 401 -> 200).
  • CodeQL note: py/bind-socket-all-network-interfaces is a false positive (listeners bind strictly to 127.0.0.1 / ::1), and state/spool/watchlist files use 0o600/0o700.

Testing

  • Verified locally: tests/test_sensor/ & tests/test_cli.py (183 passed, 18 skipped on Windows) and ruff check pass.

Copilot AI balanced review requested due to automatic review settings December 6, 2026 13:30

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

if host == "::1" or ":" in host:
srv = socket.socket(socket.AF_INET6, socket.SOCK_STREAM)
srv.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
srv.bind(("::1", port))
else:
srv = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
srv.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
srv.bind(("127.0.0.1", port))
@SriRamkunamsetty
SriRamkunamsetty force-pushed the feat/standalone-sensor-67 branch from ebafa8b to db09250 Compare December 6, 2026 13:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Standalone runtime sensor (secfoo sensor) as sidecar or host daemon

3 participants