Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/content.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ jobs:
runs-on: ubuntu-latest
env:
CARGO_TERM_COLOR: always
# The engines live in the agent repo: lay out the umbrella (rules/ + agent/) and
# make a missing sibling fail instead of skipping the content suites.
# The engines live in the agent repo: check both public repos out side by side
# (rules/ + agent/) and make a missing sibling fail instead of skipping the content suites.
SYNTHAEA_ROOT: ${{ github.workspace }}
SYNTHAEA_REQUIRE_SIBLINGS: "1"
defaults:
Expand All @@ -30,7 +30,7 @@ jobs:
persist-credentials: false
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: synthaea-lab/edr-agent
repository: synthaea-lab/agent
path: agent
persist-credentials: false
- uses: dtolnay/rust-toolchain@6bed0761d98439e5a578e2877258200ad565ba87 # stable branch
Expand Down
18 changes: 14 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,20 @@
Detection content shipped to agents, kept separate from engine code so it can ship on its
own cadence (canary rings). To be migrated/curated from `old/rules` after review.

Part of the Synthaea umbrella ([synthaea-lab/edr](https://github.com/synthaea-lab/edr)),
checked out at `<umbrella>/rules`. The engines that validate this content live in the
agent repo; from the umbrella, `just test rules` runs the sigma/yara/ioc content suites
against this checkout (CI does the same: `.github/workflows/content.yml`).
Part of Synthaea, alongside the public synthaea-lab/agent, synthaea-lab/server and
synthaea-lab/ml repositories. The engines that validate this content live in
synthaea-lab/agent. To run the content suites, check it out next to this repo as `agent/`
(this one as `rules/`, or point `SYNTHAEA_ROOT` at their parent) and, from `agent/`:

```sh
cargo test -p sigma --test content
cargo test -p yara --test content
cargo test -p intel --test content
```

Each suite loads this whole tree through the real engine: every rule must compile and fire
on its crafted matching sample. `SYNTHAEA_REQUIRE_SIBLINGS=1` makes a missing `rules/`
checkout fail instead of skipping. CI does the same: `.github/workflows/content.yml`.

| Path | Purpose |
| --- | --- |
Expand Down
4 changes: 2 additions & 2 deletions sigma/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ Sigma rules evaluated on-device by the `sigma` engine crate. Layout: one directo
platform, descriptive file names (the directory carries the platform, so no `lnx_`/
`win_` infix): `linux/base64_pipe_shell.yml`, `windows/powershell_encoded.yml`.
A host loads **only the directories its platform runs** (`SigmaEngine::load_dir_for`, #980): Linux
`linux/`, Windows `windows/`, macOS `macos/` **and `linux/`** (the Unix-family rules; a choice, see
`docs/detection/sigma.md`). A rule in `macos/` never runs on a Linux host, and a rule outside the three
`linux/`, Windows `windows/`, macOS `macos/` **and `linux/`** (the Unix-family rules, by choice).
A rule in `macos/` never runs on a Linux host, and a rule outside the three
directories runs nowhere. The content tests load the whole tree.

Every rule must stay inside the engine's supported subset (`crates/sigma` docs) — the
Expand Down
2 changes: 1 addition & 1 deletion yara/lab/synthaea_lab_payload.yar
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Lab-only marker rule: the benign payloads dropped by lab/scenarios embed this
// Lab-only marker rule: the benign payloads dropped by the lab scenarios embed this
// marker so YARA detection can be validated end to end without real malware.
// Category `lab` ships to lab/dev agents only once per-ring content targeting exists.
rule synthaea_lab_payload {
Expand Down
Loading