Skip to content

detection: agent-specific signals to add after the freeze #317

Open

Description

@blitzcrieg1

Candidate traits and rules for AI coding agents, to land together after the detection freeze, each with an attack and a benign corpus case:

  • edits_self_config trait: a write to the agent's own hook or settings file (~/.claude/settings.json, ~/.cursor/hooks.json, ~/.codex/hooks.json and the like), then any action. T1562.
  • write_outside_workspace trait: needs the hook's cwd (see Events carry no project, so one trail mixes every repo on the machine #37); fire on security-sensitive targets only (ssh, aws, autostart).
  • novel or typosquatted package install: a package within a small edit distance of a popular name, or fetched from outside a registry. T1195.002.
  • CI/CD config edit then push: a workflow or pipeline file written, then a push. T1562 / T1098.
  • MCP schema change then use: a server whose tool digest changed is later called. ATLAS AML.T0109.

Each needs fields checked against the schema first; some need new hook-side labels computed before hashing.

Activity

  1. added
    detection-rule
    on Oct 22, 2026
  2. added a commit that references this issue on Oct 23, 2026
  3. added
    bounty
    on Nov 24, 2026
  4. rumangsanya commented on Nov 27, 2026

    @rumangsanya
    Contributor

    claim

    I'd like to take this under the bounty program (#454), sliced one trait per PR rather than all five at once (program rule: one task per PR). Starting with edits_self_config (T1562): a write to the agent's own hook/settings files (~/.claude/settings.json, ~/.cursor/hooks.json, ~/.codex/hooks.json, ...), computed from the file-write events the hooks already record — no new hook-side labels needed for this one, as far as I can tell from the schema. I'll verify against the shipped event shapes first and report back here if it turns out to need one.

    Each PR: trait + attack corpus case that fires + benign case (an ordinary project settings write that must stay quiet) + benchmark green. If you'd rather have a different signal first, or the five as one bundle after all, say the word — otherwise I'll start with edits_self_config. Contributor from #486 (repeated-denials).

  5. 14 remaining items

  6. added a commit that references this issue on Nov 29, 2026
  7. blitzcrieg1 commented on Nov 29, 2026

    @blitzcrieg1
    OwnerAuthor

    First slice landed: CI/CD config edit then push shipped in 0.20.0 as the edits_ci_config observation with a T1562 mapping, two corpus cases and a dedicated test file, contributed by @rumangsanya in #521.

    The remaining traits are still open for claims under the bounty program (#454), one trait per PR with an attack and a benign corpus case each: edits_self_config, write_outside_workspace (needs #37 for the hook cwd), novel or typosquatted package install, and MCP schema change then use.

  8. hoangvietdevstudio-bit commented on Nov 29, 2026

    @hoangvietdevstudio-bit
  9. linhsama commented on Nov 29, 2026

    @linhsama

    Hi, I can implement these post-freeze detection signals in the main detection module along with schema validation. I will verify the changes by running the existing test suite alongside a new corpus of attack and benign cases to prevent false positives. Please confirm my assignment to this issue before I submit the pull request.

  10. blitzcrieg1 commented on Nov 29, 2026

    @blitzcrieg1
    OwnerAuthor

    Welcome. Claims go one trait per PR, so name the slice you want and I'll confirm the assignment here. The four remaining traits from the top of this issue:

    1. edits_self_config (T1562): a write to the agent's own hook or settings file, then any action.
    2. write_outside_workspace: depends on the hook cwd from Events carry no project, so one trail mixes every repo on the machine #37, so talk scope with me before claiming this one.
    3. Novel or typosquatted package install (T1195.002).
    4. MCP schema change then use (ATLAS AML.T0109).

    Each PR needs an attack and a benign corpus case, the full test suite green, and the benchmark still at zero misses and zero false positives. No schema changes are needed for any of these; the event schema stays at 1.3.0. The detection engine is otherwise frozen, so every change lands through the program rules in #454.

  11. anhdttlop9a8-hue commented on Nov 29, 2026

    @anhdttlop9a8-hue
    Contributor

    Claiming the novel/typosquatted or off-registry package install (T1195.002) slice under #454. Opened PR #530 with the \suspicious_pkg_install\ trait, T1195.002 MITRE mapping, attack + benign corpus cases, and full benchmark/ruff verification (0 misses, 0 false positives).

  12. cqiccc commented on Nov 30, 2026

    @cqiccc

    claim

    I'd like to take the edits_self_config (T1562) slice under #454 (one trait/rule per PR): pairing a write to the agent's own settings/hooks (~/.claude/settings.json, ~/.cursor/hooks.json, ~/.codex/hooks.json, etc.) with a subsequent tool action in the same session, along with attack + benign corpus cases, Sigma pack regeneration, and unit tests. Ready to open the PR right away if this slice is still open.

  13. blitzcrieg1 commented on Nov 30, 2026

    @blitzcrieg1
    OwnerAuthor

    Assignment confirmed: edits_self_config (T1562), one slice per PR. Your plan already names the right pieces: a write to the agent's own hook or settings file paired with a subsequent action in the same session, an attack and a benign corpus case, unit tests, and the benchmark still at zero misses and zero false positives. Post the PR against master's current head when ready; the review will verify the gates locally before merge.

  14. rumangsanya commented on Nov 30, 2026

    @rumangsanya
    Contributor

    claim

    I'd like to take the MCP schema change then use slice under #454 (one trait per PR): a session where an MCP server's tool digest changes and that same server is later called in the same session. ATLAS AML.T0109 mapping.

    Plan, same shape as my #521: the trait itself, an attack and a benign corpus case, unit tests, and the full benchmark suite to check for false positives. No schema changes — fields checked against the existing schema first.

  15. rumangsanya commented on Nov 30, 2026

    @rumangsanya
    Contributor

    scope question before claiming: write_outside_workspace

    I'd like to take the last remaining #317 slice, write_outside_workspace, under #454 (one trait per PR) — but posting a scope question first, as the issue itself flags that this one needs the hook's cwd (#37).

    Proposed narrow first cut, in the same shape as my merged edits_self_config (#505) / edits_ci_config (#521) traits, which classify on the target path alone:

    • Fire only on writes to security-sensitive targets that are outside a workspace by construction, regardless of cwd: ~/.ssh/**, ~/.aws/**, and autostart locations (~/.config/autostart/**, ~/Library/LaunchAgents/**, the Windows Startup folder). No fire on ordinary outside-workspace writes (e.g. /tmp, ~/Downloads).
    • Attack corpus case: a Write/Edit (and a shell redirect) to ~/.ssh/authorized_keys in a session, tagged write_outside_workspace.
    • Benign corpus case: the same sensitive-looking path inside a project tree (e.g. a test fixture under the repo) and a normal workspace file write — both must stay quiet.
    • Unit tests for the classifier paths + agentmetry benchmark and the full suite, README figures refreshed if counts change.

    Two questions before I start:

    1. Is this path-only narrowing acceptable for a first cut, or do you want it blocked on the Events carry no project, so one trail mixes every repo on the machine #37 cwd field landing first?
    2. Is the target set above the right one, and which ATT&CK mapping do you prefer for the trait (autostart points at T1547, the ssh/aws writes at T1552/T1098)?

    Happy to adjust the scope to whatever you confirm here before writing code.

  16. blitzcrieg1 commented on Nov 30, 2026

    @blitzcrieg1
    OwnerAuthor

    @rumangsanya two answers:

    MCP schema change then use: assignment confirmed, and the PR is up in #536. Review will run the gates locally like #521 and #530.

    write_outside_workspace scope: your narrow first cut is right, and it is the whole reason the issue asks for it this way. Firing on targets that are outside any workspace by construction (~/.ssh/**, ~/.aws/**, ~/.config/autostart/**, ~/Library/LaunchAgents/**, the Windows Startup folder) needs no cwd at all: no workspace contains those paths, so the target being sensitive is sufficient. Keep the rule quiet on ordinary workspace-internal writes, and #37 stays a separate, later slice for generic outside-the-current-workspace detection. Claim it with that scope and I will confirm.

    One note for the record: with #531 in flight from @cqiccc, the edits_self_config sequence rule and this trait are different slices of the same signal, one rule and one observation, and both follow the one slice per PR rule.

  17. rumangsanya commented on Nov 30, 2026

    @rumangsanya
    Contributor

    claim

    Claiming the write_outside_workspace slice under #454 (one trait per PR), with the scope as confirmed above:

    Starting now — will open the PR from this branch once the benchmark and suite are green.

  18. blitzcrieg1 commented on Nov 30, 2026

    @blitzcrieg1
    OwnerAuthor

    New slice added: #539, entity-linked signal store Phase 1 (read-only entity index from the trail, schema 1.4.0 additive, plus the first entity-joined rule binding a credential read to egress by file digest; see #431). Claim on #539 in a comment before starting, same house rules as the other slices.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bountydetection-rule

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions