{
  "attack_id": "slopsquatting-huggingface-cli-2024",
  "status": "catalog_recommendations_not_validated_coverage",
  "stages": [
    {
      "node_id": "step-1",
      "profile": "package",
      "title": "Dependency / CI trust boundary",
      "hypothesis": "A package or workflow change introduces a lifecycle hook, remote dependency or new command that accesses secrets or external services.",
      "visibility": "Defender-side logs where collected",
      "telemetry": [
        "Package-manager and CI job logs",
        "Lockfile / manifest / workflow diffs",
        "Runner process trees, secret access and egress"
      ],
      "investigate": [
        "Compare package provenance, publish identity, lifecycle scripts and resolved dependency URLs with the approved version.",
        "Correlate the install or workflow to secret reads and subsequent token use; distinguish exposure from confirmed compromise."
      ],
      "limitation": "Package installation and unfamiliar names are not malicious by themselves. Dependency resolution and CI audit records are required.",
      "note": "Compare the model recommendation with registry provenance and the lockfile; a recommended name alone does not establish installation or compromise.",
      "queries": {
        "sigma": "title: Hunt - Dependency / CI trust boundary\nid: 5fa9c45a-ac1c-4666-a598-e80626320997\nstatus: experimental\ndescription: A package or workflow change introduces a lifecycle hook, remote\n  dependency or new command that accesses secrets or external services.\nauthor: MagicSword OpenAttacks catalog\ndate: 2026-10-23\nfalsepositives:\n  - Authorized activity matching this broad hunt; baseline and investigate\n    before alerting.\nlevel: low\nlogsource:\n  category: application\n  product: openattacks_audit\n  definition: Custom normalized audit schema; map EventType, Actor, Asset, Action,\n    Target and CorrelationId from the required source logs first.\ndetection:\n  selection:\n    EventType:\n      - package.install\n      - ci.workflow.change\n      - package.lifecycle.exec\n  condition: selection\n",
        "kql": "// SCHEMA TEMPLATE: create/map this custom table before use; not a built-in Sentinel table.\n// OpenAttacksAudit_CL: TimeGenerated(datetime), EventType/Actor/Asset/Action/Target/CorrelationId(string).\n// Selects candidates only. Apply the stage hypothesis and correlation steps before alerting.\nOpenAttacksAudit_CL\n| where TimeGenerated > ago(7d)\n| where EventType in (\"package.install\", \"ci.workflow.change\", \"package.lifecycle.exec\")\n| project TimeGenerated, EventType, Actor, Asset, Action, Target, CorrelationId\n| order by TimeGenerated desc",
        "spl": "sourcetype=\"openattacks:audit\"\nEventType IN (\"package.install\", \"ci.workflow.change\", \"package.lifecycle.exec\")\n| table _time EventType Actor Asset Action Target CorrelationId\n| sort - _time"
      },
      "query_scope": "Custom-schema candidates, not out-of-box detectors. Map your application / cloud / platform logs to EventType, Actor, Asset, Action, Target and CorrelationId. KQL uses a custom OpenAttacksAudit_CL table; SPL uses openattacks:audit. EventType values are proposed normalization names, not native vendor event names. Correlation and environment-specific alert logic remain to be built.",
      "query_kind": "custom_schema",
      "origin": "catalog_authored",
      "definition_url": "https://github.com/magicsword-io/openattacks/blob/main/detections/package.yaml",
      "query_downloads": {
        "sigma": "/api/detections/package.sigma.yml",
        "kql": "/api/detections/package.kql",
        "spl": "/api/detections/package.spl"
      },
      "validation": "draft",
      "evidence": [
        "https://www.lasso.security/blog/ai-package-hallucinations",
        "https://arxiv.org/abs/2406.10279",
        "https://www.aikido.dev/blog/slopsquatting-ai-package-hallucination-attacks"
      ],
      "reviewed": "2026-11-04",
      "upstream_matches": []
    },
    {
      "node_id": "step-2",
      "profile": "package",
      "title": "Dependency / CI trust boundary",
      "hypothesis": "A package or workflow change introduces a lifecycle hook, remote dependency or new command that accesses secrets or external services.",
      "visibility": "Defender-side logs where collected",
      "telemetry": [
        "Package-manager and CI job logs",
        "Lockfile / manifest / workflow diffs",
        "Runner process trees, secret access and egress"
      ],
      "investigate": [
        "Compare package provenance, publish identity, lifecycle scripts and resolved dependency URLs with the approved version.",
        "Correlate the install or workflow to secret reads and subsequent token use; distinguish exposure from confirmed compromise."
      ],
      "limitation": "Package installation and unfamiliar names are not malicious by themselves. Dependency resolution and CI audit records are required.",
      "queries": {
        "sigma": "title: Hunt - Dependency / CI trust boundary\nid: 5fa9c45a-ac1c-4666-a598-e80626320997\nstatus: experimental\ndescription: A package or workflow change introduces a lifecycle hook, remote\n  dependency or new command that accesses secrets or external services.\nauthor: MagicSword OpenAttacks catalog\ndate: 2026-10-23\nfalsepositives:\n  - Authorized activity matching this broad hunt; baseline and investigate\n    before alerting.\nlevel: low\nlogsource:\n  category: application\n  product: openattacks_audit\n  definition: Custom normalized audit schema; map EventType, Actor, Asset, Action,\n    Target and CorrelationId from the required source logs first.\ndetection:\n  selection:\n    EventType:\n      - package.install\n      - ci.workflow.change\n      - package.lifecycle.exec\n  condition: selection\n",
        "kql": "// SCHEMA TEMPLATE: create/map this custom table before use; not a built-in Sentinel table.\n// OpenAttacksAudit_CL: TimeGenerated(datetime), EventType/Actor/Asset/Action/Target/CorrelationId(string).\n// Selects candidates only. Apply the stage hypothesis and correlation steps before alerting.\nOpenAttacksAudit_CL\n| where TimeGenerated > ago(7d)\n| where EventType in (\"package.install\", \"ci.workflow.change\", \"package.lifecycle.exec\")\n| project TimeGenerated, EventType, Actor, Asset, Action, Target, CorrelationId\n| order by TimeGenerated desc",
        "spl": "sourcetype=\"openattacks:audit\"\nEventType IN (\"package.install\", \"ci.workflow.change\", \"package.lifecycle.exec\")\n| table _time EventType Actor Asset Action Target CorrelationId\n| sort - _time"
      },
      "query_scope": "Custom-schema candidates, not out-of-box detectors. Map your application / cloud / platform logs to EventType, Actor, Asset, Action, Target and CorrelationId. KQL uses a custom OpenAttacksAudit_CL table; SPL uses openattacks:audit. EventType values are proposed normalization names, not native vendor event names. Correlation and environment-specific alert logic remain to be built.",
      "query_kind": "custom_schema",
      "origin": "catalog_authored",
      "definition_url": "https://github.com/magicsword-io/openattacks/blob/main/detections/package.yaml",
      "query_downloads": {
        "sigma": "/api/detections/package.sigma.yml",
        "kql": "/api/detections/package.kql",
        "spl": "/api/detections/package.spl"
      },
      "validation": "draft",
      "evidence": [
        "https://www.lasso.security/blog/ai-package-hallucinations",
        "https://arxiv.org/abs/2406.10279",
        "https://www.aikido.dev/blog/slopsquatting-ai-package-hallucination-attacks"
      ],
      "reviewed": "2026-10-23",
      "upstream_matches": []
    },
    {
      "node_id": "step-3",
      "profile": "package",
      "title": "Dependency / CI trust boundary",
      "hypothesis": "A package or workflow change introduces a lifecycle hook, remote dependency or new command that accesses secrets or external services.",
      "visibility": "Defender-side logs where collected",
      "telemetry": [
        "Package-manager and CI job logs",
        "Lockfile / manifest / workflow diffs",
        "Runner process trees, secret access and egress"
      ],
      "investigate": [
        "Compare package provenance, publish identity, lifecycle scripts and resolved dependency URLs with the approved version.",
        "Correlate the install or workflow to secret reads and subsequent token use; distinguish exposure from confirmed compromise."
      ],
      "limitation": "Package installation and unfamiliar names are not malicious by themselves. Dependency resolution and CI audit records are required.",
      "note": "Package downloads demonstrate exposure, not malware execution or confirmed compromise.",
      "queries": {
        "sigma": "title: Hunt - Dependency / CI trust boundary\nid: 5fa9c45a-ac1c-4666-a598-e80626320997\nstatus: experimental\ndescription: A package or workflow change introduces a lifecycle hook, remote\n  dependency or new command that accesses secrets or external services.\nauthor: MagicSword OpenAttacks catalog\ndate: 2026-10-23\nfalsepositives:\n  - Authorized activity matching this broad hunt; baseline and investigate\n    before alerting.\nlevel: low\nlogsource:\n  category: application\n  product: openattacks_audit\n  definition: Custom normalized audit schema; map EventType, Actor, Asset, Action,\n    Target and CorrelationId from the required source logs first.\ndetection:\n  selection:\n    EventType:\n      - package.install\n      - ci.workflow.change\n      - package.lifecycle.exec\n  condition: selection\n",
        "kql": "// SCHEMA TEMPLATE: create/map this custom table before use; not a built-in Sentinel table.\n// OpenAttacksAudit_CL: TimeGenerated(datetime), EventType/Actor/Asset/Action/Target/CorrelationId(string).\n// Selects candidates only. Apply the stage hypothesis and correlation steps before alerting.\nOpenAttacksAudit_CL\n| where TimeGenerated > ago(7d)\n| where EventType in (\"package.install\", \"ci.workflow.change\", \"package.lifecycle.exec\")\n| project TimeGenerated, EventType, Actor, Asset, Action, Target, CorrelationId\n| order by TimeGenerated desc",
        "spl": "sourcetype=\"openattacks:audit\"\nEventType IN (\"package.install\", \"ci.workflow.change\", \"package.lifecycle.exec\")\n| table _time EventType Actor Asset Action Target CorrelationId\n| sort - _time"
      },
      "query_scope": "Custom-schema candidates, not out-of-box detectors. Map your application / cloud / platform logs to EventType, Actor, Asset, Action, Target and CorrelationId. KQL uses a custom OpenAttacksAudit_CL table; SPL uses openattacks:audit. EventType values are proposed normalization names, not native vendor event names. Correlation and environment-specific alert logic remain to be built.",
      "query_kind": "custom_schema",
      "origin": "catalog_authored",
      "definition_url": "https://github.com/magicsword-io/openattacks/blob/main/detections/package.yaml",
      "query_downloads": {
        "sigma": "/api/detections/package.sigma.yml",
        "kql": "/api/detections/package.kql",
        "spl": "/api/detections/package.spl"
      },
      "validation": "draft",
      "evidence": [
        "https://www.lasso.security/blog/ai-package-hallucinations",
        "https://arxiv.org/abs/2406.10279",
        "https://www.aikido.dev/blog/slopsquatting-ai-package-hallucination-attacks"
      ],
      "reviewed": "2026-10-23",
      "upstream_matches": []
    },
    {
      "node_id": "step-4",
      "profile": "unobserved",
      "title": "No source-backed runtime hunt yet",
      "hypothesis": "The supplied account does not establish a deployed victim-side behavior for this stage.",
      "visibility": "Not established",
      "telemetry": [],
      "investigate": [
        "Obtain a source-backed procedure and identify which party could observe it before drafting a detection."
      ],
      "limitation": "Marketing claims, unknown steps and unconfirmed deployments are not detection coverage. No rule is generated for this stage.",
      "note": "The supplied account leaves this stage unestablished. Obtain a source-backed procedure before proposing a runtime query.",
      "queries": null,
      "query_scope": "No runtime query: the available evidence does not establish one.",
      "query_kind": "gap",
      "origin": "catalog_authored",
      "definition_url": "https://github.com/magicsword-io/openattacks/blob/main/detections/unobserved.yaml",
      "query_downloads": null,
      "validation": "not_applicable",
      "evidence": [
        "https://www.lasso.security/blog/ai-package-hallucinations",
        "https://arxiv.org/abs/2406.10279",
        "https://www.aikido.dev/blog/slopsquatting-ai-package-hallucination-attacks"
      ],
      "reviewed": null,
      "upstream_matches": []
    }
  ],
  "attack_flow": {
    "nodes": [
      {
        "id": "step-1",
        "title": "Code model hallucinates a package",
        "description": "An assistant recommends a package name that was not a legitimate dependency.",
        "kind": "ai",
        "source_urls": [
          "https://www.lasso.security/blog/ai-package-hallucinations",
          "https://arxiv.org/abs/2406.10279",
          "https://www.aikido.dev/blog/slopsquatting-ai-package-hallucination-attacks"
        ]
      },
      {
        "id": "step-2",
        "title": "An adversary can register that name",
        "description": "The slopsquatting pattern makes the hallucinated name installable.",
        "kind": "access",
        "source_urls": [
          "https://www.lasso.security/blog/ai-package-hallucinations",
          "https://arxiv.org/abs/2406.10279",
          "https://www.aikido.dev/blog/slopsquatting-ai-package-hallucination-attacks"
        ]
      },
      {
        "id": "step-3",
        "title": "Developer installs the suggested package",
        "description": "The research registered huggingface-cli and measured downloads.",
        "kind": "execution",
        "source_urls": [
          "https://www.lasso.security/blog/ai-package-hallucinations",
          "https://arxiv.org/abs/2406.10279",
          "https://www.aikido.dev/blog/slopsquatting-ai-package-hallucination-attacks"
        ]
      },
      {
        "id": "step-4",
        "title": "Downloads do not prove compromise",
        "description": "The experiment measures exposure; the registered research package does not establish a malicious payload on every user.",
        "kind": "unknown",
        "source_urls": [
          "https://www.lasso.security/blog/ai-package-hallucinations",
          "https://arxiv.org/abs/2406.10279",
          "https://www.aikido.dev/blog/slopsquatting-ai-package-hallucination-attacks"
        ]
      }
    ],
    "edges": [
      {
        "source": "step-1",
        "target": "step-2"
      },
      {
        "source": "step-2",
        "target": "step-3"
      },
      {
        "source": "step-3",
        "target": "step-4"
      }
    ]
  }
}