Repository navigation
docs: document yara and small crates (Refs #362) - #369
Conversation
|
Pushed 12314f7: 14 files (yara access/lib/memory/queue, inventory, response kill/quarantine, sinks, tamper, transport error/detection_upload, updater content/error, verdict). Docs only, 22 markers removed. Checks: nightly fmt, cargo check --all-targets and cargo doc --no-deps with -D warnings on the 8 crates: clean. |
12314f7 to
cda763c
Compare
|
Force-pushed (with lease) |
SoFrexs
left a comment
There was a problem hiding this comment.
Reviewed cda763c6.
The removals are complete (23 markers; the description says 22), and most docs check out: Requester (uid 0 short-circuits, only the primary gid in permits), RotationDoesNotApply::role, Unsendable::count, Verdict::severity (max fold), the PackageChange None cases. Clippy and rustdoc -D warnings clean for inventory, response, sinks, tamper and verdict on the composed stack. CI was still running at review time (lint pending), so this assumes it goes green.
- [should-fix]
AlertRecord::technique"ATT&CK technique the detection maps to":alerts.ndjsonalso carriesRESPONSE-ESCALATE(apps/agent/src/sink/mod.rs:168),BAYES,Sigmaand the watchdog'sSELF-PROTECTION(apps/watchdog/src/supervise.rs:688). "ATT&CK id or internal finding label". - [should-fix]
AlertRecord::timestamp_ns"Time of the detection, in nanoseconds": both writers stamp the write time (now_ns()inapps/agent/src/alerts.rs:110,nanos_since_epoch()in the watchdog), and the epoch is missing. "When the record was written, in nanoseconds since the UNIX epoch." - [nit]
TransportError::ServerError::message: a log reader would want to know control and bidi characters are stripped, the body is capped at 2 KiB, and an empty body becomes "http status: N" (client.rs:254-265). - [nit]
ScanStatsnow says thedroppedsentence twice (type doc from #363 and this field); drop the type-level one.
🤖 Generated with Claude Code
| pub struct AlertRecord { | ||
| /// Time of the detection, in nanoseconds. | ||
| pub timestamp_ns: u64, | ||
| /// ATT&CK technique the detection maps to. |
There was a problem hiding this comment.
[should-fix] Not only ATT&CK: RESPONSE-ESCALATE, BAYES, Sigma and the watchdog's SELF-PROTECTION are written here too.
| #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] | ||
| #[allow(missing_docs)] // #362 | ||
| pub struct AlertRecord { | ||
| /// Time of the detection, in nanoseconds. |
There was a problem hiding this comment.
[should-fix] The write time (now_ns() in apps/agent/src/alerts.rs:110 and the watchdog), not the detection's, in nanoseconds since the UNIX epoch.
| pub struct ScanStats { | ||
| /// Scans fully handled: the match callback, when there was a match, has returned. | ||
| pub scanned: u64, | ||
| /// Requests that could not be queued because the queue was full or closed. |
There was a problem hiding this comment.
[nit] Now that the field says this, drop the same sentence from the ScanStats type doc (#363).
|
Pushed 🤖 Generated with Claude Code |
SoFrexs
left a comment
There was a problem hiding this comment.
Re-reviewed 2e684ad4 (diff since cda763c6).
All four points are fixed. AlertRecord::technique lists the internal labels, timestamp_ns is the write time since the epoch, and ScanStats no longer says the same thing twice.
- [nit]
TransportError::ServerError::messagesays "else the response body". Inerror_reason(client.rs), a body that parses as a JSON object but has none oferror,messageorreasonreturnsNone, so it becomeshttp status: N, not the body. Something like "..., else the plain-text body, elsehttp status: N(an empty body, or a JSON object without those keys)" would be exact. Not blocking.
CI was still running at review time, so this approval assumes it goes green.
🤖 Generated with Claude Code
Removes the #[allow(missing_docs)] // #362 markers from yara, inventory, response, sinks, tamper, transport, updater and verdict. Comments only. Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Signed-off-by: SherlockOmss <[email protected]>
…#362) Review of cda763c: - AlertRecord::technique is an ATT&CK id or an internal finding label (RESPONSE-ESCALATE, BAYES, Sigma, SELF-PROTECTION). - AlertRecord::timestamp_ns is the write time, since the UNIX epoch. - TransportError::ServerError::message says where the text comes from, the 2 KiB read cap, the stripped control/bidi characters and the empty-body fallback. - ScanStats: drop the dropped sentence from the type doc, the field says it. Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Signed-off-by: SherlockOmss <[email protected]>
2e684ad to
87a50bd
Compare
Removes 22
#[allow(missing_docs)] // #362markers (yara, inventory, response, sinks, tamper, transport, updater, verdict) and documents the fields and variants behind them. Comments only: no behavior change, no key or signing logic touched.Checks:
cargo +nightly fmt --all,cargo check --all-targetsandcargo doc --no-depswith -D warnings on these crates: clean.Stacked on #363 (base docs/172-missing-docs); retarget to main once it merges.
🤖 Generated with Claude Code