Skip to content

P7b-2: map rules to ATT&CK and add graph-only adversary scenarios - #38

Merged
therandomsecurityguy merged 1 commit into
mainfrom
dac/predictive-p7b2-techniques-scenarios
Oct 27, 2026
Merged

therandomsecurityguy merged 1 commit into
mainfrom
dac/predictive-p7b2-techniques-scenarios

Conversation

@therandomsecurityguy

Copy link
Copy Markdown
Owner

Summary

Final phase of the predictive security roadmap — P7b-2, under the agreed defaults (curated mapping table, graph-only emulation; live AWS execution stays explicitly out of scope). 23 files, +959/−2.

Curated ATT&CK mapping (attack-techniques.ts)

  • 16 reviewed techniques (ids, names, tactics) and a per-rule mapping covering all 34 rules — framework-citations pattern, pinned by a test (every rule mapped, every technique known, ids well-formed)
  • Surfaced on GET /rules//rules/:id, on every issue (metadata.attackTechniques), and as an "ATT&CK techniques" card on the issue page

Graph-only adversary scenarios (attack-scenarios.ts)

  • Three curated chains of existing rules: leaked-credential-to-data, internet-to-admin, cicd-to-cloud-takeover; each step names the rule that would be that step's evidence
  • GET /attack-scenarios (Viewer) lists them with resolved techniques + rule names; GET /attack-scenarios/:id (Viewer + expensive-query limiter) re-runs each step's rule query against the live graph — deduped, capped at 200 paths with truncated flagged — reporting per-step matched counts, first resources, errors (rest keep running; all-fail is a 500), and the matched-step total
  • No AWS calls, nothing executed — attribution over collected evidence, labelled as such on the "Adversary scenarios" page (Inventory) and in the CHANGELOG

Why this is safe

  • Read-only and bounded: steps run internal catalogue queries only (ruleId from the catalogue, never caller Gremlin), rate-limited as an expensive endpoint
  • The mapping is curated and pinned by CI; results claim no more than "these steps match your current findings"
  • No infra, no IAM, no new network paths

Test plan

  • npx jest --runInBand — 19 projects / 1790 tests passed (new: mapping pins, scenario curation/resources, runner metadata, API list/run/dedupe/step-error/500, UI page + issue card)
  • npm run typecheck; full workspace lint; npm run format:check
  • npm run ci:build; npm run package:lambdas && npm run smoke:lambdas

Final phase of the predictive security roadmap, under the agreed defaults
(curated mapping table, graph-only emulation; live AWS execution stays
out of scope).

- attack-techniques.ts: a reviewed ATT&CK subset (16 techniques with
  names and tactics) and a per-rule mapping covering all 34 catalogue
  rules — the framework-citations pattern, pinned by a test that every
  rule is mapped, every technique is known, and ids are well-formed, so
  drift fails CI. Techniques ride on GET /rules and /rules/:id, on every
  issue's metadata (attackTechniques), and as an "ATT&CK techniques"
  card on the issue page.
- attack-scenarios.ts: three curated chains of existing rules —
  leaked-credential-to-data, internet-to-admin, cicd-to-cloud-takeover —
  where each step names the rule that would be that step's evidence,
  plus stepResources() for the matched-path resources. Validated by the
  same pinning approach.
- GET /attack-scenarios (Viewer, static) lists them with resolved
  techniques and rule names; GET /attack-scenarios/:id (Viewer +
  expensive-query limiter) is graph-only emulation: each step re-runs
  its rule's query against the live graph, deduped and capped at 200
  paths with truncation flagged, reporting matched path counts, first
  resources, and the matched-step total. A failing step records its
  error and the rest still run; only an all-steps failure is a 500. No
  AWS call, nothing executed — attribution over collected evidence.
- UI: the "Adversary scenarios" page under Inventory with per-scenario
  run results and the graph-only disclaimer; the issue page gains the
  ATT&CK techniques card.

Why this is safe: read-only, bounded, and labelled — scenarios only run
internal catalogue queries (ruleId from the catalogue, never caller
Gremlin), the mapping is curated and pinned, and results claim no more
than "these steps match your current findings".
@therandomsecurityguy
therandomsecurityguy merged commit 8f41dac into main Oct 27, 2026
5 checks passed
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.

1 participant